Documentation ¶
Index ¶
- func DecodeQueryPublishingStatusRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
- func DecodeRequestToPublishRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
- func EncodeQueryPublishingStatusResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeRequestToPublishResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeResetRateLimitResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func Mount(mux goahttp.Muxer, h *Server)
- func MountQueryPublishingStatusHandler(mux goahttp.Muxer, h http.Handler)
- func MountRequestToPublishHandler(mux goahttp.Muxer, h http.Handler)
- func MountResetRateLimitHandler(mux goahttp.Muxer, h http.Handler)
- func NewQueryPublishingStatusHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewQueryPublishingStatusPayload(requestID string) *tiup.QueryPublishingStatusPayload
- func NewRequestToPublishHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewRequestToPublishPayload(body *RequestToPublishRequestBody) *tiup.RequestToPublishPayload
- func NewResetRateLimitHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func QueryPublishingStatusTiupPath(requestID string) string
- func RequestToPublishTiupPath() string
- func ResetRateLimitTiupPath() string
- func ValidateRequestToPublishRequestBody(body *RequestToPublishRequestBody) (err error)
- type MountPoint
- type RequestToPublishRequestBody
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeQueryPublishingStatusRequest ¶
func DecodeQueryPublishingStatusRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
DecodeQueryPublishingStatusRequest returns a decoder for requests sent to the tiup query-publishing-status endpoint.
func DecodeRequestToPublishRequest ¶
func DecodeRequestToPublishRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
DecodeRequestToPublishRequest returns a decoder for requests sent to the tiup request-to-publish endpoint.
func EncodeQueryPublishingStatusResponse ¶
func EncodeQueryPublishingStatusResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeQueryPublishingStatusResponse returns an encoder for responses returned by the tiup query-publishing-status endpoint.
func EncodeRequestToPublishResponse ¶
func EncodeRequestToPublishResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeRequestToPublishResponse returns an encoder for responses returned by the tiup request-to-publish endpoint.
func EncodeResetRateLimitResponse ¶
func EncodeResetRateLimitResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeResetRateLimitResponse returns an encoder for responses returned by the tiup reset-rate-limit endpoint.
func MountQueryPublishingStatusHandler ¶
MountQueryPublishingStatusHandler configures the mux to serve the "tiup" service "query-publishing-status" endpoint.
func MountRequestToPublishHandler ¶
MountRequestToPublishHandler configures the mux to serve the "tiup" service "request-to-publish" endpoint.
func MountResetRateLimitHandler ¶
MountResetRateLimitHandler configures the mux to serve the "tiup" service "reset-rate-limit" endpoint.
func NewQueryPublishingStatusHandler ¶
func NewQueryPublishingStatusHandler( 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
NewQueryPublishingStatusHandler creates a HTTP handler which loads the HTTP request and calls the "tiup" service "query-publishing-status" endpoint.
func NewQueryPublishingStatusPayload ¶
func NewQueryPublishingStatusPayload(requestID string) *tiup.QueryPublishingStatusPayload
NewQueryPublishingStatusPayload builds a tiup service query-publishing-status endpoint payload.
func NewRequestToPublishHandler ¶
func NewRequestToPublishHandler( 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
NewRequestToPublishHandler creates a HTTP handler which loads the HTTP request and calls the "tiup" service "request-to-publish" endpoint.
func NewRequestToPublishPayload ¶
func NewRequestToPublishPayload(body *RequestToPublishRequestBody) *tiup.RequestToPublishPayload
NewRequestToPublishPayload builds a tiup service request-to-publish endpoint payload.
func NewResetRateLimitHandler ¶
func NewResetRateLimitHandler( 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
NewResetRateLimitHandler creates a HTTP handler which loads the HTTP request and calls the "tiup" service "reset-rate-limit" endpoint.
func QueryPublishingStatusTiupPath ¶
QueryPublishingStatusTiupPath returns the URL path to the tiup service query-publishing-status HTTP endpoint.
func RequestToPublishTiupPath ¶
func RequestToPublishTiupPath() string
RequestToPublishTiupPath returns the URL path to the tiup service request-to-publish HTTP endpoint.
func ResetRateLimitTiupPath ¶
func ResetRateLimitTiupPath() string
ResetRateLimitTiupPath returns the URL path to the tiup service reset-rate-limit HTTP endpoint.
func ValidateRequestToPublishRequestBody ¶
func ValidateRequestToPublishRequestBody(body *RequestToPublishRequestBody) (err error)
ValidateRequestToPublishRequestBody runs the validations defined on Request-To-PublishRequestBody
Types ¶
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 RequestToPublishRequestBody ¶
type RequestToPublishRequestBody struct { // The full url of the pushed OCI artifact, contain the tag part. It will parse // the repo from it. ArtifactURL *string `form:"artifact_url,omitempty" json:"artifact_url,omitempty" xml:"artifact_url,omitempty"` // Force set the version. Default is the artifact version read from // `org.opencontainers.image.version` of the manifest config. Version *string `form:"version,omitempty" json:"version,omitempty" xml:"version,omitempty"` // Staging is http://tiup.pingcap.net:8988, product is // http://tiup.pingcap.net:8987. TiupMirror *string `form:"tiup-mirror,omitempty" json:"tiup-mirror,omitempty" xml:"tiup-mirror,omitempty"` // The request id RequestID *string `form:"request_id,omitempty" json:"request_id,omitempty" xml:"request_id,omitempty"` }
RequestToPublishRequestBody is the type of the "tiup" service "request-to-publish" endpoint HTTP request body.
type Server ¶
type Server struct { Mounts []*MountPoint RequestToPublish http.Handler QueryPublishingStatus http.Handler ResetRateLimit http.Handler }
Server lists the tiup service endpoint HTTP handlers.
func New ¶
func New( e *tiup.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 tiup 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.