Documentation ¶
Index ¶
- Constants
- Variables
- func MakeBadRequest(err error) *goa.ServiceError
- func MakeForbidden(err error) *goa.ServiceError
- func MakeNotFound(err error) *goa.ServiceError
- func MakeUnauthorized(err error) *goa.ServiceError
- func NewAddDataEventEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDataEventsEndpointEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewDeleteDataEventEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewUpdateDataEventEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedDataEvents(res *DataEvents, view string) *dataeventsviews.DataEvents
- type AddDataEventPayload
- type AddDataEventResult
- type Auther
- type AuthorPhoto
- type Client
- func (c *Client) AddDataEvent(ctx context.Context, p *AddDataEventPayload) (res *AddDataEventResult, err error)
- func (c *Client) DataEventsEndpoint(ctx context.Context, p *DataEventsPayload) (res *DataEvents, err error)
- func (c *Client) DeleteDataEvent(ctx context.Context, p *DeleteDataEventPayload) (err error)
- func (c *Client) UpdateDataEvent(ctx context.Context, p *UpdateDataEventPayload) (res *UpdateDataEventResult, err error)
- type DataEvent
- type DataEvents
- type DataEventsPayload
- type DeleteDataEventPayload
- type Endpoints
- type NewDataEvent
- type PostAuthor
- type Service
- type UpdateDataEventPayload
- type UpdateDataEventResult
Constants ¶
const ServiceName = "data events"
ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.
Variables ¶
var MethodNames = [4]string{"data events", "add data event", "update data event", "delete data event"}
MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.
Functions ¶
func MakeBadRequest ¶
func MakeBadRequest(err error) *goa.ServiceError
MakeBadRequest builds a goa.ServiceError from an error.
func MakeForbidden ¶
func MakeForbidden(err error) *goa.ServiceError
MakeForbidden builds a goa.ServiceError from an error.
func MakeNotFound ¶
func MakeNotFound(err error) *goa.ServiceError
MakeNotFound builds a goa.ServiceError from an error.
func MakeUnauthorized ¶
func MakeUnauthorized(err error) *goa.ServiceError
MakeUnauthorized builds a goa.ServiceError from an error.
func NewAddDataEventEndpoint ¶
func NewAddDataEventEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewAddDataEventEndpoint returns an endpoint function that calls the method "add data event" of service "data events".
func NewDataEventsEndpointEndpoint ¶
func NewDataEventsEndpointEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDataEventsEndpointEndpoint returns an endpoint function that calls the method "data events" of service "data events".
func NewDeleteDataEventEndpoint ¶
func NewDeleteDataEventEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewDeleteDataEventEndpoint returns an endpoint function that calls the method "delete data event" of service "data events".
func NewUpdateDataEventEndpoint ¶
func NewUpdateDataEventEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewUpdateDataEventEndpoint returns an endpoint function that calls the method "update data event" of service "data events".
func NewViewedDataEvents ¶
func NewViewedDataEvents(res *DataEvents, view string) *dataeventsviews.DataEvents
NewViewedDataEvents initializes viewed result type DataEvents from result type DataEvents using the given view.
Types ¶
type AddDataEventPayload ¶
type AddDataEventPayload struct { Auth string Event *NewDataEvent }
AddDataEventPayload is the payload type of the data events service add data event method.
type AddDataEventResult ¶
type AddDataEventResult struct {
Event *DataEvent
}
AddDataEventResult is the result type of the data events service add data event method.
type Auther ¶
type Auther interface { // JWTAuth implements the authorization logic for the JWT security scheme. JWTAuth(ctx context.Context, token string, schema *security.JWTScheme) (context.Context, error) }
Auther defines the authorization functions to be implemented by the service.
type AuthorPhoto ¶
type AuthorPhoto struct {
URL string
}
type Client ¶
type Client struct { DataEventsEndpointEndpoint goa.Endpoint AddDataEventEndpoint goa.Endpoint UpdateDataEventEndpoint goa.Endpoint DeleteDataEventEndpoint goa.Endpoint }
Client is the "data events" service client.
func NewClient ¶
func NewClient(dataEventsEndpoint, addDataEvent, updateDataEvent, deleteDataEvent goa.Endpoint) *Client
NewClient initializes a "data events" service client given the endpoints.
func (*Client) AddDataEvent ¶
func (c *Client) AddDataEvent(ctx context.Context, p *AddDataEventPayload) (res *AddDataEventResult, err error)
AddDataEvent calls the "add data event" endpoint of the "data events" service.
func (*Client) DataEventsEndpoint ¶
func (c *Client) DataEventsEndpoint(ctx context.Context, p *DataEventsPayload) (res *DataEvents, err error)
DataEventsEndpoint calls the "data events" endpoint of the "data events" service.
func (*Client) DeleteDataEvent ¶
func (c *Client) DeleteDataEvent(ctx context.Context, p *DeleteDataEventPayload) (err error)
DeleteDataEvent calls the "delete data event" endpoint of the "data events" service.
func (*Client) UpdateDataEvent ¶
func (c *Client) UpdateDataEvent(ctx context.Context, p *UpdateDataEventPayload) (res *UpdateDataEventResult, err error)
UpdateDataEvent calls the "update data event" endpoint of the "data events" service.
type DataEvents ¶
type DataEvents struct {
Events []*DataEvent
}
DataEvents is the result type of the data events service data events method.
func NewDataEvents ¶
func NewDataEvents(vres *dataeventsviews.DataEvents) *DataEvents
NewDataEvents initializes result type DataEvents from viewed result type DataEvents.
type DataEventsPayload ¶
DataEventsPayload is the payload type of the data events service data events method.
type DeleteDataEventPayload ¶
DeleteDataEventPayload is the payload type of the data events service delete data event method.
type Endpoints ¶
type Endpoints struct { DataEventsEndpoint goa.Endpoint AddDataEvent goa.Endpoint UpdateDataEvent goa.Endpoint DeleteDataEvent goa.Endpoint }
Endpoints wraps the "data events" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "data events" service with endpoints.
type NewDataEvent ¶
type PostAuthor ¶
type PostAuthor struct { ID int32 Name string Photo *AuthorPhoto }
type Service ¶
type Service interface { // DataEvents implements data events. DataEventsEndpoint(context.Context, *DataEventsPayload) (res *DataEvents, err error) // AddDataEvent implements add data event. AddDataEvent(context.Context, *AddDataEventPayload) (res *AddDataEventResult, err error) // UpdateDataEvent implements update data event. UpdateDataEvent(context.Context, *UpdateDataEventPayload) (res *UpdateDataEventResult, err error) // DeleteDataEvent implements delete data event. DeleteDataEvent(context.Context, *DeleteDataEventPayload) (err error) }
Service is the data events service interface.
type UpdateDataEventPayload ¶
type UpdateDataEventPayload struct { Auth string EventID int64 Title string Description string Start int64 End int64 }
UpdateDataEventPayload is the payload type of the data events service update data event method.
type UpdateDataEventResult ¶
type UpdateDataEventResult struct {
Event *DataEvent
}
UpdateDataEventResult is the result type of the data events service update data event method.