http

package
v0.0.0-...-88626c9 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLatestBinary

func GetLatestBinary(osname string) (string, []byte, error)

func GetLatestVersion

func GetLatestVersion() (string, error)

func GetToken

func GetToken() (string, error)

func GetUserID

func GetUserID() (*string, *string, error)

func Login

func Login(email, password string) error

func Register

func Register(name, email, password, sshkey string) error

Types

type Account

type Account struct {
	Name        string `json:"name,omitempty"`
	Email       string `json:"email,omitempty"`
	UserID      string `json:"user_id,omitempty"`
	SshUsername string `json:"user_name,omitempty"`
	SshKey      string `json:"sshkey,omitempty"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() (*Client, error)

func (*Client) Request

func (c *Client) Request(method string, url string, target interface{}, data interface{}) error

type Socket

type Socket struct {
	Tunnels               []Tunnel `json:"tunnels,omitempty"`
	Username              string   `json:"user_name,omitempty"`
	SocketID              string   `json:"socket_id,omitempty"`
	SocketTcpPorts        []int    `json:"socket_tcp_ports,omitempty"`
	Dnsname               string   `json:"dnsname,omitempty"`
	Name                  string   `json:"name,omitempty"`
	SocketType            string   `json:"socket_type,omitempty"`
	ProtectedSocket       bool     `json:"protected_socket"`
	ProtectedUsername     string   `json:"protected_username"`
	ProtectedPassword     string   `json:"protected_password"`
	CloudAuthEnabled      bool     `json:"cloud_authentication_enabled,omitempty"`
	AllowedEmailAddresses []string `json:"cloud_authentication_email_allowed_addressses,omitempty"`
	AllowedEmailDomains   []string `json:"cloud_authentication_email_allowed_domains,omitempty"`
}

type Tunnel

type Tunnel struct {
	TunnelID     string `json:"tunnel_id,omitempty"`
	LocalPort    int    `json:"local_port,omitempty"`
	TunnelServer string `json:"tunnel_server,omitempty"`
}

func GetTunnel

func GetTunnel(socketID string, tunnelID string) (*Tunnel, error)

Jump to

Keyboard shortcuts

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