sshkey

package
v6.18.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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