Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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

func DeleteSshkeysPath(name string) string

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

func EncodeGetRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeGetRequest returns an encoder for requests sent to the sshkeys get server.

func EncodeListRequest

func EncodeListRequest(encoder func(*http.Request) goahttp.Encoder) func(*http.Request, any) error

EncodeListRequest returns an encoder for requests sent to the sshkeys list server.

func GetSshkeysPath

func GetSshkeysPath(name string) string

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

func NewCreateInvalid(body string) sshkeys.Invalid

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

func NewDeleteNotFound(body string) sshkeys.NotFound

NewDeleteNotFound builds a sshkeys service delete endpoint not_found error.

func NewGetNotFound

func NewGetNotFound(body string) sshkeys.NotFound

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

func (c *Client) BuildCreateRequest(ctx context.Context, v any) (*http.Request, error)

BuildCreateRequest instantiates a HTTP request object with method and path set to call the "sshkeys" service "create" endpoint

func (*Client) BuildDeleteRequest

func (c *Client) BuildDeleteRequest(ctx context.Context, v any) (*http.Request, error)

BuildDeleteRequest instantiates a HTTP request object with method and path set to call the "sshkeys" service "delete" endpoint

func (*Client) BuildGetRequest

func (c *Client) BuildGetRequest(ctx context.Context, v any) (*http.Request, error)

BuildGetRequest instantiates a HTTP request object with method and path set to call the "sshkeys" service "get" endpoint

func (*Client) BuildListRequest

func (c *Client) BuildListRequest(ctx context.Context, v any) (*http.Request, error)

BuildListRequest instantiates a HTTP request object with method and path set to call the "sshkeys" service "list" endpoint

func (*Client) Create

func (c *Client) Create() goa.Endpoint

Create returns an endpoint that makes HTTP requests to the sshkeys service create server.

func (*Client) Delete

func (c *Client) Delete() goa.Endpoint

Delete returns an endpoint that makes HTTP requests to the sshkeys service delete server.

func (*Client) Get

func (c *Client) Get() goa.Endpoint

Get returns an endpoint that makes HTTP requests to the sshkeys service get server.

func (*Client) List

func (c *Client) List() goa.Endpoint

List returns an endpoint that makes HTTP requests to the sshkeys service list 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL