neatthing

package
v0.0.0-...-d8f6d10 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "neatThing"

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 = [2]string{"neatThingToday", "newNeatThing"}

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 NewNeatThingTodayEndpoint

func NewNeatThingTodayEndpoint(s Service) goa.Endpoint

NewNeatThingTodayEndpoint returns an endpoint function that calls the method "neatThingToday" of service "neatThing".

func NewNewNeatThingEndpoint

func NewNewNeatThingEndpoint(s Service) goa.Endpoint

NewNewNeatThingEndpoint returns an endpoint function that calls the method "newNeatThing" of service "neatThing".

func NewViewedNeatThing

func NewViewedNeatThing(res *NeatThing, view string) *neatthingviews.NeatThing

NewViewedNeatThing initializes viewed result type NeatThing from result type NeatThing using the given view.

Types

type Client

type Client struct {
	NeatThingTodayEndpoint goa.Endpoint
	NewNeatThingEndpoint   goa.Endpoint
}

Client is the "neatThing" service client.

func NewClient

func NewClient(neatThingToday, newNeatThing goa.Endpoint) *Client

NewClient initializes a "neatThing" service client given the endpoints.

func (*Client) NeatThingToday

func (c *Client) NeatThingToday(ctx context.Context) (res *NeatThing, err error)

NeatThingToday calls the "neatThingToday" endpoint of the "neatThing" service.

func (*Client) NewNeatThing

func (c *Client) NewNeatThing(ctx context.Context, p *NeatThing) (res *NeatThing, err error)

NewNeatThing calls the "newNeatThing" endpoint of the "neatThing" service.

type Endpoints

type Endpoints struct {
	NeatThingToday goa.Endpoint
	NewNeatThing   goa.Endpoint
}

Endpoints wraps the "neatThing" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "neatThing" service with endpoints.

func (*Endpoints) Use

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

Use applies the given middleware to all the "neatThing" service endpoints.

type NeatThing

type NeatThing struct {
	// The neat thing
	Name *string
	// What the neat thing is
	Definition *string
	// Illustrative link for the neat thing
	Link *string
	// When this was a neat thing
	Date         *string
	Bibliography []string
}

NeatThing is the result type of the neatThing service neatThingToday method.

func NewNeatThing

func NewNeatThing(vres *neatthingviews.NeatThing) *NeatThing

NewNeatThing initializes result type NeatThing from viewed result type NeatThing.

func (*NeatThing) String

func (nt *NeatThing) String() string

type Service

type Service interface {
	// NeatThingToday implements neatThingToday.
	// The "view" return value must have one of the following views
	//	- "default"
	//	- "full"
	//	- "name"
	//	- "name+definition"
	//	- "name+link"
	NeatThingToday(context.Context) (res *NeatThing, view string, err error)
	// NewNeatThing implements newNeatThing.
	// The "view" return value must have one of the following views
	//	- "default"
	//	- "full"
	//	- "name"
	//	- "name+definition"
	//	- "name+link"
	NewNeatThing(context.Context, *NeatThing) (res *NeatThing, view string, err error)
}

Allows access to discover neat things.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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