human

package
v0.0.0-...-78e7222 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextualiseFilter

func ContextualiseFilter(filter bson.M, claimsToAdd claims.Claims) bson.M

func IsValidIdentifier

func IsValidIdentifier(id identifier.Identifier) bool

Types

type User

type User struct {
	Id string `json:"id" bson:"id"`

	// Personal Details
	Name    string `json:"name" bson:"name"`
	Surname string `json:"surname" bson:"surname"`

	// System Details
	Username     string   `json:"username" bson:"username"`
	EmailAddress string   `json:"emailAddress" bson:"emailAddress"`
	Password     []byte   `json:"password" bson:"password"`
	Roles        []string `json:"roles" bson:"roles"`

	// Party Details
	ParentPartyType party.Type    `json:"parentPartyType" bson:"parentPartyType"`
	ParentId        id.Identifier `json:"parentId" bson:"parentId"`
	PartyType       party.Type    `json:"partyType" bson:"partyType"`
	PartyId         id.Identifier `json:"partyId" bson:"partyId"`

	Registered bool `json:"registered" bson:"registered"`
}

Defines the User record for the database

func (*User) SetId

func (u *User) SetId(id string)

Jump to

Keyboard shortcuts

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