dataevents

package
v0.0.0-...-b9360c4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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 DataEvent

type DataEvent struct {
	ID          int64
	CreatedAt   int64
	UpdatedAt   int64
	Author      *PostAuthor
	Title       string
	Description string
	Bookmark    *string
	Start       int64
	End         int64
}

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

type DataEventsPayload struct {
	Auth     *string
	Bookmark string
}

DataEventsPayload is the payload type of the data events service data events method.

type DeleteDataEventPayload

type DeleteDataEventPayload struct {
	Auth    string
	EventID int64
}

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

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "data events" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "data events" service endpoints.

type NewDataEvent

type NewDataEvent struct {
	AllProjectSensors bool
	Bookmark          *string
	Title             string
	Description       string
	Start             int64
	End               int64
}

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL