Documentation
¶
Index ¶
- func CreateSshkeysPath() string
- func DecodeCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*sshkeys.CreateSSHKeyPayload, error)
- func DecodeDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*sshkeys.DeletePayload, error)
- func DecodeGetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*sshkeys.GetPayload, error)
- func DecodeListRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*sshkeys.ListPayload, error)
- func DeleteSshkeysPath(name string) string
- func EncodeCreateError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- 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 EncodeGetError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, ...) func(context.Context, http.ResponseWriter, error) error
- func EncodeGetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
- func GetSshkeysPath(name string) string
- func ListSshkeysPath() string
- func Mount(mux goahttp.Muxer, h *Server)
- func MountCreateHandler(mux goahttp.Muxer, h http.Handler)
- func MountDeleteHandler(mux goahttp.Muxer, h http.Handler)
- func MountGetHandler(mux goahttp.Muxer, h http.Handler)
- func MountListHandler(mux goahttp.Muxer, h http.Handler)
- func NewCreateHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewCreateSSHKeyPayload(body *CreateRequestBody) *sshkeys.CreateSSHKeyPayload
- func NewDeleteHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewDeletePayload(name string, namespace *string) *sshkeys.DeletePayload
- func NewGetHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewGetPayload(name string, namespace *string) *sshkeys.GetPayload
- func NewListHandler(endpoint goa.Endpoint, mux goahttp.Muxer, ...) http.Handler
- func NewListPayload(namespace *string) *sshkeys.ListPayload
- func ValidateCreateRequestBody(body *CreateRequestBody) (err error)
- type CreateRequestBody
- type CreateResponseBody
- type GetResponseBody
- type ListResponseBody
- type MountPoint
- type Server
- type SshkeyResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSshkeysPath ¶
func CreateSshkeysPath() string
CreateSshkeysPath returns the URL path to the sshkeys service create HTTP endpoint.
func DecodeCreateRequest ¶
func DecodeCreateRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*sshkeys.CreateSSHKeyPayload, error)
DecodeCreateRequest returns a decoder for requests sent to the sshkeys create endpoint.
func DecodeDeleteRequest ¶
func DecodeDeleteRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*sshkeys.DeletePayload, error)
DecodeDeleteRequest returns a decoder for requests sent to the sshkeys delete endpoint.
func DecodeGetRequest ¶
func DecodeGetRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*sshkeys.GetPayload, error)
DecodeGetRequest returns a decoder for requests sent to the sshkeys get endpoint.
func DecodeListRequest ¶
func DecodeListRequest(mux goahttp.Muxer, decoder func(*http.Request) goahttp.Decoder) func(*http.Request) (*sshkeys.ListPayload, error)
DecodeListRequest returns a decoder for requests sent to the sshkeys list endpoint.
func DeleteSshkeysPath ¶
DeleteSshkeysPath returns the URL path to the sshkeys service delete HTTP endpoint.
func EncodeCreateError ¶
func EncodeCreateError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeCreateError returns an encoder for errors returned by the create sshkeys endpoint.
func EncodeCreateResponse ¶
func EncodeCreateResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeCreateResponse returns an encoder for responses returned by the sshkeys create 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 sshkeys 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 sshkeys delete endpoint.
func EncodeGetError ¶
func EncodeGetError(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder, formatter func(ctx context.Context, err error) goahttp.Statuser) func(context.Context, http.ResponseWriter, error) error
EncodeGetError returns an encoder for errors returned by the get sshkeys endpoint.
func EncodeGetResponse ¶
func EncodeGetResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeGetResponse returns an encoder for responses returned by the sshkeys get endpoint.
func EncodeListResponse ¶
func EncodeListResponse(encoder func(context.Context, http.ResponseWriter) goahttp.Encoder) func(context.Context, http.ResponseWriter, any) error
EncodeListResponse returns an encoder for responses returned by the sshkeys list endpoint.
func GetSshkeysPath ¶
GetSshkeysPath returns the URL path to the sshkeys service get HTTP endpoint.
func ListSshkeysPath ¶
func ListSshkeysPath() string
ListSshkeysPath returns the URL path to the sshkeys service list HTTP endpoint.
func MountCreateHandler ¶
MountCreateHandler configures the mux to serve the "sshkeys" service "create" endpoint.
func MountDeleteHandler ¶
MountDeleteHandler configures the mux to serve the "sshkeys" service "delete" endpoint.
func MountGetHandler ¶
MountGetHandler configures the mux to serve the "sshkeys" service "get" endpoint.
func MountListHandler ¶
MountListHandler configures the mux to serve the "sshkeys" service "list" endpoint.
func NewCreateHandler ¶
func NewCreateHandler( 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
NewCreateHandler creates a HTTP handler which loads the HTTP request and calls the "sshkeys" service "create" endpoint.
func NewCreateSSHKeyPayload ¶
func NewCreateSSHKeyPayload(body *CreateRequestBody) *sshkeys.CreateSSHKeyPayload
NewCreateSSHKeyPayload builds a sshkeys service create endpoint payload.
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 "sshkeys" service "delete" endpoint.
func NewDeletePayload ¶
func NewDeletePayload(name string, namespace *string) *sshkeys.DeletePayload
NewDeletePayload builds a sshkeys service delete endpoint payload.
func NewGetHandler ¶
func NewGetHandler( 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
NewGetHandler creates a HTTP handler which loads the HTTP request and calls the "sshkeys" service "get" endpoint.
func NewGetPayload ¶
func NewGetPayload(name string, namespace *string) *sshkeys.GetPayload
NewGetPayload builds a sshkeys service get endpoint payload.
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(ctx context.Context, err error) goahttp.Statuser, ) http.Handler
NewListHandler creates a HTTP handler which loads the HTTP request and calls the "sshkeys" service "list" endpoint.
func NewListPayload ¶
func NewListPayload(namespace *string) *sshkeys.ListPayload
NewListPayload builds a sshkeys service list endpoint payload.
func ValidateCreateRequestBody ¶
func ValidateCreateRequestBody(body *CreateRequestBody) (err error)
ValidateCreateRequestBody runs the validations defined on CreateRequestBody
Types ¶
type CreateRequestBody ¶
type CreateRequestBody struct {
// Resource name for the SshKey CR
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Target namespace (defaults to the user's personal namespace)
Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
// Human-friendly label for the key
KeyName *string `form:"key_name,omitempty" json:"key_name,omitempty" xml:"key_name,omitempty"`
// SSH public key line (e.g. ssh-ed25519 AAAA... user@host)
PublicKey *string `form:"public_key,omitempty" json:"public_key,omitempty" xml:"public_key,omitempty"`
}
CreateRequestBody is the type of the "sshkeys" service "create" endpoint HTTP request body.
type CreateResponseBody ¶
type CreateResponseBody struct {
// Resource name of the SshKey CR
Name string `form:"name" json:"name" xml:"name"`
// Kubernetes namespace
Namespace string `form:"namespace" json:"namespace" xml:"namespace"`
// Human-friendly label
KeyName *string `form:"key_name,omitempty" json:"key_name,omitempty" xml:"key_name,omitempty"`
// SSH public key line
PublicKey string `form:"public_key" json:"public_key" xml:"public_key"`
// SHA256 fingerprint of the key
Fingerprint *string `form:"fingerprint,omitempty" json:"fingerprint,omitempty" xml:"fingerprint,omitempty"`
// Creation timestamp
CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"`
}
CreateResponseBody is the type of the "sshkeys" service "create" endpoint HTTP response body.
func NewCreateResponseBody ¶
func NewCreateResponseBody(res *sshkeysviews.SshkeyView) *CreateResponseBody
NewCreateResponseBody builds the HTTP response body from the result of the "create" endpoint of the "sshkeys" service.
type GetResponseBody ¶
type GetResponseBody struct {
// Resource name of the SshKey CR
Name string `form:"name" json:"name" xml:"name"`
// Kubernetes namespace
Namespace string `form:"namespace" json:"namespace" xml:"namespace"`
// Human-friendly label
KeyName *string `form:"key_name,omitempty" json:"key_name,omitempty" xml:"key_name,omitempty"`
// SSH public key line
PublicKey string `form:"public_key" json:"public_key" xml:"public_key"`
// SHA256 fingerprint of the key
Fingerprint *string `form:"fingerprint,omitempty" json:"fingerprint,omitempty" xml:"fingerprint,omitempty"`
// Creation timestamp
CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"`
}
GetResponseBody is the type of the "sshkeys" service "get" endpoint HTTP response body.
func NewGetResponseBody ¶
func NewGetResponseBody(res *sshkeysviews.SshkeyView) *GetResponseBody
NewGetResponseBody builds the HTTP response body from the result of the "get" endpoint of the "sshkeys" service.
type ListResponseBody ¶
type ListResponseBody []*SshkeyResponse
ListResponseBody is the type of the "sshkeys" service "list" endpoint HTTP response body.
func NewListResponseBody ¶
func NewListResponseBody(res []*sshkeys.Sshkey) ListResponseBody
NewListResponseBody builds the HTTP response body from the result of the "list" endpoint of the "sshkeys" 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 Server ¶
type Server struct {
Mounts []*MountPoint
List http.Handler
Get http.Handler
Create http.Handler
Delete http.Handler
}
Server lists the sshkeys service endpoint HTTP handlers.
func New ¶
func New( e *sshkeys.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 sshkeys 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 SshkeyResponse ¶
type SshkeyResponse struct {
// Resource name of the SshKey CR
Name string `form:"name" json:"name" xml:"name"`
// Kubernetes namespace
Namespace string `form:"namespace" json:"namespace" xml:"namespace"`
// Human-friendly label
KeyName *string `form:"key_name,omitempty" json:"key_name,omitempty" xml:"key_name,omitempty"`
// SSH public key line
PublicKey string `form:"public_key" json:"public_key" xml:"public_key"`
// SHA256 fingerprint of the key
Fingerprint *string `form:"fingerprint,omitempty" json:"fingerprint,omitempty" xml:"fingerprint,omitempty"`
// Creation timestamp
CreatedAt *string `form:"created_at,omitempty" json:"created_at,omitempty" xml:"created_at,omitempty"`
}
SshkeyResponse is used to define fields on response body types.