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 NewProjectEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewStationEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
- func NewViewedProjectActivityPage(res *ProjectActivityPage, view string) *activityviews.ProjectActivityPage
- func NewViewedStationActivityPage(res *StationActivityPage, view string) *activityviews.StationActivityPage
- type ActivityEntry
- type ActivityEntryCollection
- type Auther
- type Client
- type Endpoints
- type ProjectActivityPage
- type ProjectPayload
- type ProjectSummary
- type Service
- type StationActivityPage
- type StationPayload
- type StationSummary
Constants ¶
const ServiceName = "activity"
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 = [2]string{"station", "project"}
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 NewProjectEndpoint ¶
func NewProjectEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewProjectEndpoint returns an endpoint function that calls the method "project" of service "activity".
func NewStationEndpoint ¶
func NewStationEndpoint(s Service, authJWTFn security.AuthJWTFunc) goa.Endpoint
NewStationEndpoint returns an endpoint function that calls the method "station" of service "activity".
func NewViewedProjectActivityPage ¶
func NewViewedProjectActivityPage(res *ProjectActivityPage, view string) *activityviews.ProjectActivityPage
NewViewedProjectActivityPage initializes viewed result type ProjectActivityPage from result type ProjectActivityPage using the given view.
func NewViewedStationActivityPage ¶
func NewViewedStationActivityPage(res *StationActivityPage, view string) *activityviews.StationActivityPage
NewViewedStationActivityPage initializes viewed result type StationActivityPage from result type StationActivityPage using the given view.
Types ¶
type ActivityEntry ¶
type ActivityEntry struct { ID int64 Key string Project *ProjectSummary Station *StationSummary CreatedAt int64 Type string Meta interface{} }
type ActivityEntryCollection ¶
type ActivityEntryCollection []*ActivityEntry
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 Client ¶
Client is the "activity" service client.
func (*Client) Project ¶
func (c *Client) Project(ctx context.Context, p *ProjectPayload) (res *ProjectActivityPage, err error)
Project calls the "project" endpoint of the "activity" service.
func (*Client) Station ¶
func (c *Client) Station(ctx context.Context, p *StationPayload) (res *StationActivityPage, err error)
Station calls the "station" endpoint of the "activity" service.
type Endpoints ¶
Endpoints wraps the "activity" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "activity" service with endpoints.
type ProjectActivityPage ¶
type ProjectActivityPage struct { Activities ActivityEntryCollection Total int32 Page int32 }
ProjectActivityPage is the result type of the activity service project method.
func NewProjectActivityPage ¶
func NewProjectActivityPage(vres *activityviews.ProjectActivityPage) *ProjectActivityPage
NewProjectActivityPage initializes result type ProjectActivityPage from viewed result type ProjectActivityPage.
type ProjectPayload ¶
ProjectPayload is the payload type of the activity service project method.
type ProjectSummary ¶
type Service ¶
type Service interface { // Station implements station. Station(context.Context, *StationPayload) (res *StationActivityPage, err error) // Project implements project. Project(context.Context, *ProjectPayload) (res *ProjectActivityPage, err error) }
Service is the activity service interface.
type StationActivityPage ¶
type StationActivityPage struct { Activities ActivityEntryCollection Total int32 Page int32 }
StationActivityPage is the result type of the activity service station method.
func NewStationActivityPage ¶
func NewStationActivityPage(vres *activityviews.StationActivityPage) *StationActivityPage
NewStationActivityPage initializes result type StationActivityPage from viewed result type StationActivityPage.
type StationPayload ¶
StationPayload is the payload type of the activity service station method.