Migrer responses à voki/response
This commit is contained in:
parent
eca6672746
commit
025f9d74ce
3 changed files with 7 additions and 18 deletions
|
@ -1,5 +1,7 @@
|
||||||
package responses
|
package responses
|
||||||
|
|
||||||
|
import "codeberg.org/vlbeaudoin/voki/response"
|
||||||
|
|
||||||
type GetHealthResponse struct {
|
type GetHealthResponse struct {
|
||||||
Response
|
response.ResponseWithError
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
package responses
|
package responses
|
||||||
|
|
||||||
|
import "codeberg.org/vlbeaudoin/voki/response"
|
||||||
|
|
||||||
type PostMembresResponse struct {
|
type PostMembresResponse struct {
|
||||||
Response
|
response.ResponseWithError
|
||||||
Data struct {
|
Data struct {
|
||||||
MembresInserted int64
|
MembresInserted int64
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type PostProgrammesResponse struct {
|
type PostProgrammesResponse struct {
|
||||||
Response
|
response.ResponseWithError
|
||||||
Data struct {
|
Data struct {
|
||||||
ProgrammesInserted int64
|
ProgrammesInserted int64
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
package responses
|
|
||||||
|
|
||||||
type Response struct {
|
|
||||||
StatusCode int
|
|
||||||
Message string
|
|
||||||
Error string
|
|
||||||
}
|
|
||||||
|
|
||||||
type Responder interface {
|
|
||||||
Respond() Responder
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r Response) Respond() Responder {
|
|
||||||
return r
|
|
||||||
}
|
|
Loading…
Reference in a new issue