model

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseData

type BaseData struct {
	Active      string
	CurrentUser string
}

BaseData struct to pass value to the base template

type Client

type Client struct {
	ID           string    `json:"id"`
	PrivateKey   string    `json:"private_key"`
	PublicKey    string    `json:"public_key"`
	PresharedKey string    `json:"preshared_key"`
	Name         string    `json:"name"`
	Email        string    `json:"email"`
	AllocatedIPs []string  `json:"allocated_ips"`
	AllowedIPs   []string  `json:"allowed_ips"`
	UseServerDNS bool      `json:"use_server_dns"`
	Enabled      bool      `json:"enabled"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

Client model

type ClientData

type ClientData struct {
	Client *Client
	QRCode string
}

ClientData includes the Client and extra data

type GlobalSetting

type GlobalSetting struct {
	EndpointAddress     string    `json:"endpoint_address"`
	DNSServers          []string  `json:"dns_servers"`
	MTU                 int       `json:"mtu,string"`
	PersistentKeepalive int       `json:"persistent_keepalive,string"`
	ConfigFilePath      string    `json:"config_file_path"`
	UpdatedAt           time.Time `json:"updated_at"`
}

GlobalSetting model

type Interface

type Interface struct {
	Name      string `json:"name"`
	IPAddress string `json:"ip_address"`
}

Interface model

type Server

type Server struct {
	KeyPair   *ServerKeypair
	Interface *ServerInterface
}

Server model

type ServerInterface

type ServerInterface struct {
	Addresses  []string  `json:"addresses"`
	ListenPort int       `json:"listen_port,string"` // ,string to get listen_port string input as int
	UpdatedAt  time.Time `json:"updated_at"`
	PostUp     string    `json:"post_up"`
	PostDown   string    `json:"post_down"`
}

ServerInterface model

type ServerKeypair

type ServerKeypair struct {
	PrivateKey string    `json:"private_key"`
	PublicKey  string    `json:"public_key"`
	UpdatedAt  time.Time `json:"updated_at"`
}

ServerKeypair model

type User

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

User model

Jump to

Keyboard shortcuts

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