Documentation
¶
Index ¶
- func BuildCreatePayload(sshkeysCreateBody string) (*sshkeys.CreateSSHKeyPayload, error)
- func BuildDeletePayload(sshkeysDeleteName string, sshkeysDeleteNamespace string) (*sshkeys.DeletePayload, error)
- func BuildGetPayload(sshkeysGetName string, sshkeysGetNamespace string) (*sshkeys.GetPayload, error)
- func BuildListPayload(sshkeysListNamespace string) (*sshkeys.ListPayload, error)
- func CreateSshkeysPath() string
- func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
- func DeleteSshkeysPath(name string) string
- func EncodeCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeDeleteRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeGetRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func EncodeListRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
- func GetSshkeysPath(name string) string
- func ListSshkeysPath() string
- func NewCreateAlreadyExists(body string) sshkeys.AlreadyExists
- func NewCreateInvalid(body string) sshkeys.Invalid
- func NewCreateSshkeyCreated(body *CreateResponseBody) *sshkeysviews.SshkeyView
- func NewDeleteNotFound(body string) sshkeys.NotFound
- func NewGetNotFound(body string) sshkeys.NotFound
- func NewGetSshkeyOK(body *GetResponseBody) *sshkeysviews.SshkeyView
- func NewListSshkeyOK(body []*SshkeyResponse) []*sshkeys.Sshkey
- func ValidateSshkeyResponse(body *SshkeyResponse) (err error)
- type Client
- func (c *Client) BuildCreateRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildDeleteRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildGetRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) BuildListRequest(ctx context.Context, v any) (*http.Request, error)
- func (c *Client) Create() goa.Endpoint
- func (c *Client) Delete() goa.Endpoint
- func (c *Client) Get() goa.Endpoint
- func (c *Client) List() goa.Endpoint
- type CreateRequestBody
- type CreateResponseBody
- type GetResponseBody
- type SshkeyResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCreatePayload ¶
func BuildCreatePayload(sshkeysCreateBody string) (*sshkeys.CreateSSHKeyPayload, error)
BuildCreatePayload builds the payload for the sshkeys create endpoint from CLI flags.
func BuildDeletePayload ¶
func BuildDeletePayload(sshkeysDeleteName string, sshkeysDeleteNamespace string) (*sshkeys.DeletePayload, error)
BuildDeletePayload builds the payload for the sshkeys delete endpoint from CLI flags.
func BuildGetPayload ¶
func BuildGetPayload(sshkeysGetName string, sshkeysGetNamespace string) (*sshkeys.GetPayload, error)
BuildGetPayload builds the payload for the sshkeys get endpoint from CLI flags.
func BuildListPayload ¶
func BuildListPayload(sshkeysListNamespace string) (*sshkeys.ListPayload, error)
BuildListPayload builds the payload for the sshkeys list endpoint from CLI flags.
func CreateSshkeysPath ¶
func CreateSshkeysPath() string
CreateSshkeysPath returns the URL path to the sshkeys service create HTTP endpoint.
func DecodeCreateResponse ¶
func DecodeCreateResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeCreateResponse returns a decoder for responses returned by the sshkeys create endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeCreateResponse may return the following errors:
- "already_exists" (type sshkeys.AlreadyExists): http.StatusConflict
- "invalid" (type sshkeys.Invalid): http.StatusBadRequest
- error: internal error
func DecodeDeleteResponse ¶
func DecodeDeleteResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeDeleteResponse returns a decoder for responses returned by the sshkeys delete endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeDeleteResponse may return the following errors:
- "not_found" (type sshkeys.NotFound): http.StatusNotFound
- error: internal error
func DecodeGetResponse ¶
func DecodeGetResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeGetResponse returns a decoder for responses returned by the sshkeys get endpoint. restoreBody controls whether the response body should be restored after having been read. DecodeGetResponse may return the following errors:
- "not_found" (type sshkeys.NotFound): http.StatusNotFound
- error: internal error
func DecodeListResponse ¶
func DecodeListResponse(decoder func(*http.Response) goahttp.Decoder, restoreBody bool) func(*http.Response) (any, error)
DecodeListResponse returns a decoder for responses returned by the sshkeys list endpoint. restoreBody controls whether the response body should be restored after having been read.
func DeleteSshkeysPath ¶
DeleteSshkeysPath returns the URL path to the sshkeys service delete HTTP endpoint.
func EncodeCreateRequest ¶
func EncodeCreateRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
EncodeCreateRequest returns an encoder for requests sent to the sshkeys create server.
func EncodeDeleteRequest ¶
func EncodeDeleteRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error
EncodeDeleteRequest returns an encoder for requests sent to the sshkeys delete server.
func EncodeGetRequest ¶
EncodeGetRequest returns an encoder for requests sent to the sshkeys get server.
func EncodeListRequest ¶
EncodeListRequest returns an encoder for requests sent to the sshkeys list server.
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 NewCreateAlreadyExists ¶
func NewCreateAlreadyExists(body string) sshkeys.AlreadyExists
NewCreateAlreadyExists builds a sshkeys service create endpoint already_exists error.
func NewCreateInvalid ¶
NewCreateInvalid builds a sshkeys service create endpoint invalid error.
func NewCreateSshkeyCreated ¶
func NewCreateSshkeyCreated(body *CreateResponseBody) *sshkeysviews.SshkeyView
NewCreateSshkeyCreated builds a "sshkeys" service "create" endpoint result from a HTTP "Created" response.
func NewDeleteNotFound ¶
NewDeleteNotFound builds a sshkeys service delete endpoint not_found error.
func NewGetNotFound ¶
NewGetNotFound builds a sshkeys service get endpoint not_found error.
func NewGetSshkeyOK ¶
func NewGetSshkeyOK(body *GetResponseBody) *sshkeysviews.SshkeyView
NewGetSshkeyOK builds a "sshkeys" service "get" endpoint result from a HTTP "OK" response.
func NewListSshkeyOK ¶
func NewListSshkeyOK(body []*SshkeyResponse) []*sshkeys.Sshkey
NewListSshkeyOK builds a "sshkeys" service "list" endpoint result from a HTTP "OK" response.
func ValidateSshkeyResponse ¶
func ValidateSshkeyResponse(body *SshkeyResponse) (err error)
ValidateSshkeyResponse runs the validations defined on SshkeyResponse
Types ¶
type Client ¶
type Client struct {
// List Doer is the HTTP client used to make requests to the list endpoint.
ListDoer goahttp.Doer
// Get Doer is the HTTP client used to make requests to the get endpoint.
GetDoer goahttp.Doer
// Create Doer is the HTTP client used to make requests to the create endpoint.
CreateDoer goahttp.Doer
// Delete Doer is the HTTP client used to make requests to the delete endpoint.
DeleteDoer goahttp.Doer
// RestoreResponseBody controls whether the response bodies are reset after
// decoding so they can be read again.
RestoreResponseBody bool
// contains filtered or unexported fields
}
Client lists the sshkeys service endpoint HTTP clients.
func NewClient ¶
func NewClient( scheme string, host string, doer goahttp.Doer, enc func(*http.Request) goahttp.Encoder, dec func(*http.Response) goahttp.Decoder, restoreBody bool, ) *Client
NewClient instantiates HTTP clients for all the sshkeys service servers.
func (*Client) BuildCreateRequest ¶
BuildCreateRequest instantiates a HTTP request object with method and path set to call the "sshkeys" service "create" endpoint
func (*Client) BuildDeleteRequest ¶
BuildDeleteRequest instantiates a HTTP request object with method and path set to call the "sshkeys" service "delete" endpoint
func (*Client) BuildGetRequest ¶
BuildGetRequest instantiates a HTTP request object with method and path set to call the "sshkeys" service "get" endpoint
func (*Client) BuildListRequest ¶
BuildListRequest instantiates a HTTP request object with method and path set to call the "sshkeys" service "list" endpoint
func (*Client) Create ¶
Create returns an endpoint that makes HTTP requests to the sshkeys service create server.
func (*Client) Delete ¶
Delete returns an endpoint that makes HTTP requests to the sshkeys service delete server.
type CreateRequestBody ¶
type CreateRequestBody struct {
// Resource name for the SshKey CR
Name string `form:"name" json:"name" xml:"name"`
// 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" json:"public_key" xml:"public_key"`
}
CreateRequestBody is the type of the "sshkeys" service "create" endpoint HTTP request body.
func NewCreateRequestBody ¶
func NewCreateRequestBody(p *sshkeys.CreateSSHKeyPayload) *CreateRequestBody
NewCreateRequestBody builds the HTTP request body from the payload of the "create" endpoint of the "sshkeys" service.
type CreateResponseBody ¶
type CreateResponseBody struct {
// Resource name of the SshKey CR
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Kubernetes namespace
Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
// 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,omitempty" json:"public_key,omitempty" xml:"public_key,omitempty"`
// 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.
type GetResponseBody ¶
type GetResponseBody struct {
// Resource name of the SshKey CR
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Kubernetes namespace
Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
// 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,omitempty" json:"public_key,omitempty" xml:"public_key,omitempty"`
// 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.
type SshkeyResponse ¶
type SshkeyResponse struct {
// Resource name of the SshKey CR
Name *string `form:"name,omitempty" json:"name,omitempty" xml:"name,omitempty"`
// Kubernetes namespace
Namespace *string `form:"namespace,omitempty" json:"namespace,omitempty" xml:"namespace,omitempty"`
// 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,omitempty" json:"public_key,omitempty" xml:"public_key,omitempty"`
// 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.