server

package
v0.0.0-...-92711a6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NOARGS []string

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Passwd, Regex string
	Allow         bool
}

type Client

type Client struct {
	Auth []Auth
}

type ClientIntern

type ClientIntern struct {
	Auth []string
}

type Command

type Command int
const (
	CLIENT_AUTH Command = iota
	QUIT
	LOGIN
	DISABLE
	ENABLE
	SET
	GET
	GETKEYS
	CHANGE_PASSWORD
	CHANGE_NAME
	USER_GROUPS
	USER
	DELETE_USER
	USERS
	ADD
	REMOVE
	DELETE_GROUP
	GROUPS
	GROUP_USERS
	GROUP
	STATS
	LOGINSTATS

	ERR_UNKNOWN_FUNC
	ERR_MISSING_ARGS
	ERR_INVALID_ARGS
)

type Config

func Read

func Read(filename string) (config Config, err error)

type ConfigIntern

type ConfigIntern struct {
	Daemon
	Syslog SyslogIntern
	Client ClientIntern
	Security
	Ssl
	Sqlite
	Mysql
	Postgres
	Proxy
}

type Context

type Context struct {
	*Server
	// contains filtered or unexported fields
}

func NewContext

func NewContext(conn net.Conn, server *Server) *Context

func (*Context) Close

func (context *Context) Close()

func (*Context) Err

func (context *Context) Err(code string)

func (*Context) Handle

func (context *Context) Handle()

func (*Context) Log

func (context *Context) Log(line string)

func (*Context) Logf

func (context *Context) Logf(format string, args ...interface{})

func (*Context) Ok

func (context *Context) Ok()

func (*Context) OkValue

func (context *Context) OkValue(value interface{})

func (*Context) Realm

func (context *Context) Realm()

func (*Context) Write

func (context *Context) Write(line string)

func (*Context) Writef

func (context *Context) Writef(format string, args ...interface{})

type Daemon

type Daemon struct {
	Listen              []string
	Realm, Backend, Pid string
	Foreground          bool
}

type Interpreter

type Interpreter struct {
	*Context
	// contains filtered or unexported fields
}

type Mysql

type Mysql struct {
	Url string
}

type Postgres

type Postgres struct {
	Url string
}

type Proxy

type Proxy struct {
	Host         string
	Ssl          bool
	Cert, Passwd string
}

type Security

type Security struct {
	Chroot, Uid string
}

type Server

type Server struct {
	Logger  *log.Logger
	Cfg     *Config
	Backend backends.Abstract
	App     *cli.App
	Logging bool

	Stats
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Run

func (s *Server) Run(args []string)

func (*Server) RunContext

func (s *Server) RunContext(c *cli.Context)

func (*Server) Stop

func (s *Server) Stop() (err error)

type Sqlite

type Sqlite struct {
	Url string
}

type Ssl

type Ssl struct {
	Enabled   bool
	Key, Cert string
}

type Stats

type Stats struct {
	Connects, Disconnects, Login, FailedLogin int
	// contains filtered or unexported fields
}

func (*Stats) ActiveConnections

func (s *Stats) ActiveConnections() int

func (*Stats) Reset

func (s *Stats) Reset()

type SubParser

type SubParser func(line string) (Command, []string)

type Syslog

type Syslog struct {
	Facility, Severity syslog.Priority
}

type SyslogIntern

type SyslogIntern struct {
	Facility, Level string
}

Jump to

Keyboard shortcuts

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