config

package
v0.0.0-...-c935f35 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultOf

func GetDefaultOf(storageType string) string

Types

type Config

type Config struct {
	Interface *Interface     `json:"interface"`
	Websocket *Websocket     `json:"ws"`
	Redis     *Redis         `json:"redis"`
	Storage   []*StorageType `json:"storage"`
}

func LoadConfiguration

func LoadConfiguration() (conf Config)

type Interface

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

type Network

type Network struct {
	IP   string  `json:"ip"`
	Mask [4]byte `json:"mask"`
}

type Redis

type Redis struct {
	Port     int `json:"port"`
	Database int `json:"db"`
}

type StorageType

type StorageType struct {
	Key  string `json:"key"`
	Type string `json:"type"`
}

type WSGroup

type WSGroup struct {
	Description string  `json:"description"`
	Network     Network `json:"network"`
}

type WSUsers

type WSUsers struct {
	Password string              `json:"password"`
	Groups   map[string][]string `json:"groups"`
}

type Websocket

type Websocket struct {
	Port          int                `json:"port"`
	AdminPassword string             `json:"adminPassword"`
	Users         map[string]WSUsers `json:"users"`
	Groups        map[string]WSGroup `json:"groups"`
}

Jump to

Keyboard shortcuts

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