Documentation
¶
Overview ¶
Package sshkey manages SSH keys for organizations.
Index ¶
- type Client
- type CreateOptions
- type Options
- type SSHKey
- type SSHKeyClient
- type SSHKeyService
- type Service
- func (s *Service) AddHandlers(r *mux.Router)
- func (s *Service) CreateSSHKey(ctx context.Context, opts CreateOptions) (*SSHKey, error)
- func (s *Service) DeleteSSHKey(ctx context.Context, id resource.TfeID) (*SSHKey, error)
- func (s *Service) GetSSHKey(ctx context.Context, id resource.TfeID) (*SSHKey, error)
- func (s *Service) GetSSHKeyPrivateKey(ctx context.Context, id resource.TfeID) ([]byte, error)
- func (s *Service) ListSSHKeys(ctx context.Context, org organization.Name) ([]*SSHKey, error)
- func (s *Service) UpdateSSHKey(ctx context.Context, id resource.TfeID, opts UpdateOptions) (*SSHKey, error)
- type TFESSHKey
- type UpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOptions ¶
type CreateOptions struct {
Organization organization.Name `schema:"organization_name"`
Name string
PrivateKey string `schema:"private-key"`
}
CreateOptions are the options for creating a new SSH key.
type SSHKey ¶
type SSHKey struct {
ID resource.TfeID `db:"ssh_key_id"`
Name string `db:"name"`
Organization organization.Name `db:"organization_name"`
}
SSHKey is an SSH key belonging to an organization.
type SSHKeyClient ¶ added in v0.5.18
type SSHKeyClient = Client
Alias client to permit embedding it with other clients in a struct without a name clash.
type SSHKeyService ¶ added in v0.5.18
type SSHKeyService = Service
Alias service to permit embedding it with other services in a struct without a name clash.
type Service ¶
type Service struct {
logr.Logger
*authz.Authorizer
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AddHandlers ¶
func (*Service) CreateSSHKey ¶ added in v0.5.18
func (*Service) DeleteSSHKey ¶ added in v0.5.18
func (*Service) GetSSHKeyPrivateKey ¶ added in v0.5.18
func (*Service) ListSSHKeys ¶ added in v0.5.18
func (*Service) UpdateSSHKey ¶ added in v0.5.18
type TFESSHKey ¶
type TFESSHKey struct {
ID resource.TfeID `jsonapi:"primary,ssh-keys"`
CreatedAt time.Time `jsonapi:"attribute" json:"created-at"`
UpdatedAt time.Time `jsonapi:"attribute" json:"updated-at"`
Name string `jsonapi:"attribute" json:"name"`
}
TFESSHKey represents an SSH key in the TFE API.
type UpdateOptions ¶
type UpdateOptions struct {
Name *string
}
UpdateOptions are the options for updating an SSH key.
Click to show internal directories.
Click to hide internal directories.