sshkeys

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const APIName = "kube-workspaces"

APIName is the name of the API as defined in the design.

View Source
const APIVersion = "1.0.0"

APIVersion is the version of the API as defined in the design.

View Source
const ServiceName = "sshkeys"

ServiceName is the name of the service as defined in the design. This is the same value that is set in the endpoint request contexts under the ServiceKey key.

Variables

View Source
var MethodNames = [4]string{"list", "get", "create", "delete"}

MethodNames lists the service method names as defined in the design. These are the same values that are set in the endpoint request contexts under the MethodKey key.

Functions

func NewCreateEndpoint

func NewCreateEndpoint(s Service) goa.Endpoint

NewCreateEndpoint returns an endpoint function that calls the method "create" of service "sshkeys".

func NewDeleteEndpoint

func NewDeleteEndpoint(s Service) goa.Endpoint

NewDeleteEndpoint returns an endpoint function that calls the method "delete" of service "sshkeys".

func NewGetEndpoint

func NewGetEndpoint(s Service) goa.Endpoint

NewGetEndpoint returns an endpoint function that calls the method "get" of service "sshkeys".

func NewListEndpoint

func NewListEndpoint(s Service) goa.Endpoint

NewListEndpoint returns an endpoint function that calls the method "list" of service "sshkeys".

func NewViewedSshkey

func NewViewedSshkey(res *Sshkey, view string) *sshkeysviews.Sshkey

NewViewedSshkey initializes viewed result type Sshkey from result type Sshkey using the given view.

Types

type AlreadyExists

type AlreadyExists string

SSH key already exists

func (AlreadyExists) Error

func (e AlreadyExists) Error() string

Error returns an error description.

func (AlreadyExists) ErrorName deprecated

func (e AlreadyExists) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (AlreadyExists) GoaErrorName

func (e AlreadyExists) GoaErrorName() string

GoaErrorName returns the error name.

type Client

type Client struct {
	ListEndpoint   goa.Endpoint
	GetEndpoint    goa.Endpoint
	CreateEndpoint goa.Endpoint
	DeleteEndpoint goa.Endpoint
}

Client is the "sshkeys" service client.

func NewClient

func NewClient(list, get, create, delete_ goa.Endpoint) *Client

NewClient initializes a "sshkeys" service client given the endpoints.

func (*Client) Create

func (c *Client) Create(ctx context.Context, p *CreateSSHKeyPayload) (res *Sshkey, err error)

Create calls the "create" endpoint of the "sshkeys" service. Create may return the following errors:

  • "already_exists" (type AlreadyExists)
  • "invalid" (type Invalid)
  • error: internal error

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, p *DeletePayload) (err error)

Delete calls the "delete" endpoint of the "sshkeys" service. Delete may return the following errors:

  • "not_found" (type NotFound)
  • error: internal error

func (*Client) Get

func (c *Client) Get(ctx context.Context, p *GetPayload) (res *Sshkey, err error)

Get calls the "get" endpoint of the "sshkeys" service. Get may return the following errors:

  • "not_found" (type NotFound)
  • error: internal error

func (*Client) List

func (c *Client) List(ctx context.Context, p *ListPayload) (res []*Sshkey, err error)

List calls the "list" endpoint of the "sshkeys" service.

type CreateSSHKeyPayload

type CreateSSHKeyPayload struct {
	// Resource name for the SshKey CR
	Name string
	// Target namespace (defaults to the user's personal namespace)
	Namespace *string
	// Human-friendly label for the key
	KeyName *string
	// SSH public key line (e.g. ssh-ed25519 AAAA... user@host)
	PublicKey string
}

CreateSSHKeyPayload is the payload type of the sshkeys service create method.

type DeletePayload

type DeletePayload struct {
	// Namespace
	Namespace *string
	// SSH key name
	Name string
}

DeletePayload is the payload type of the sshkeys service delete method.

type Endpoints

type Endpoints struct {
	List   goa.Endpoint
	Get    goa.Endpoint
	Create goa.Endpoint
	Delete goa.Endpoint
}

Endpoints wraps the "sshkeys" service endpoints.

func NewEndpoints

func NewEndpoints(s Service) *Endpoints

NewEndpoints wraps the methods of the "sshkeys" service with endpoints.

func (*Endpoints) Use

func (e *Endpoints) Use(m func(goa.Endpoint) goa.Endpoint)

Use applies the given middleware to all the "sshkeys" service endpoints.

type GetPayload

type GetPayload struct {
	// Namespace
	Namespace *string
	// SSH key name
	Name string
}

GetPayload is the payload type of the sshkeys service get method.

type Invalid

type Invalid string

Invalid SSH key

func (Invalid) Error

func (e Invalid) Error() string

Error returns an error description.

func (Invalid) ErrorName deprecated

func (e Invalid) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (Invalid) GoaErrorName

func (e Invalid) GoaErrorName() string

GoaErrorName returns the error name.

type ListPayload

type ListPayload struct {
	// Filter by namespace
	Namespace *string
}

ListPayload is the payload type of the sshkeys service list method.

type NotFound

type NotFound string

SSH key not found

func (NotFound) Error

func (e NotFound) Error() string

Error returns an error description.

func (NotFound) ErrorName deprecated

func (e NotFound) ErrorName() string

ErrorName returns the error name.

Deprecated: Use GoaErrorName - https://github.com/goadesign/goa/issues/3105

func (NotFound) GoaErrorName

func (e NotFound) GoaErrorName() string

GoaErrorName returns the error name.

type Service

type Service interface {
	// List the user's SSH public keys
	List(context.Context, *ListPayload) (res []*Sshkey, err error)
	// Get an SSH public key by name
	Get(context.Context, *GetPayload) (res *Sshkey, err error)
	// Store a new SSH public key
	Create(context.Context, *CreateSSHKeyPayload) (res *Sshkey, err error)
	// Delete an SSH public key
	Delete(context.Context, *DeletePayload) (err error)
}

SSH public key management service

type Sshkey

type Sshkey struct {
	// Resource name of the SshKey CR
	Name string
	// Kubernetes namespace
	Namespace string
	// Human-friendly label
	KeyName *string
	// SSH public key line
	PublicKey string
	// SHA256 fingerprint of the key
	Fingerprint *string
	// Creation timestamp
	CreatedAt *string
}

Sshkey is the result type of the sshkeys service get method.

func NewSshkey

func NewSshkey(vres *sshkeysviews.Sshkey) *Sshkey

NewSshkey initializes result type Sshkey from viewed result type Sshkey.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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