accounts

package
v0.0.0-...-9544dd2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// AccountTypeAdmin define account type ADMIN
	AccountTypeAdmin = AccountType("ADMIN")

	// AccountTypeDevice define account type DEVICE
	AccountTypeDevice = AccountType("DEVICE")

	// AccountTypeOrg define account type ORG
	AccountTypeOrg = AccountType("ORG")

	// AccountTypeService define account type SERVICE
	AccountTypeService = AccountType("SERVICE")

	// AccountTypeUser define account type USER
	AccountTypeUser = AccountType("USER")

	// AccountTypeSessionUser define account type SESSION
	AccountTypeSessionUser = AccountType("SESSION")

	// AccountTypeClient define account type CLIENT
	AccountTypeClient = AccountType("CLIENT")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID primitive.ObjectID `json:"-" bson:"_id"`

	Type  AccountType `json:"type" bson:"type"`
	Email string      `json:"email" bson:"email"`
	Nick  string      `json:"nick" bson:"nick"`
	Prn   string      `json:"prn" bson:"prn"`

	Password       string `json:"password,omitempty" bson:"password"`
	PasswordBcrypt string `json:"password_bcrypt,omitempty" bson:"password_bcrypt"`
	PasswordScrypt string `json:"password_scrypt,omitempty" bson:"password_scrypt"`
	Challenge      string `json:"challenge,omitempty" bson:"challenge"`

	TimeCreated  time.Time `json:"time-created" bson:"time-created"`
	TimeModified time.Time `json:"time-modified" bson:"time-modified"`

	// Oauth2RedirectURIs is limiting the prefix available for redirecting users with oauth code and accesstoken to
	Oauth2RedirectURIs []string `json:"redirect_uris,omitempty" bson:"redirect_uris,omitempty"`
}

Account account information all the structure

func CreateAnonAccount

func CreateAnonAccount() Account

type AccountPublic

type AccountPublic struct {
	ID    primitive.ObjectID `json:"-" bson:"_id"`
	Type  AccountType        `json:"type" bson:"type"`
	Email string             `json:"email" bson:"email"`
	Nick  string             `json:"nick" bson:"nick"`
	Prn   string             `json:"prn" bson:"prn"`

	TimeCreated  time.Time `json:"time-created" bson:"time-created"`
	TimeModified time.Time `json:"time-modified" bson:"time-modified"`
}

AccountPublic Public information for one account

type AccountType

type AccountType string

AccountType Type of account

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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