registry

package
v0.0.0-...-da8896c Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2015 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PW_SALT_LEN = 32
	PW_KEY_KEN  = 32
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	db.Record

	Name         string
	Users        []string
	Share        int
	Properties   []string
	Organization string
	// contains filtered or unexported fields
}

func (*Group) AddProperties

func (g *Group) AddProperties(props ...string)

func (*Group) AddUsers

func (g *Group) AddUsers(users ...string)

func (*Group) GetPrimaryKey

func (g *Group) GetPrimaryKey() []byte

func (*Group) RemoveProperties

func (g *Group) RemoveProperties(props ...string)

func (*Group) RemoveUsers

func (g *Group) RemoveUsers(users ...string)

func (*Group) Store

func (g *Group) Store() error

func (*Group) Validate

func (g *Group) Validate() error

type Organization

type Organization struct {
	db.Record

	Handle string `db:"pk"`
	Groups []string
}

func NewOrg

func NewOrg(db db.DB) *Organization

func (*Organization) Create

func (o *Organization) Create() error

func (*Organization) CreateGroup

func (o *Organization) CreateGroup(name string) (*Group, error)

func (*Organization) GetGroup

func (o *Organization) GetGroup(name string) (*Group, error)

func (*Organization) GetUser

func (o *Organization) GetUser(handle string) (*User, error)

func (*Organization) NewUser

func (o *Organization) NewUser() *User

func (*Organization) Store

func (g *Organization) Store() error

func (*Organization) Users

func (o *Organization) Users() ([]*User, error)

func (*Organization) Validate

func (o *Organization) Validate() error

type User

type User struct {
	db.Record

	Handle       string
	Email        []string
	Name         string
	Password     []byte
	Organization string `db:"indexed"`
}

func (*User) CheckPassword

func (u *User) CheckPassword(p string) bool

func (*User) Create

func (u *User) Create() error

func (*User) GetPrimaryKey

func (u *User) GetPrimaryKey() []byte

func (*User) SetPassword

func (u *User) SetPassword(p string)

func (*User) Validate

func (u *User) Validate() error

Jump to

Keyboard shortcuts

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