Documentation ¶
Index ¶
- Variables
- func Must(dsn *url.URL) store.Store
- func New(dsn *url.URL) (store.Store, error)
- type Teams
- func (t *Teams) AppendUser(ctx context.Context, teamID, userID, perm string) error
- func (t *Teams) Create(ctx context.Context, team *model.Team) (*model.Team, error)
- func (t *Teams) Delete(ctx context.Context, name string) error
- func (t *Teams) DropUser(ctx context.Context, teamID, userID string) error
- func (t *Teams) List(ctx context.Context) ([]*model.Team, error)
- func (t *Teams) ListUsers(ctx context.Context, id string) ([]*model.TeamUser, error)
- func (t *Teams) PermitUser(ctx context.Context, teamID, userID, perm string) error
- func (t *Teams) Show(ctx context.Context, name string) (*model.Team, error)
- func (t *Teams) Update(ctx context.Context, team *model.Team) (*model.Team, error)
- type Users
- func (u *Users) AppendTeam(ctx context.Context, userID, teamID, perm string) error
- func (u *Users) ByBasicAuth(ctx context.Context, username, password string) (*model.User, error)
- func (u *Users) Create(ctx context.Context, user *model.User) (*model.User, error)
- func (u *Users) Delete(ctx context.Context, name string) error
- func (u *Users) DropTeam(ctx context.Context, userID, teamID string) error
- func (u *Users) List(ctx context.Context) ([]*model.User, error)
- func (u *Users) ListTeams(ctx context.Context, id string) ([]*model.TeamUser, error)
- func (u *Users) PermitTeam(ctx context.Context, userID, teamID, perm string) error
- func (u *Users) Show(ctx context.Context, name string) (*model.User, error)
- func (u *Users) Update(ctx context.Context, user *model.User) (*model.User, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPasswordEncrypt inditcates that bcrypt failed to create password. ErrPasswordEncrypt = errors.New("failed to encrypt password") )
Functions ¶
Types ¶
type Teams ¶
type Teams struct {
// contains filtered or unexported fields
}
Teams implements teams.Store interface.
func (*Teams) AppendUser ¶
AppendUser implements AppendUser from teams.Store interface.
func (*Teams) PermitUser ¶
PermitUser implements PermitUser from teams.Store interface.
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
Users implements users.Store interface.
func (*Users) AppendTeam ¶
AppendTeam implements AppendTeam from teams.Store interface.
func (*Users) ByBasicAuth ¶
ByBasicAuth implements ByBasicAuth from users.Store interface.
func (*Users) PermitTeam ¶
PermitTeam implements PermitTeam from teams.Store interface.
Click to show internal directories.
Click to hide internal directories.