config

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2015 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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