mongo

package
v0.2.4-0...-bb5b233 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthenticationCollection = "bfs_auth"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

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

func NewAuthentication

func NewAuthentication() *Authentication

func (*Authentication) Authenticate

func (m *Authentication) Authenticate(usr, pw string) bool

func (*Authentication) ChangeUserDbAccess

func (m *Authentication) ChangeUserDbAccess(usr, db string, grant bool) error

func (*Authentication) ChangeUserPassword

func (m *Authentication) ChangeUserPassword(usr, pw string) error

func (*Authentication) ChangeUserStatus

func (m *Authentication) ChangeUserStatus(usr string, isactive bool) error

func (*Authentication) ClearAll

func (m *Authentication) ClearAll() error

func (*Authentication) HasDbAccess

func (m *Authentication) HasDbAccess(usr, db string) bool

func (*Authentication) ListUser

func (m *Authentication) ListUser(rgx string) ([]string, error)

func (*Authentication) NewUser

func (m *Authentication) NewUser(usr, pw string, root bool) error

func (*Authentication) RemoveUser

func (m *Authentication) RemoveUser(usr string) error

func (*Authentication) Start

func (m *Authentication) Start(config string) error

func (*Authentication) UserInfo

func (m *Authentication) UserInfo(u string) (*bytengine.User, error)

type Config

type Config struct {
	Addresses    []string      `json:"addresses"`
	Timeout      time.Duration `json:"timeout"`
	AuthDatabase string        `json:"authdb"`
	Username     string        `json:"username"`
	Password     string        `json:"password"`
	UserDatabase string        `json:"userdb"`
}

Jump to

Keyboard shortcuts

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