Documentation
¶
Index ¶
Constants ¶
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 ¶
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 ¶
NewNeatThingTodayEndpoint returns an endpoint function that calls the method "neatThingToday" of service "neatThing".
func NewNewNeatThingEndpoint ¶
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 ¶
Client is the "neatThing" service client.
func (*Client) NeatThingToday ¶
NeatThingToday calls the "neatThingToday" endpoint of the "neatThing" service.
type Endpoints ¶
Endpoints wraps the "neatThing" service endpoints.
func NewEndpoints ¶
NewEndpoints wraps the methods of the "neatThing" service with 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.
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.