Documentation
¶
Index ¶
- func MakeAddEventEndpoint(s webapi.Service) endpoint.Endpoint
- func MakeDeleteEventEndpoint(s webapi.Service) endpoint.Endpoint
- func MakeListEventEndpoint(s webapi.Service) endpoint.Endpoint
- func MakeLoginEndpoint(s webapi.Service) endpoint.Endpoint
- func MakeLogoutEndpoint(s webapi.Service) endpoint.Endpoint
- func MakeSignUpEndpoint(s webapi.Service) endpoint.Endpoint
- type AddEventRequest
- type AddEventResponse
- type DeleteEventRequest
- type DeleteEventResponse
- type ListEventRequest
- type ListEventResponse
- type LoginRequest
- type LoginResponse
- type LogoutRequest
- type LogoutResponse
- type Set
- type SignUpRequest
- type SignUpResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAddEventEndpoint ¶
MakeAddEventEndpoint will receive a request, convert to the desired format, invoke the service and return the response structure
func MakeDeleteEventEndpoint ¶
MakeDeleteEventEndpoint will receive a request, convert to the desired format, invoke the service and return the response structure
func MakeListEventEndpoint ¶
MakeListEventEndpoint will receive a request, convert to the desired format, invoke the service and return the response structure
func MakeLoginEndpoint ¶
MakeLoginEndpoint will receive a request, convert to the desired format, invoke the service and return the response structure
func MakeLogoutEndpoint ¶
MakeLogoutEndpoint will receive a request, convert to the desired format, invoke the service and return the response structure
Types ¶
type AddEventRequest ¶
type AddEventRequest struct {
Event repository.Event `json:"event"`
}
AddEventRequest -> CreateEvent endpoint's input structures
type AddEventResponse ¶
type AddEventResponse struct { EventId string `json:"event_id,omitempty"` Err string `json:"err,omitempty"` }
AddEventResponse -> CreateEvent endpoint's output structure
type DeleteEventRequest ¶
type DeleteEventRequest struct { EventId string `json:"eventId,omitempty"` UserId uint64 `json:"userId"` }
DeleteEventRequest -> CreateEvent endpoint's input structures
type DeleteEventResponse ¶
type DeleteEventResponse struct {
Err string `json:"err,omitempty"`
}
DeleteEventResponse -> CreateEvent endpoint's output structure
type ListEventRequest ¶
type ListEventRequest struct {
UserId uint64 `json:"user_id"`
}
ListEventRequest -> CreateEvent endpoint's input structures
type ListEventResponse ¶
type ListEventResponse struct { Events []repository.Event `json:"events,omitempty"` Err string `json:"err,omitempty"` }
ListEventResponse -> CreateEvent endpoint's output structure
type LoginRequest ¶
LoginRequest -> CreateEvent endpoint's input structures
type LoginResponse ¶
type LoginResponse struct { UserId uint64 `json:"userId,omitempty"` Token token.Token `json:"token,omitempty"` Err string `json:"err,omitempty"` }
LoginResponse -> CreateEvent endpoint's output structure
type LogoutRequest ¶
LogoutRequest -> CreateEvent endpoint's input structures
type LogoutResponse ¶
type LogoutResponse struct {
Err string `json:"err,omitempty"`
}
LogoutResponse -> CreateEvent endpoint's output structure
type Set ¶
type SignUpRequest ¶
SignUpRequest -> CreateEvent endpoint's input structures