config

package
v0.0.0-...-27c307a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultConfigPath

func GetDefaultConfigPath() string

func RegisterUnmarshalConfigFunc

func RegisterUnmarshalConfigFunc(namespace, name string, fn UnmarshalConfigFunc)

func UnmarshalConfig

func UnmarshalConfig(namespace, name, text string) (interface{}, error)

func WrapKeyYaml

func WrapKeyYaml(key, text string) string

Types

type AclConfig

type AclConfig struct {
	Allows []string `yaml:"allows,omitempty"`
	Blocks []string `yaml:"blocks,omitempty"`
}

type ApiConfig

type ApiConfig struct {
	Name string `yaml:"name"`
}

type AuthConfig

type AuthConfig struct {
	Name string `yaml:"name"`
}

type Config

type Config struct {
	Meepo *MeepoConfig `yaml:"meepo"`
}

func Load

func Load(p string) (config *Config, loaded bool, err error)

func NewDefaultConfig

func NewDefaultConfig() *Config

func (*Config) Dump

func (c *Config) Dump(p string) error

func (*Config) Get

func (c *Config) Get(key string) (string, error)

func (*Config) Set

func (c *Config) Set(key, val string) error

type DummyAuthConfig

type DummyAuthConfig struct {
	Name string `yaml:"name"`
}

type HttpApiConfig

type HttpApiConfig struct {
	Name string `yaml:"name"`
	Host string `yaml:"host"`
	Port int32  `yaml:"port"`
}

type LogConfig

type LogConfig struct {
	Level string `yaml:"level"`
}

type MeepoConfig

type MeepoConfig struct {
	IdentityFile string           `yaml:"identityFile,omitempty"`
	Daemon       bool             `yaml:"daemon,omitempty"`
	AsSignaling  bool             `yaml:"asSignaling,omitempty"`
	Log          *LogConfig       `yaml:"log,omitempty"`
	Proxy        *ProxyConfig     `yaml:"proxy,omitempty"`
	Auth         *AuthConfig      `yaml:"auth,omitempty"`
	AuthI        interface{}      `yaml:"-"`
	Transport    *TransportConfig `yaml:"transport,omitempty"`
	TransportI   interface{}      `yaml:"-"`
	Signaling    *SignalingConfig `yaml:"signaling,omitempty"`
	SignalingI   interface{}      `yaml:"-"`
	Api          *ApiConfig       `yaml:"api,omitempty"`
	ApiI         interface{}      `yaml:"-"`
	Acl          *AclConfig       `yaml:"acl,omitempty"`
}

func (*MeepoConfig) MarshalYAML

func (mc *MeepoConfig) MarshalYAML() (interface{}, error)

func (*MeepoConfig) UnmarshalYAML

func (mc *MeepoConfig) UnmarshalYAML(unmarshal func(interface{}) error) error

type ProxyConfig

type ProxyConfig struct {
	Socks5 *Socks5Config `yaml:"socks5"`
}

type RedisSignalingConfig

type RedisSignalingConfig struct {
	Name string `yaml:"name"`
	URL  string `yaml:"url"`
}

type SecretAuthConfig

type SecretAuthConfig struct {
	Name   string `yaml:"name"`
	Secret string `yaml:"secret"`
}

type SignalingConfig

type SignalingConfig struct {
	Name string `yaml:"name"`
}

type Socks5Config

type Socks5Config struct {
	Host string `yaml:"host"`
	Port int32  `yaml:"port"`
}

type TransportConfig

type TransportConfig struct {
	Name string `yaml:"name"`
}

type UnmarshalConfigFunc

type UnmarshalConfigFunc = func(unmarshal func(interface{}) error) (interface{}, error)

type UnsupportedConfigKeyError

type UnsupportedConfigKeyError struct {
	Key string
}

func (UnsupportedConfigKeyError) Error

type UnsupportedError

type UnsupportedError struct {
	Namespace string
	Name      string
}

func (UnsupportedError) Error

func (e UnsupportedError) Error() string

type WebrtcTransportConfig

type WebrtcTransportConfig struct {
	Name       string   `yaml:"name"`
	ICEServers []string `yaml:"iceServers"`
}

Jump to

Keyboard shortcuts

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