Documentation ¶
Index ¶
- func DecodeInsertRequest(_ context.Context, r *http.Request) (interface{}, error)
- func NewInsertEndpoint(svc NumberService) endpoint.Endpoint
- func NewInsertHandler(ctx context.Context, svc NumberService) http.Handler
- func NewTotalEndpoint(svc NumberService) endpoint.Endpoint
- func NewTotalHandler(ctx context.Context, svc NumberService) http.Handler
- type InsertRequest
- type InsertResponse
- type NumberRepository
- type NumberService
- type TotalResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeInsertRequest ¶
func NewInsertEndpoint ¶
func NewInsertEndpoint(svc NumberService) endpoint.Endpoint
func NewInsertHandler ¶
func NewInsertHandler(ctx context.Context, svc NumberService) http.Handler
func NewTotalEndpoint ¶
func NewTotalEndpoint(svc NumberService) endpoint.Endpoint
func NewTotalHandler ¶
func NewTotalHandler(ctx context.Context, svc NumberService) http.Handler
Types ¶
type InsertRequest ¶
type InsertResponse ¶
type InsertResponse struct { Message string `json:"message"` common.ErrResponse }
type NumberRepository ¶
type NumberRepository interface { Store(s *Submission) error Find(u User) (*Submission, error) FindAll() []*Submission }
func NewNumberRepository ¶
func NewNumberRepository() NumberRepository
type NumberService ¶
NumberService represents the feature: Inserting Number
func NewNumberService ¶
func NewNumberService(r NumberRepository) NumberService
type TotalResponse ¶
type TotalResponse struct { Total int `json:"total"` common.ErrResponse }
Click to show internal directories.
Click to hide internal directories.