Documentation
¶
Index ¶
- type AccessiblePeers
- type Client
- func (c *Client) CreateGroup(p *Group) (*Group, error)
- func (c *Client) CreateRoute(p *Route) (*Route, error)
- func (c *Client) CreateSetupKey(k *SetupKey) (*SetupKey, error)
- func (c *Client) DeleteGroup(id string) error
- func (c *Client) DeletePeer(id string) error
- func (c *Client) DeleteRoute(id string) error
- func (c *Client) DeleteSetupKey(id string) error
- func (c *Client) GetGroup(id string) (*Group, error)
- func (c *Client) GetGroupByName(name string) (*Group, error)
- func (c *Client) GetPeer(id string) (Peer, error)
- func (c *Client) GetPeerIdByHostname(hostname string) (string, error)
- func (c *Client) GetRoute(id string) (Route, error)
- func (c *Client) GetSetupKey(id string) (SetupKey, error)
- func (c *Client) GetSetupKeyByName(name string) ([]SetupKey, error)
- func (c *Client) ListGroups() ([]Group, error)
- func (c *Client) ListPeers() (Peers, error)
- func (c *Client) ListRoutes() (Routes, error)
- func (c *Client) ListSetupKeys() (SetupKeys, error)
- func (c *Client) UpdateGroup(p *Group) (*Group, error)
- func (c *Client) UpdatePeer(p *Peer) (*Peer, error)
- func (c *Client) UpdateRoute(p *Route) (*Route, error)
- func (c *Client) UpdateSetupKey(k *SetupKey) (SetupKey, error)
- type ClientOption
- type Group
- type GroupPeers
- type Groups
- type Peer
- type PeerGroup
- type Peers
- type Route
- type Routes
- type SetupKey
- type SetupKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessiblePeers ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(token string, opts ...ClientOption) *Client
func (*Client) DeleteGroup ¶ added in v1.3.0
func (*Client) DeletePeer ¶
func (*Client) DeleteRoute ¶
func (*Client) DeleteSetupKey ¶
func (*Client) GetGroupByName ¶ added in v1.3.2
func (*Client) GetPeerIdByHostname ¶
func (*Client) GetSetupKeyByName ¶
func (*Client) ListGroups ¶ added in v1.3.0
func (*Client) ListRoutes ¶
func (*Client) ListSetupKeys ¶
type ClientOption ¶
type ClientOption func(*Client)
func WithManagementAddress ¶
func WithManagementAddress(address string) ClientOption
func WithTimeout ¶
func WithTimeout(timeout time.Duration) ClientOption
type Group ¶ added in v1.3.0
type Group struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` PeersCount int `json:"peers_count,omitempty"` Issued string `json:"issued,omitempty"` Peers []GroupPeers `json:"peers,omitempty"` }
type GroupPeers ¶ added in v1.3.0
type Peer ¶
type Peer struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` IP string `json:"ip,omitempty"` Connected bool `json:"connected,omitempty"` LastSeen string `json:"last_seen,omitempty"` Os string `json:"os,omitempty"` Version string `json:"version,omitempty"` Groups []PeerGroup `json:"groups,omitempty"` SSHEnabled bool `json:"ssh_enabled,omitempty"` UserID string `json:"user_id,omitempty"` Hostname string `json:"hostname,omitempty"` UIVersion string `json:"ui_version,omitempty"` DNSLabel string `json:"dns_label,omitempty"` LoginExpirationEnabled bool `json:"login_expiration_enabled,omitempty"` LoginExpired bool `json:"login_expired,omitempty"` LastLogin string `json:"last_login,omitempty"` ApprovalRequired bool `json:"approval_required,omitempty"` AccessiblePeers []AccessiblePeers `json:"accessible_peers,omitempty"` AcessiblePeersCount int `json:"accessible_peers_count,omitempty"` }
type Route ¶
type Route struct { ID string `json:"id,omitempty"` NetworkType string `json:"network_type,omitempty"` Description string `json:"description,omitempty"` NetworkID string `json:"network_id,omitempty"` Enabled bool `json:"enabled,omitempty"` Peer string `json:"peer,omitempty"` PeerGroups []string `json:"peer_groups,omitempty"` Network string `json:"network,omitempty"` Metric int `json:"metric,omitempty"` Masquerade bool `json:"masquerade,omitempty"` Groups []string `json:"groups,omitempty"` }
type SetupKey ¶
type SetupKey struct { ID string `json:"id,omitempty"` Key string `json:"key,omitempty"` Name string `json:"name,omitempty"` ExpiresIn int `json:"expires_in,omitempty"` Expires string `json:"expires,omitempty"` Type string `json:"type,omitempty"` Valid bool `json:"valid,omitempty"` Revoked bool `json:"revoked,omitempty"` UsedTimes int `json:"used_times,omitempty"` LastUsed string `json:"last_used,omitempty"` State string `json:"state,omitempty"` AutoGroups []string `json:"auto_groups,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` UsageLimit int `json:"usage_limit,omitempty"` Ephemeral bool `json:"ephemeral,omitempty"` }
Click to show internal directories.
Click to hide internal directories.