Documentation ¶
Index ¶
- type CreateRequest
- type EditRequest
- type FetchResponse
- type Handler
- func (h Handler) CreateProfile(logger *log.Logger, ds *service.ProfileService) func(c *routing.Context) error
- func (h Handler) EditProfile(logger *log.Logger, ds *service.ProfileService, a authentication.Service) func(c *routing.Context) error
- func (h Handler) Get(logger *log.Logger, ds *service.ProfileService) func(c *routing.Context) error
- func (h Handler) GetByOwner(logger *log.Logger, ds *service.ProfileService, a authentication.Service) func(c *routing.Context) error
- func (h Handler) Routes(api *routing.RouteGroup, logger *log.Logger, s *service.ProfileService, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { UserID string `json:"user_id"` FullName string `json:"full_name"` Email string `json:"email"` Phone string `json:"phone"` Consent bool `json:"consent"` }
func (*CreateRequest) Validate ¶
func (cr *CreateRequest) Validate() error
type EditRequest ¶
type FetchResponse ¶
func NewFetchResponse ¶
func NewFetchResponse(d domain.Profile, _ *service.ProfileService) *FetchResponse
NewFetchResponse instantiate a new response post load
type Handler ¶
type Handler struct{}
Handler is just a route collection
func (Handler) CreateProfile ¶
func (Handler) EditProfile ¶
func (h Handler) EditProfile(logger *log.Logger, ds *service.ProfileService, a authentication.Service) func(c *routing.Context) error
func (Handler) GetByOwner ¶
func (h Handler) GetByOwner(logger *log.Logger, ds *service.ProfileService, a authentication.Service) func(c *routing.Context) error
GetByOwner - load profile by owner ID
func (Handler) Routes ¶
func (h Handler) Routes(api *routing.RouteGroup, logger *log.Logger, s *service.ProfileService, a authentication.Service)
Click to show internal directories.
Click to hide internal directories.