Documentation ¶
Index ¶
- type ChocolateResource
- func (c ChocolateResource) Create(obj interface{}, r api2go.Request) (api2go.Responder, error)
- func (c ChocolateResource) Delete(id string, r api2go.Request) (api2go.Responder, error)
- func (c ChocolateResource) FindAll(r api2go.Request) (api2go.Responder, error)
- func (c ChocolateResource) FindOne(ID string, r api2go.Request) (api2go.Responder, error)
- func (c ChocolateResource) Update(obj interface{}, r api2go.Request) (api2go.Responder, error)
- type Response
- type UserResource
- func (s UserResource) Create(obj interface{}, r api2go.Request) (api2go.Responder, error)
- func (s UserResource) Delete(id string, r api2go.Request) (api2go.Responder, error)
- func (s UserResource) FindAll(r api2go.Request) (api2go.Responder, error)
- func (s UserResource) FindOne(ID string, r api2go.Request) (api2go.Responder, error)
- func (s UserResource) PaginatedFindAll(r api2go.Request) (uint, api2go.Responder, error)
- func (s UserResource) Update(obj interface{}, r api2go.Request) (api2go.Responder, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChocolateResource ¶
type ChocolateResource struct { ChocStorage *storage.ChocolateStorage UserStorage *storage.UserStorage }
ChocolateResource for api2go routes
type Response ¶
type Response struct { Res interface{} Code int }
The Response struct implements api2go.Responder
func (Response) StatusCode ¶
StatusCode sets the return status code
type UserResource ¶
type UserResource struct { ChocStorage *storage.ChocolateStorage UserStorage *storage.UserStorage }
UserResource for api2go routes
func (UserResource) FindOne ¶
FindOne to satisfy `api2go.DataSource` interface this method should return the user with the given ID, otherwise an error
func (UserResource) PaginatedFindAll ¶
PaginatedFindAll can be used to load users in chunks
Click to show internal directories.
Click to hide internal directories.