Ajouter Response et Responder
This commit is contained in:
parent
93495d76e9
commit
93334871e9
1 changed files with 15 additions and 0 deletions
15
responses/root.go
Normal file
15
responses/root.go
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
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