access

package
v0.0.0-...-3315f0c Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCredentials = errors.New("bad username or password")
	ErrDatabase    = errors.New("a database error occurred")
)

Functions

This section is empty.

Types

type Access

type Access interface {
	Login(username, password string) (User, error)
}

func New

func New(configs map[string]string, log log15.Logger, db *sql.DB) (Access, error)

type Local

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

func (*Local) Login

func (l *Local) Login(username, password string) (User, error)

type LocalUser

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

func (*LocalUser) Groups

func (u *LocalUser) Groups() []string

func (*LocalUser) Name

func (u *LocalUser) Name() string

func (*LocalUser) PrimaryGroup

func (u *LocalUser) PrimaryGroup() string

type User

type User interface {
	Name() string
	Groups() []string
	PrimaryGroup() string
}

Jump to

Keyboard shortcuts

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