config

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserLevelAdmin     = UserLevel(999)
	UserLevelUntrusted = UserLevel(0)
)
View Source
const (
	IDBytesLen = 16
)

Variables

View Source
var (
	InvalidID = errors.New("Invalid ID.")
)

Functions

func UUIDToID

func UUIDToID(uuid string) (v [IDBytesLen]byte, err error)

TODO: leverage a full functional UUID library

Types

type ID

type ID struct {
	String string
	Bytes  [IDBytesLen]byte
	// contains filtered or unexported fields
}

The ID of en entity, in the form of an UUID.

func NewID

func NewID(id string) (*ID, error)

func (ID) CmdKey

func (v ID) CmdKey() []byte

type Inbound

type Inbound interface {
	AllowedUsers() []User
}

type Outbound

type Outbound interface {
	Targets() []*OutboundTarget
}

type OutboundTarget

type OutboundTarget struct {
	Destination v2net.Destination
	Accounts    []User
}

type User

type User interface {
	ID() *ID
	Level() UserLevel
}

type UserLevel added in v0.14.1

type UserLevel int

type UserSettings added in v0.14.1

type UserSettings struct {
	PayloadReadTimeout int
}

func GetUserSettings added in v0.14.1

func GetUserSettings(level UserLevel) UserSettings

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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