server

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeNewNeatThingRequest

func DecodeNewNeatThingRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)

DecodeNewNeatThingRequest returns a decoder for requests sent to the neatThing newNeatThing endpoint.

func EncodeNeatThingTodayResponse

func EncodeNeatThingTodayResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeNeatThingTodayResponse returns an encoder for responses returned by the neatThing neatThingToday endpoint.

func EncodeNewNeatThingResponse

func EncodeNewNeatThingResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error

EncodeNewNeatThingResponse returns an encoder for responses returned by the neatThing newNeatThing endpoint.

func Mount

func Mount(mux goahttp.Muxer, h *Server)

Mount configures the mux to serve the neatThing endpoints.

func MountGenHTTPOpenapiJSON

func MountGenHTTPOpenapiJSON(mux goahttp.Muxer, h http.Handler)

MountGenHTTPOpenapiJSON configures the mux to serve GET request made to "/openapi.json".

func MountNeatThingTodayHandler

func MountNeatThingTodayHandler(mux goahttp.Muxer, h http.Handler)

MountNeatThingTodayHandler configures the mux to serve the "neatThing" service "neatThingToday" endpoint.

func MountNewNeatThingHandler

func MountNewNeatThingHandler(mux goahttp.Muxer, h http.Handler)

MountNewNeatThingHandler configures the mux to serve the "neatThing" service "newNeatThing" endpoint.

func NeatThingTodayNeatThingPath

func NeatThingTodayNeatThingPath() string

NeatThingTodayNeatThingPath returns the URL path to the neatThing service neatThingToday HTTP endpoint.

func NewNeatThingNeatThingPath

func NewNeatThingNeatThingPath() string

NewNeatThingNeatThingPath returns the URL path to the neatThing service newNeatThing HTTP endpoint.

func NewNeatThingTodayHandler

func NewNeatThingTodayHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	dec func(*http.Request) goahttp.Decoder,
	enc func(context.Context, http.ResponseWriter) goahttp.Encoder,
	eh func(context.Context, http.ResponseWriter, error),
) http.Handler

NewNeatThingTodayHandler creates a HTTP handler which loads the HTTP request and calls the "neatThing" service "neatThingToday" endpoint.

func NewNewNeatThingHandler

func NewNewNeatThingHandler(
	endpoint goa.Endpoint,
	mux goahttp.Muxer,
	dec func(*http.Request) goahttp.Decoder,
	enc func(context.Context, http.ResponseWriter) goahttp.Encoder,
	eh func(context.Context, http.ResponseWriter, error),
) http.Handler

NewNewNeatThingHandler creates a HTTP handler which loads the HTTP request and calls the "neatThing" service "newNeatThing" endpoint.

func NewNewNeatThingNeatThing

func NewNewNeatThingNeatThing(body *NewNeatThingRequestBody) *neatthing.NeatThing

NewNewNeatThingNeatThing builds a neatThing service newNeatThing endpoint payload.

func ValidateNewNeatThingRequestBody

func ValidateNewNeatThingRequestBody(body *NewNeatThingRequestBody) (err error)

ValidateNewNeatThingRequestBody runs the validations defined on NewNeatThingRequestBody

Types

type ErrorNamer

type ErrorNamer interface {
	ErrorName() string
}

ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the design.

type MountPoint

type MountPoint struct {
	// Method is the name of the service method served by the mounted HTTP handler.
	Method string
	// Verb is the HTTP method used to match requests to the mounted handler.
	Verb string
	// Pattern is the HTTP request path pattern used to match requests to the
	// mounted handler.
	Pattern string
}

MountPoint holds information about the mounted endpoints.

type NeatThingTodayResponseBody

type NeatThingTodayResponseBody struct {
	// The neat thing
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// What the neat thing is
	Definition *string `form:"definition,omitempty" json:"definition,omitempty" xml:"definition,omitempty"`
	// Illustrative link for the neat thing
	Link *string `form:"link,omitempty" json:"link,omitempty" xml:"link,omitempty"`
}

NeatThingTodayResponseBody is the type of the "neatThing" service "neatThingToday" endpoint HTTP response body.

func NewNeatThingTodayResponseBody

func NewNeatThingTodayResponseBody(res *neatthingviews.NeatThingView) *NeatThingTodayResponseBody

NewNeatThingTodayResponseBody builds the HTTP response body from the result of the "neatThingToday" endpoint of the "neatThing" service.

type NeatThingTodayResponseBodyFull

type NeatThingTodayResponseBodyFull struct {
	// The neat thing
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// What the neat thing is
	Definition *string `form:"definition,omitempty" json:"definition,omitempty" xml:"definition,omitempty"`
	// Illustrative link for the neat thing
	Link *string `form:"link,omitempty" json:"link,omitempty" xml:"link,omitempty"`
	// When this was a neat thing
	Date         *string  `form:"date,omitempty" json:"date,omitempty" xml:"date,omitempty"`
	Bibliography []string `form:"bibliography,omitempty" json:"bibliography,omitempty" xml:"bibliography,omitempty"`
}

NeatThingTodayResponseBodyFull is the type of the "neatThing" service "neatThingToday" endpoint HTTP response body.

func NewNeatThingTodayResponseBodyFull

func NewNeatThingTodayResponseBodyFull(res *neatthingviews.NeatThingView) *NeatThingTodayResponseBodyFull

NewNeatThingTodayResponseBodyFull builds the HTTP response body from the result of the "neatThingToday" endpoint of the "neatThing" service.

type NeatThingTodayResponseBodyName

type NeatThingTodayResponseBodyName struct {
	// The neat thing
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
}

NeatThingTodayResponseBodyName is the type of the "neatThing" service "neatThingToday" endpoint HTTP response body.

func NewNeatThingTodayResponseBodyName

func NewNeatThingTodayResponseBodyName(res *neatthingviews.NeatThingView) *NeatThingTodayResponseBodyName

NewNeatThingTodayResponseBodyName builds the HTTP response body from the result of the "neatThingToday" endpoint of the "neatThing" service.

type NeatThingTodayResponseBodyNameDefinition

type NeatThingTodayResponseBodyNameDefinition struct {
	// The neat thing
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// What the neat thing is
	Definition *string `form:"definition,omitempty" json:"definition,omitempty" xml:"definition,omitempty"`
}

NeatThingTodayResponseBodyNameDefinition is the type of the "neatThing" service "neatThingToday" endpoint HTTP response body.

func NewNeatThingTodayResponseBodyNameDefinition

func NewNeatThingTodayResponseBodyNameDefinition(res *neatthingviews.NeatThingView) *NeatThingTodayResponseBodyNameDefinition

NewNeatThingTodayResponseBodyNameDefinition builds the HTTP response body from the result of the "neatThingToday" endpoint of the "neatThing" service.

type NeatThingTodayResponseBodyNameLink struct {
	// The neat thing
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// Illustrative link for the neat thing
	Link *string `form:"link,omitempty" json:"link,omitempty" xml:"link,omitempty"`
}

NeatThingTodayResponseBodyNameLink is the type of the "neatThing" service "neatThingToday" endpoint HTTP response body.

func NewNeatThingTodayResponseBodyNameLink(res *neatthingviews.NeatThingView) *NeatThingTodayResponseBodyNameLink

NewNeatThingTodayResponseBodyNameLink builds the HTTP response body from the result of the "neatThingToday" endpoint of the "neatThing" service.

type NewNeatThingRequestBody

type NewNeatThingRequestBody struct {
	// The neat thing
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// What the neat thing is
	Definition *string `form:"definition,omitempty" json:"definition,omitempty" xml:"definition,omitempty"`
	// Illustrative link for the neat thing
	Link *string `form:"link,omitempty" json:"link,omitempty" xml:"link,omitempty"`
	// When this was a neat thing
	Date         *string  `form:"date,omitempty" json:"date,omitempty" xml:"date,omitempty"`
	Bibliography []string `form:"bibliography,omitempty" json:"bibliography,omitempty" xml:"bibliography,omitempty"`
}

NewNeatThingRequestBody is the type of the "neatThing" service "newNeatThing" endpoint HTTP request body.

type NewNeatThingResponseBodyFull

type NewNeatThingResponseBodyFull struct {
	// The neat thing
	Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
	// What the neat thing is
	Definition *string `form:"definition,omitempty" json:"definition,omitempty" xml:"definition,omitempty"`
	// Illustrative link for the neat thing
	Link *string `form:"link,omitempty" json:"link,omitempty" xml:"link,omitempty"`
	// When this was a neat thing
	Date         *string  `form:"date,omitempty" json:"date,omitempty" xml:"date,omitempty"`
	Bibliography []string `form:"bibliography,omitempty" json:"bibliography,omitempty" xml:"bibliography,omitempty"`
}

NewNeatThingResponseBodyFull is the type of the "neatThing" service "newNeatThing" endpoint HTTP response body.

func NewNewNeatThingResponseBodyFull

func NewNewNeatThingResponseBodyFull(res *neatthingviews.NeatThingView) *NewNeatThingResponseBodyFull

NewNewNeatThingResponseBodyFull builds the HTTP response body from the result of the "newNeatThing" endpoint of the "neatThing" service.

type Server

type Server struct {
	Mounts         []*MountPoint
	NeatThingToday http.Handler
	NewNeatThing   http.Handler
}

Server lists the neatThing service endpoint HTTP handlers.

func New

New instantiates HTTP handlers for all the neatThing service endpoints.

func (*Server) Service

func (s *Server) Service() string

Service returns the name of the service served.

func (*Server) Use

func (s *Server) Use(m func(http.Handler) http.Handler)

Use wraps the server handlers with the given middleware.

Jump to

Keyboard shortcuts

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