Documentation
¶
Index ¶
- func ByCatalogKindNameResourcePath(catalog string, kind string, name string) string
- func ByCatalogKindNameVersionResourcePath(catalog string, kind string, name string, version string) string
- func ByIDResourcePath(id uint) string
- func ByVersionIDResourcePath(versionID uint) string
- func DecodeByCatalogKindNameRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeByCatalogKindNameVersionRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeByIDRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeByVersionIDRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeQueryRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func DecodeVersionsByIDRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
- func EncodeByCatalogKindNameResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeByCatalogKindNameVersionResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeByIDResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeByVersionIDResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeQueryResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func EncodeVersionsByIDResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
- func HandleResourceOrigin(h http.Handler) http.Handler
- func ListResourcePath() string
- func Mount(mux goahttp.Muxer, h *Server)
- func MountByCatalogKindNameHandler(mux goahttp.Muxer, h http.Handler)
- func MountByCatalogKindNameVersionHandler(mux goahttp.Muxer, h http.Handler)
- func MountByIDHandler(mux goahttp.Muxer, h http.Handler)
- func MountByVersionIDHandler(mux goahttp.Muxer, h http.Handler)
- func MountCORSHandler(mux goahttp.Muxer, h http.Handler)
- func MountListHandler(mux goahttp.Muxer, h http.Handler)
- func MountQueryHandler(mux goahttp.Muxer, h http.Handler)
- func MountVersionsByIDHandler(mux goahttp.Muxer, h http.Handler)
- func NewByCatalogKindNameHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewByCatalogKindNamePayload(catalog string, kind string, name string, pipelinesversion *string) *resource.ByCatalogKindNamePayload
- func NewByCatalogKindNameVersionHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewByCatalogKindNameVersionPayload(catalog string, kind string, name string, version string) *resource.ByCatalogKindNameVersionPayload
- func NewByIDHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewByIDPayload(id uint) *resource.ByIDPayload
- func NewByVersionIDHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewByVersionIDPayload(versionID uint) *resource.ByVersionIDPayload
- func NewCORSHandler() http.Handler
- func NewListHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewQueryHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewQueryPayload(name string, catalogs []string, categories []string, kinds []string, ...) *resource.QueryPayload
- func NewVersionsByIDHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewVersionsByIDPayload(id uint) *resource.VersionsByIDPayload
- func QueryResourcePath() string
- func VersionsByIDResourcePath(id uint) string
- type CatalogResponseBodyMin
- type CategoryResponseBody
- type ErrorNamer
- type ListResponseBody
- type MountPoint
- type PlatformResponseBody
- type ResourceDataResponseBodyWithoutVersion
- type ResourceDataResponseBodyWithoutVersionCollection
- type ResourceVersionDataResponseBodyWithoutResource
- type Server
- type TagResponseBody
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByCatalogKindNameResourcePath ¶ added in v1.7.2
ByCatalogKindNameResourcePath returns the URL path to the resource service ByCatalogKindName HTTP endpoint.
func ByCatalogKindNameVersionResourcePath ¶ added in v1.7.2
func ByCatalogKindNameVersionResourcePath(catalog string, kind string, name string, version string) string
ByCatalogKindNameVersionResourcePath returns the URL path to the resource service ByCatalogKindNameVersion HTTP endpoint.
func ByIDResourcePath ¶ added in v1.7.2
ByIDResourcePath returns the URL path to the resource service ById HTTP endpoint.
func ByVersionIDResourcePath ¶ added in v1.7.2
ByVersionIDResourcePath returns the URL path to the resource service ByVersionId HTTP endpoint.
func DecodeByCatalogKindNameRequest ¶ added in v1.7.2
func DecodeByCatalogKindNameRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeByCatalogKindNameRequest returns a decoder for requests sent to the resource ByCatalogKindName endpoint.
func DecodeByCatalogKindNameVersionRequest ¶ added in v1.7.2
func DecodeByCatalogKindNameVersionRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeByCatalogKindNameVersionRequest returns a decoder for requests sent to the resource ByCatalogKindNameVersion endpoint.
func DecodeByIDRequest ¶ added in v1.7.2
func DecodeByIDRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeByIDRequest returns a decoder for requests sent to the resource ById endpoint.
func DecodeByVersionIDRequest ¶ added in v1.7.2
func DecodeByVersionIDRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeByVersionIDRequest returns a decoder for requests sent to the resource ByVersionId endpoint.
func DecodeQueryRequest ¶ added in v1.7.2
func DecodeQueryRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeQueryRequest returns a decoder for requests sent to the resource Query endpoint.
func DecodeVersionsByIDRequest ¶
func DecodeVersionsByIDRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (interface{}, error)
DecodeVersionsByIDRequest returns a decoder for requests sent to the resource VersionsByID endpoint.
func EncodeByCatalogKindNameResponse ¶ added in v1.7.2
func EncodeByCatalogKindNameResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeByCatalogKindNameResponse returns an encoder for responses returned by the resource ByCatalogKindName endpoint.
func EncodeByCatalogKindNameVersionResponse ¶ added in v1.7.2
func EncodeByCatalogKindNameVersionResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeByCatalogKindNameVersionResponse returns an encoder for responses returned by the resource ByCatalogKindNameVersion endpoint.
func EncodeByIDResponse ¶ added in v1.7.2
func EncodeByIDResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeByIDResponse returns an encoder for responses returned by the resource ById endpoint.
func EncodeByVersionIDResponse ¶ added in v1.7.2
func EncodeByVersionIDResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeByVersionIDResponse returns an encoder for responses returned by the resource ByVersionId endpoint.
func EncodeQueryResponse ¶ added in v1.7.2
func EncodeQueryResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeQueryResponse returns an encoder for responses returned by the resource Query endpoint.
func EncodeVersionsByIDResponse ¶
func EncodeVersionsByIDResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, interface{}) error
EncodeVersionsByIDResponse returns an encoder for responses returned by the resource VersionsByID endpoint.
func HandleResourceOrigin ¶ added in v1.8.0
HandleResourceOrigin applies the CORS response headers corresponding to the origin for the service resource.
func ListResourcePath ¶
func ListResourcePath() string
ListResourcePath returns the URL path to the resource service List HTTP endpoint.
func MountByCatalogKindNameHandler ¶ added in v1.7.2
MountByCatalogKindNameHandler configures the mux to serve the "resource" service "ByCatalogKindName" endpoint.
func MountByCatalogKindNameVersionHandler ¶ added in v1.7.2
MountByCatalogKindNameVersionHandler configures the mux to serve the "resource" service "ByCatalogKindNameVersion" endpoint.
func MountByIDHandler ¶ added in v1.7.2
MountByIDHandler configures the mux to serve the "resource" service "ById" endpoint.
func MountByVersionIDHandler ¶ added in v1.7.2
MountByVersionIDHandler configures the mux to serve the "resource" service "ByVersionId" endpoint.
func MountCORSHandler ¶
MountCORSHandler configures the mux to serve the CORS endpoints for the service resource.
func MountListHandler ¶
MountListHandler configures the mux to serve the "resource" service "List" endpoint.
func MountQueryHandler ¶ added in v1.7.2
MountQueryHandler configures the mux to serve the "resource" service "Query" endpoint.
func MountVersionsByIDHandler ¶
MountVersionsByIDHandler configures the mux to serve the "resource" service "VersionsByID" endpoint.
func NewByCatalogKindNameHandler ¶ added in v1.7.2
func NewByCatalogKindNameHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewByCatalogKindNameHandler creates a HTTP handler which loads the HTTP request and calls the "resource" service "ByCatalogKindName" endpoint.
func NewByCatalogKindNamePayload ¶ added in v1.7.2
func NewByCatalogKindNamePayload(catalog string, kind string, name string, pipelinesversion *string) *resource.ByCatalogKindNamePayload
NewByCatalogKindNamePayload builds a resource service ByCatalogKindName endpoint payload.
func NewByCatalogKindNameVersionHandler ¶ added in v1.7.2
func NewByCatalogKindNameVersionHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewByCatalogKindNameVersionHandler creates a HTTP handler which loads the HTTP request and calls the "resource" service "ByCatalogKindNameVersion" endpoint.
func NewByCatalogKindNameVersionPayload ¶ added in v1.7.2
func NewByCatalogKindNameVersionPayload(catalog string, kind string, name string, version string) *resource.ByCatalogKindNameVersionPayload
NewByCatalogKindNameVersionPayload builds a resource service ByCatalogKindNameVersion endpoint payload.
func NewByIDHandler ¶ added in v1.7.2
func NewByIDHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewByIDHandler creates a HTTP handler which loads the HTTP request and calls the "resource" service "ById" endpoint.
func NewByIDPayload ¶ added in v1.7.2
func NewByIDPayload(id uint) *resource.ByIDPayload
NewByIDPayload builds a resource service ById endpoint payload.
func NewByVersionIDHandler ¶ added in v1.7.2
func NewByVersionIDHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewByVersionIDHandler creates a HTTP handler which loads the HTTP request and calls the "resource" service "ByVersionId" endpoint.
func NewByVersionIDPayload ¶ added in v1.7.2
func NewByVersionIDPayload(versionID uint) *resource.ByVersionIDPayload
NewByVersionIDPayload builds a resource service ByVersionId endpoint payload.
func NewCORSHandler ¶
NewCORSHandler creates a HTTP handler which returns a simple 200 response.
func NewListHandler ¶
func NewListHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewListHandler creates a HTTP handler which loads the HTTP request and calls the "resource" service "List" endpoint.
func NewQueryHandler ¶ added in v1.7.2
func NewQueryHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewQueryHandler creates a HTTP handler which loads the HTTP request and calls the "resource" service "Query" endpoint.
func NewQueryPayload ¶ added in v1.7.2
func NewQueryPayload(name string, catalogs []string, categories []string, kinds []string, tags []string, platforms []string, limit uint, match string) *resource.QueryPayload
NewQueryPayload builds a resource service Query endpoint payload.
func NewVersionsByIDHandler ¶
func NewVersionsByIDHandler( endpoint goa.Endpoint, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) http.Handler
NewVersionsByIDHandler creates a HTTP handler which loads the HTTP request and calls the "resource" service "VersionsByID" endpoint.
func NewVersionsByIDPayload ¶
func NewVersionsByIDPayload(id uint) *resource.VersionsByIDPayload
NewVersionsByIDPayload builds a resource service VersionsByID endpoint payload.
func QueryResourcePath ¶ added in v1.7.2
func QueryResourcePath() string
QueryResourcePath returns the URL path to the resource service Query HTTP endpoint.
func VersionsByIDResourcePath ¶
VersionsByIDResourcePath returns the URL path to the resource service VersionsByID HTTP endpoint.
Types ¶
type CatalogResponseBodyMin ¶
type CatalogResponseBodyMin struct { // ID is the unique id of the catalog ID uint `form:"id" json:"id" xml:"id"` // Name of catalog Name string `form:"name" json:"name" xml:"name"` // Type of catalog Type string `form:"type" json:"type" xml:"type"` }
CatalogResponseBodyMin is used to define fields on response body types.
type CategoryResponseBody ¶
type CategoryResponseBody struct { // ID is the unique id of the category ID uint `form:"id" json:"id" xml:"id"` // Name of category Name string `form:"name" json:"name" xml:"name"` }
CategoryResponseBody is used to define fields on response body 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 ListResponseBody ¶
type ListResponseBody struct {
Data ResourceDataResponseBodyWithoutVersionCollection `form:"data" json:"data" xml:"data"`
}
ListResponseBody is the type of the "resource" service "List" endpoint HTTP response body.
func NewListResponseBody ¶
func NewListResponseBody(res *resourceviews.ResourcesView) *ListResponseBody
NewListResponseBody builds the HTTP response body from the result of the "List" endpoint of the "resource" service.
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 PlatformResponseBody ¶
type PlatformResponseBody struct { // ID is the unique id of platform ID uint `form:"id" json:"id" xml:"id"` // Name of platform Name string `form:"name" json:"name" xml:"name"` }
PlatformResponseBody is used to define fields on response body types.
type ResourceDataResponseBodyWithoutVersion ¶
type ResourceDataResponseBodyWithoutVersion struct { // ID is the unique id of the resource ID uint `form:"id" json:"id" xml:"id"` // Name of resource Name string `form:"name" json:"name" xml:"name"` // Type of catalog to which resource belongs Catalog *CatalogResponseBodyMin `form:"catalog" json:"catalog" xml:"catalog"` // Categories related to resource Categories []*CategoryResponseBody `form:"categories" json:"categories" xml:"categories"` // Kind of resource Kind string `form:"kind" json:"kind" xml:"kind"` // Url path of the resource in hub HubURLPath string `form:"hubURLPath" json:"hubURLPath" xml:"hubURLPath"` // Latest version of resource LatestVersion *ResourceVersionDataResponseBodyWithoutResource `form:"latestVersion" json:"latestVersion" xml:"latestVersion"` // Tags related to resource Tags []*TagResponseBody `form:"tags" json:"tags" xml:"tags"` // Platforms related to resource Platforms []*PlatformResponseBody `form:"platforms" json:"platforms" xml:"platforms"` // Rating of resource Rating float64 `form:"rating" json:"rating" xml:"rating"` }
ResourceDataResponseBodyWithoutVersion is used to define fields on response body types.
type ResourceDataResponseBodyWithoutVersionCollection ¶
type ResourceDataResponseBodyWithoutVersionCollection []*ResourceDataResponseBodyWithoutVersion
ResourceDataResponseBodyWithoutVersionCollection is used to define fields on response body types.
type ResourceVersionDataResponseBodyWithoutResource ¶
type ResourceVersionDataResponseBodyWithoutResource struct { // ID is the unique id of resource's version ID uint `form:"id" json:"id" xml:"id"` // Version of resource Version string `form:"version" json:"version" xml:"version"` // Display name of version DisplayName string `form:"displayName" json:"displayName" xml:"displayName"` // Deprecation status of a version Deprecated *bool `form:"deprecated,omitempty" json:"deprecated,omitempty" xml:"deprecated,omitempty"` // Description of version Description string `form:"description" json:"description" xml:"description"` // Minimum pipelines version the resource's version is compatible with MinPipelinesVersion string `form:"minPipelinesVersion" json:"minPipelinesVersion" xml:"minPipelinesVersion"` // Raw URL of resource's yaml file of the version RawURL string `form:"rawURL" json:"rawURL" xml:"rawURL"` // Web URL of resource's yaml file of the version WebURL string `form:"webURL" json:"webURL" xml:"webURL"` // Url path of the resource in hub HubURLPath string `form:"hubURLPath" json:"hubURLPath" xml:"hubURLPath"` // Timestamp when version was last updated UpdatedAt string `form:"updatedAt" json:"updatedAt" xml:"updatedAt"` // Platforms related to resource version Platforms []*PlatformResponseBody `form:"platforms" json:"platforms" xml:"platforms"` }
ResourceVersionDataResponseBodyWithoutResource is used to define fields on response body types.
type Server ¶
type Server struct { Mounts []*MountPoint Query http.Handler List http.Handler VersionsByID http.Handler ByCatalogKindNameVersion http.Handler ByVersionID http.Handler ByCatalogKindName http.Handler ByID http.Handler CORS http.Handler }
Server lists the resource service endpoint HTTP handlers.
func New ¶
func New( e *resource.Endpoints, mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder, encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, errhandler func(context.Context, http.ResponseWriter, error), formatter func(err error) goahttp.Statuser, ) *Server
New instantiates HTTP handlers for all the resource service endpoints using the provided encoder and decoder. The handlers are mounted on the given mux using the HTTP verb and path defined in the design. errhandler is called whenever a response fails to be encoded. formatter is used to format errors returned by the service methods prior to encoding. Both errhandler and formatter are optional and can be nil.
type TagResponseBody ¶
type TagResponseBody struct { // ID is the unique id of tag ID uint `form:"id" json:"id" xml:"id"` // Name of tag Name string `form:"name" json:"name" xml:"name"` }
TagResponseBody is used to define fields on response body types.