Documentation
¶
Overview ¶
Package sshkey manages SSH keys for organizations.
Index ¶
- type Client
- type CreateOptions
- type Options
- type SSHKey
- type Service
- func (s *Service) AddHandlers(r *mux.Router)
- func (s *Service) Create(ctx context.Context, opts CreateOptions) (*SSHKey, error)
- func (s *Service) Delete(ctx context.Context, id resource.TfeID) (*SSHKey, error)
- func (s *Service) Get(ctx context.Context, id resource.TfeID) (*SSHKey, error)
- func (s *Service) GetPrivateKey(ctx context.Context, id resource.TfeID) ([]byte, error)
- func (s *Service) List(ctx context.Context, org organization.Name) ([]*SSHKey, error)
- func (s *Service) Update(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 Service ¶
type Service struct {
logr.Logger
*authz.Authorizer
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) AddHandlers ¶
func (*Service) GetPrivateKey ¶
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.