Documentation
¶
Index ¶
- func AvailableToolsPath() string
- func DecodeInstallRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
- func DecodeRemoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
- func EncodeAvailableResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeInstallResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeInstalledResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeInstalledheadResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeRemoveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func InstallToolsPath() string
- func InstalledToolsPath() string
- func InstalledheadToolsPath() string
- func Mount(mux goahttp.Muxer, h *Server)
- func MountAvailableHandler(mux goahttp.Muxer, h http.Handler)
- func MountInstallHandler(mux goahttp.Muxer, h http.Handler)
- func MountInstalledHandler(mux goahttp.Muxer, h http.Handler)
- func MountInstalledheadHandler(mux goahttp.Muxer, h http.Handler)
- func MountRemoveHandler(mux goahttp.Muxer, h http.Handler)
- func NewAvailableHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewInstallHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewInstallToolPayload(body *InstallRequestBody) *tools.ToolPayload
- func NewInstalledHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewInstalledheadHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewRemoveHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewRemoveToolPayload(body *RemoveRequestBody, packager string, name string, version string) *tools.ToolPayload
- func RemoveToolsPath(packager string, name string, version string) string
- func ValidateInstallRequestBody(body *InstallRequestBody) (err error)
- type InstallRequestBody
- type InstallResponseBody
- type MountPoint
- type RemoveRequestBody
- type RemoveResponseBody
- type Server
- type ToolResponse
- type ToolResponseCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableToolsPath ¶
func AvailableToolsPath() string
AvailableToolsPath returns the URL path to the tools service available HTTP endpoint.
func DecodeInstallRequest ¶
func DecodeInstallRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
DecodeInstallRequest returns a decoder for requests sent to the tools install endpoint.
func DecodeRemoveRequest ¶
func DecodeRemoveRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
DecodeRemoveRequest returns a decoder for requests sent to the tools remove endpoint.
func EncodeAvailableResponse ¶
func EncodeAvailableResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeAvailableResponse returns an encoder for responses returned by the tools available endpoint.
func EncodeInstallResponse ¶
func EncodeInstallResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeInstallResponse returns an encoder for responses returned by the tools install endpoint.
func EncodeInstalledResponse ¶
func EncodeInstalledResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeInstalledResponse returns an encoder for responses returned by the tools installed endpoint.
func EncodeInstalledheadResponse ¶
func EncodeInstalledheadResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeInstalledheadResponse returns an encoder for responses returned by the tools installedhead endpoint.
func EncodeRemoveResponse ¶
func EncodeRemoveResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeRemoveResponse returns an encoder for responses returned by the tools remove endpoint.
func InstallToolsPath ¶
func InstallToolsPath() string
InstallToolsPath returns the URL path to the tools service install HTTP endpoint.
func InstalledToolsPath ¶
func InstalledToolsPath() string
InstalledToolsPath returns the URL path to the tools service installed HTTP endpoint.
func InstalledheadToolsPath ¶
func InstalledheadToolsPath() string
InstalledheadToolsPath returns the URL path to the tools service installedhead HTTP endpoint.
func MountAvailableHandler ¶
MountAvailableHandler configures the mux to serve the "tools" service "available" endpoint.
func MountInstallHandler ¶
MountInstallHandler configures the mux to serve the "tools" service "install" endpoint.
func MountInstalledHandler ¶
MountInstalledHandler configures the mux to serve the "tools" service "installed" endpoint.
func MountInstalledheadHandler ¶
MountInstalledheadHandler configures the mux to serve the "tools" service "installedhead" endpoint.
func MountRemoveHandler ¶
MountRemoveHandler configures the mux to serve the "tools" service "remove" endpoint.
func NewAvailableHandler ¶
func NewAvailableHandler( 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(ctx context.Context, err error) goahttp.Statuser, ) http.Handler
NewAvailableHandler creates a HTTP handler which loads the HTTP request and calls the "tools" service "available" endpoint.
func NewInstallHandler ¶
func NewInstallHandler( 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(ctx context.Context, err error) goahttp.Statuser, ) http.Handler
NewInstallHandler creates a HTTP handler which loads the HTTP request and calls the "tools" service "install" endpoint.
func NewInstallToolPayload ¶
func NewInstallToolPayload(body *InstallRequestBody) *tools.ToolPayload
NewInstallToolPayload builds a tools service install endpoint payload.
func NewInstalledHandler ¶
func NewInstalledHandler( 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(ctx context.Context, err error) goahttp.Statuser, ) http.Handler
NewInstalledHandler creates a HTTP handler which loads the HTTP request and calls the "tools" service "installed" endpoint.
func NewInstalledheadHandler ¶
func NewInstalledheadHandler( 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(ctx context.Context, err error) goahttp.Statuser, ) http.Handler
NewInstalledheadHandler creates a HTTP handler which loads the HTTP request and calls the "tools" service "installedhead" endpoint.
func NewRemoveHandler ¶
func NewRemoveHandler( 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(ctx context.Context, err error) goahttp.Statuser, ) http.Handler
NewRemoveHandler creates a HTTP handler which loads the HTTP request and calls the "tools" service "remove" endpoint.
func NewRemoveToolPayload ¶
func NewRemoveToolPayload(body *RemoveRequestBody, packager string, name string, version string) *tools.ToolPayload
NewRemoveToolPayload builds a tools service remove endpoint payload.
func RemoveToolsPath ¶
RemoveToolsPath returns the URL path to the tools service remove HTTP endpoint.
func ValidateInstallRequestBody ¶
func ValidateInstallRequestBody(body *InstallRequestBody) (err error)
ValidateInstallRequestBody runs the validations defined on InstallRequestBody
Types ¶
type InstallRequestBody ¶
type InstallRequestBody struct { // The name of the tool Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"` // The version of the tool Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` // The packager of the tool Packager *string `form:"packager,omitempty" json:"packager,omitempty" xml:"packager,omitempty"` // The url where the package can be found. Optional. // If present checksum must also be present. URL *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"` // A checksum of the archive. Mandatory when url is present. // This ensures that the package is downloaded correcly. Checksum *string `form:"checksum,omitempty" json:"checksum,omitempty" xml:"checksum,omitempty"` // The signature used to sign the url. Mandatory when url is present. // This ensure the security of the file downloaded Signature *string `form:"signature,omitempty" json:"signature,omitempty" xml:"signature,omitempty"` }
InstallRequestBody is the type of the "tools" service "install" endpoint HTTP request body.
type InstallResponseBody ¶
type InstallResponseBody struct { // The status of the operation Status string `form:"status" json:"status" xml:"status"` }
InstallResponseBody is the type of the "tools" service "install" endpoint HTTP response body.
func NewInstallResponseBody ¶
func NewInstallResponseBody(res *toolsviews.OperationView) *InstallResponseBody
NewInstallResponseBody builds the HTTP response body from the result of the "install" endpoint of the "tools" 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 RemoveRequestBody ¶
type RemoveRequestBody struct { // The url where the package can be found. Optional. // If present checksum must also be present. URL *string `form:"url,omitempty" json:"url,omitempty" xml:"url,omitempty"` // A checksum of the archive. Mandatory when url is present. // This ensures that the package is downloaded correcly. Checksum *string `form:"checksum,omitempty" json:"checksum,omitempty" xml:"checksum,omitempty"` // The signature used to sign the url. Mandatory when url is present. // This ensure the security of the file downloaded Signature *string `form:"signature,omitempty" json:"signature,omitempty" xml:"signature,omitempty"` }
RemoveRequestBody is the type of the "tools" service "remove" endpoint HTTP request body.
type RemoveResponseBody ¶
type RemoveResponseBody struct { // The status of the operation Status string `form:"status" json:"status" xml:"status"` }
RemoveResponseBody is the type of the "tools" service "remove" endpoint HTTP response body.
func NewRemoveResponseBody ¶
func NewRemoveResponseBody(res *toolsviews.OperationView) *RemoveResponseBody
NewRemoveResponseBody builds the HTTP response body from the result of the "remove" endpoint of the "tools" service.
type Server ¶
type Server struct { Mounts []*MountPoint Available http.Handler Installedhead http.Handler Installed http.Handler Install http.Handler Remove http.Handler }
Server lists the tools service endpoint HTTP handlers.
func New ¶
func New( e *tools.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(ctx context.Context, err error) goahttp.Statuser, ) *Server
New instantiates HTTP handlers for all the tools 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.
func (*Server) MethodNames ¶
MethodNames returns the methods served.
type ToolResponse ¶
type ToolResponse struct { // The name of the tool Name string `form:"name" json:"name" xml:"name"` // The version of the tool Version string `form:"version" json:"version" xml:"version"` // The packager of the tool Packager string `form:"packager" json:"packager" xml:"packager"` }
ToolResponse is used to define fields on response body types.
type ToolResponseCollection ¶
type ToolResponseCollection []*ToolResponse
ToolResponseCollection is the type of the "tools" service "available" endpoint HTTP response body.
func NewToolResponseCollection ¶
func NewToolResponseCollection(res toolsviews.ToolCollectionView) ToolResponseCollection
NewToolResponseCollection builds the HTTP response body from the result of the "available" endpoint of the "tools" service.