Documentation
¶
Index ¶
- type Repository
- func (r *Repository) Add(key string, description string) error
- func (r *Repository) GetAll() ([]SSHKey, error)
- func (r *Repository) GetByID(sshKeyID int64) (SSHKey, error)
- func (r *Repository) GetSelection(page int, itemsPerPage int) ([]SSHKey, error)
- func (r *Repository) Remove(sshKeyID int64) error
- func (r *Repository) Update(sshKey SSHKey) error
- type SSHKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository repository.RestRepository
Repository can be used to add, modify, remove, or list SSH keys in your account
func (*Repository) Add ¶
func (r *Repository) Add(key string, description string) error
Add allows you add an SSH key
func (*Repository) GetAll ¶
func (r *Repository) GetAll() ([]SSHKey, error)
GetAll returns an array of all SSH keys in your account
func (*Repository) GetByID ¶
func (r *Repository) GetByID(sshKeyID int64) (SSHKey, error)
GetByID returns a specific SSH key struct by id
func (*Repository) GetSelection ¶
func (r *Repository) GetSelection(page int, itemsPerPage int) ([]SSHKey, error)
GetSelection returns a limited list of SSH keys, specify how many and which page/chunk of SSH keys you want to retrieve
func (*Repository) Remove ¶
func (r *Repository) Remove(sshKeyID int64) error
Remove will remove the SSH key
func (*Repository) Update ¶
func (r *Repository) Update(sshKey SSHKey) error
Update allows you to modify the SSH key description
type SSHKey ¶
type SSHKey struct {
// The SSH key id
ID int64 `json:"id,omitempty"`
// Description
Description string `json:"description,omitempty"`
// SSH key
Key string `json:"key"`
// SSH key fingerprint
MD5Fingerprint string `json:"fingerprint"`
// Creation date of the SSH key
CreationDate rest.Time `json:"creationDate"`
}
SSHKey struct
Click to show internal directories.
Click to hide internal directories.