json

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterConfigType added in v0.9.1

func RegisterConfigType(protocol string, cType config.Type, creator ConfigObjectCreator)

Types

type Config

type Config struct {
	PortValue           uint16            `json:"port"` // Port of this Point server.
	LogConfigValue      *LogConfig        `json:"log"`
	InboundConfigValue  *ConnectionConfig `json:"inbound"`
	OutboundConfigValue *ConnectionConfig `json:"outbound"`
}

Config is the config for Point server.

func LoadConfig

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

func (*Config) InboundConfig

func (config *Config) InboundConfig() config.ConnectionConfig

func (*Config) LogConfig added in v0.9.1

func (config *Config) LogConfig() config.LogConfig

func (*Config) OutboundConfig

func (config *Config) OutboundConfig() config.ConnectionConfig

func (*Config) Port

func (config *Config) Port() uint16

type ConfigObjectCreator added in v0.9.1

type ConfigObjectCreator func() interface{}

type ConnectionConfig

type ConnectionConfig struct {
	ProtocolString  string          `json:"protocol"`
	SettingsMessage json.RawMessage `json:"settings"`
}

func (*ConnectionConfig) Protocol

func (config *ConnectionConfig) Protocol() string

func (*ConnectionConfig) Settings added in v0.9.1

func (config *ConnectionConfig) Settings(configType config.Type) interface{}

type LogConfig added in v0.9.1

type LogConfig struct {
	AccessLogValue string `json:"access"`
}

func (*LogConfig) AccessLog added in v0.9.1

func (config *LogConfig) AccessLog() string

Jump to

Keyboard shortcuts

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