model

package
v0.0.0-...-c21d715 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ROLE_DB_SEPERATOR = ":"
	ROLES_SEPERATOR   = ","
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Role

type Role struct {
	Role string `bson:"role"`
	DB   string `bson:"db"`
}

func ParseRoleFromStr

func ParseRoleFromStr(s string) (*Role, error)

func ParseRolesFromStr

func ParseRolesFromStr(s string) ([]*Role, error)

func (*Role) String

func (r *Role) String() string

type User

type User struct {
	// primitive.ObjectID `bson:"_id"`
	// UserID             string   `bson:"userId"`
	User       string   `bson:"user"`
	DB         string   `bson:"db"`
	Roles      []Role   `bson:"roles"`
	Mechanisms []string `bson:"mechanisms"`
}

Jump to

Keyboard shortcuts

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