config

package
v0.0.0-...-a69ce32 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Role          string   `json:"role"`
	ServerAddr    string   `json:"server"`
	Tun           string   `json:"tun"`
	TunName       string   `json:"tunname"`
	PtcpInterface string   `json:"ptcpinterface"`
	Dns           string   `json:"dns"`
	Mtu           int      `json:"mtu"`
	Protocol      string   `json:"protocol"`
	Tokens        []string `json:"tokens"`
}

func NewConfig

func NewConfig() *Config

func NewConfigFromBytes

func NewConfigFromBytes(data []byte) (*Config, error)

func NewConfigFromFile

func NewConfigFromFile(file string) (*Config, error)

func (*Config) Marshal

func (cfg *Config) Marshal() ([]byte, error)

func (*Config) String

func (cfg *Config) String() string

func (*Config) Unmarshal

func (cfg *Config) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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