model

package
v1.2.2-0...-1fea88e Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	ID            string `rethinkdb:"id"`
	UID           string `rethinkdb:"uid"`
	Name          string `rethinkdb:"name"`
	Description   string `rethinkdb:"description"`
	Category      string `rethinkdb:"parent_category"`
	ExternalAppID string `rethinkdb:"external_app_id"`
	ExternalGID   string `rethinkdb:"external_gid"`
}

func (*Group) Exists

func (g *Group) Exists(ctx context.Context, sess r.QueryExecutor) (bool, error)

func (*Group) GenerateNameExternal

func (g *Group) GenerateNameExternal(prv string)

func (*Group) LoadExternal

func (g *Group) LoadExternal(ctx context.Context, sess r.QueryExecutor) error

type Role

type Role string
const (
	RoleAdmin    Role = "admin"
	RoleManager  Role = "manager"
	RoleAdvanced Role = "advanced"
	RoleUser     Role = "user"
)

func (Role) HasEqualOrMorePrivileges

func (r Role) HasEqualOrMorePrivileges(r2 Role) bool

func (Role) HasMorePrivileges

func (r Role) HasMorePrivileges(r2 Role) bool

type Secret

type Secret struct {
	ID         string `rethinkdb:"id"`
	CategoryID string `rethinkdb:"category_id"`
	Secret     string `rethinkdb:"secret"`
}

func (*Secret) Load

func (s *Secret) Load(ctx context.Context, sess r.QueryExecutor) error

type User

type User struct {
	ID       string `rethinkdb:"id"`
	UID      string `rethinkdb:"uid"`
	Username string `rethinkdb:"username"`
	Password string `rethinkdb:"password"`
	Provider string `rethinkdb:"provider"`
	Active   bool   `rethinkdb:"active"`

	Category string `rethinkdb:"category"`
	Role     Role   `rethinkdb:"role"`
	Group    string `rethinkdb:"group"`

	Name  string `rethinkdb:"name"`
	Email string `rethinkdb:"email"`
	Photo string `rethinkdb:"photo"`

	Accessed float64 `rethinkdb:"accessed"`
}

User is an user of IsardVDI

func (*User) Exists

func (u *User) Exists(ctx context.Context, sess r.QueryExecutor) (bool, error)

func (*User) Load

func (u *User) Load(ctx context.Context, sess r.QueryExecutor) error

func (*User) LoadWithoutID

func (u *User) LoadWithoutID(ctx context.Context, sess r.QueryExecutor) error

func (*User) LoadWithoutOverride

func (u *User) LoadWithoutOverride(u2 *User)

func (*User) Update

func (u *User) Update(ctx context.Context, sess r.QueryExecutor) error

Jump to

Keyboard shortcuts

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