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
|
||||
|
||||
import "codeberg.org/vlbeaudoin/voki/response"
|
||||
|
||||
type GetHealthResponse struct {
|
||||
Response
|
||||
response.ResponseWithError
|
||||
}
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
package responses
|
||||
|
||||
import "codeberg.org/vlbeaudoin/voki/response"
|
||||
|
||||
type PostMembresResponse struct {
|
||||
Response
|
||||
response.ResponseWithError
|
||||
Data struct {
|
||||
MembresInserted int64
|
||||
}
|
||||
}
|
||||
|
||||
type PostProgrammesResponse struct {
|
||||
Response
|
||||
response.ResponseWithError
|
||||
Data struct {
|
||||
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
|
||||
}
|
Reference in a new issue