bur

package module
v0.0.0-...-b157686 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2014 License: MIT Imports: 14 Imported by: 0

README

Bur

Burring the Wall

Documentation

Index

Constants

View Source
const (
	Plain     = "plain://"
	Anonymous = "anonymous"
)

Variables

This section is empty.

Functions

func Close

func Close()

func NewAuthRPC

func NewAuthRPC(network, address string) (auth *authRPC, err error)

func Serve

func Serve(config *Config)

Types

type Auth

type Auth interface {
	Login(username string, password string) (bool, error)
}

type Bur

type Bur struct{}

func (*Bur) State

func (b *Bur) State(a string, state *State) error

func (*Bur) User

func (b *Bur) User(name string, user *User) error

type Config

type Config struct {
	Proxy map[string]configService
	Auth  configService
	Debug bool
	State configService
	Log   configLog
}

func LoadConfig

func LoadConfig(filename string) (config *Config, err error)

type State

type State struct {
	Tx, Rx uint64
}

func (*State) ToRx

func (state *State) ToRx(delta uint64)

func (*State) ToTx

func (state *State) ToTx(delta uint64)

type StateServer

type StateServer struct {
	// contains filtered or unexported fields
}

func (*StateServer) Close

func (srv *StateServer) Close()

func (*StateServer) Serve

func (srv *StateServer) Serve()

type User

type User struct {
	Name  string
	State UserState
	// contains filtered or unexported fields
}

func (*User) Logined

func (user *User) Logined()

type UserState

type UserState struct {
	Login uint32
	State
}

type Users

type Users struct {
	sync.RWMutex
	List map[string]*User
}

func NewUsers

func NewUsers() (users Users)

func (*Users) Get

func (users *Users) Get(name string) *User

func (*Users) Set

func (users *Users) Set(name, password string)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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