Documentation ¶
Index ¶
- func DecodeDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
- func DecodeHeadRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
- func DecodePatchRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
- func DecodePostRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
- func DeleteTusPath(id string) string
- func EncodeDeleteError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeHeadError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeHeadResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeOptionsError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeOptionsResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodePatchError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodePatchResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodePostError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodePostResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func HeadTusPath(id string) string
- func Mount(mux goahttp.Muxer, h *Server)
- func MountDeleteHandler(mux goahttp.Muxer, h http.Handler)
- func MountHeadHandler(mux goahttp.Muxer, h http.Handler)
- func MountOptionsHandler(mux goahttp.Muxer, h http.Handler)
- func MountPatchHandler(mux goahttp.Muxer, h http.Handler)
- func MountPostHandler(mux goahttp.Muxer, h http.Handler)
- func NewDeleteHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewDeletePayload(id string, tusResumable string) *tus.DeletePayload
- func NewHeadHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewHeadPayload(id string, tusResumable string) *tus.HeadPayload
- func NewOptionsHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewPatchHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewPatchPayload(id string, tusResumable string, uploadOffset int64, uploadChecksum *string) *tus.PatchPayload
- func NewPostHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewPostPayload(tusResumable string, uploadLength *int64, uploadDeferLength *int, ...) *tus.PostPayload
- func OptionsTusPath() string
- func PatchTusPath(id string) string
- func PostTusPath() string
- type MountPoint
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeDeleteRequest ¶
func DecodeDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
DecodeDeleteRequest returns a decoder for requests sent to the tus delete endpoint.
func DecodeHeadRequest ¶
func DecodeHeadRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
DecodeHeadRequest returns a decoder for requests sent to the tus head endpoint.
func DecodePatchRequest ¶
func DecodePatchRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
DecodePatchRequest returns a decoder for requests sent to the tus patch endpoint.
func DecodePostRequest ¶
func DecodePostRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (any, error)
DecodePostRequest returns a decoder for requests sent to the tus post endpoint.
func DeleteTusPath ¶
DeleteTusPath returns the URL path to the tus service delete HTTP endpoint.
func EncodeDeleteError ¶
func EncodeDeleteError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeDeleteError returns an encoder for errors returned by the delete tus endpoint.
func EncodeDeleteResponse ¶
func EncodeDeleteResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeDeleteResponse returns an encoder for responses returned by the tus delete endpoint.
func EncodeHeadError ¶
func EncodeHeadError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeHeadError returns an encoder for errors returned by the head tus endpoint.
func EncodeHeadResponse ¶
func EncodeHeadResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeHeadResponse returns an encoder for responses returned by the tus head endpoint.
func EncodeOptionsError ¶
func EncodeOptionsError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeOptionsError returns an encoder for errors returned by the options tus endpoint.
func EncodeOptionsResponse ¶
func EncodeOptionsResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeOptionsResponse returns an encoder for responses returned by the tus options endpoint.
func EncodePatchError ¶
func EncodePatchError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodePatchError returns an encoder for errors returned by the patch tus endpoint.
func EncodePatchResponse ¶
func EncodePatchResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodePatchResponse returns an encoder for responses returned by the tus patch endpoint.
func EncodePostError ¶
func EncodePostError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodePostError returns an encoder for errors returned by the post tus endpoint.
func EncodePostResponse ¶
func EncodePostResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodePostResponse returns an encoder for responses returned by the tus post endpoint.
func HeadTusPath ¶
HeadTusPath returns the URL path to the tus service head HTTP endpoint.
func MountDeleteHandler ¶
MountDeleteHandler configures the mux to serve the "tus" service "delete" endpoint.
func MountHeadHandler ¶
MountHeadHandler configures the mux to serve the "tus" service "head" endpoint.
func MountOptionsHandler ¶
MountOptionsHandler configures the mux to serve the "tus" service "options" endpoint.
func MountPatchHandler ¶
MountPatchHandler configures the mux to serve the "tus" service "patch" endpoint.
func MountPostHandler ¶
MountPostHandler configures the mux to serve the "tus" service "post" endpoint.
func NewDeleteHandler ¶
func NewDeleteHandler( 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
NewDeleteHandler creates a HTTP handler which loads the HTTP request and calls the "tus" service "delete" endpoint.
func NewDeletePayload ¶
func NewDeletePayload(id string, tusResumable string) *tus.DeletePayload
NewDeletePayload builds a tus service delete endpoint payload.
func NewHeadHandler ¶
func NewHeadHandler( 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
NewHeadHandler creates a HTTP handler which loads the HTTP request and calls the "tus" service "head" endpoint.
func NewHeadPayload ¶
func NewHeadPayload(id string, tusResumable string) *tus.HeadPayload
NewHeadPayload builds a tus service head endpoint payload.
func NewOptionsHandler ¶
func NewOptionsHandler( 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
NewOptionsHandler creates a HTTP handler which loads the HTTP request and calls the "tus" service "options" endpoint.
func NewPatchHandler ¶
func NewPatchHandler( 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
NewPatchHandler creates a HTTP handler which loads the HTTP request and calls the "tus" service "patch" endpoint.
func NewPatchPayload ¶
func NewPatchPayload(id string, tusResumable string, uploadOffset int64, uploadChecksum *string) *tus.PatchPayload
NewPatchPayload builds a tus service patch endpoint payload.
func NewPostHandler ¶
func NewPostHandler( 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
NewPostHandler creates a HTTP handler which loads the HTTP request and calls the "tus" service "post" endpoint.
func NewPostPayload ¶
func NewPostPayload(tusResumable string, uploadLength *int64, uploadDeferLength *int, uploadChecksum *string, uploadMetadata *string, tusMaxSize *int64) *tus.PostPayload
NewPostPayload builds a tus service post endpoint payload.
func OptionsTusPath ¶
func OptionsTusPath() string
OptionsTusPath returns the URL path to the tus service options HTTP endpoint.
func PatchTusPath ¶
PatchTusPath returns the URL path to the tus service patch HTTP endpoint.
func PostTusPath ¶
func PostTusPath() string
PostTusPath returns the URL path to the tus service post HTTP endpoint.
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 Server ¶
type Server struct { Mounts []*MountPoint Head http.Handler Patch http.Handler Options http.Handler Post http.Handler Delete http.Handler }
Server lists the tus service endpoint HTTP handlers.
func New ¶
func New( e *tus.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 tus 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.