entities

package
v0.0.0-...-ff4c41b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ChurchMember = Role{
		ID:   1,
		Name: "Church Member",
		Scopes: []Scope{
			EventCheckIn,
			EventView,
			ProfileView,
			ProfileUpdate,
		},
	}
	Admin = Role{
		ID:   0,
		Name: "Admin",
		Scopes: []Scope{
			AllAccess,
		},
	}
)

Functions

This section is empty.

Types

type Account

type Account struct {
	Email EmailAddress
	Roles []Role
}

type EmailAddress

type EmailAddress string

func (EmailAddress) IsValid

func (e EmailAddress) IsValid() bool

type Otp

type Otp struct {
	EmailAddress EmailAddress
	PasswordHash []byte
	Salt         []byte
	ExpiredTime  time.Time
}

func (Otp) IsExpired

func (o Otp) IsExpired() bool

type PasswordDetail

type PasswordDetail struct {
	EmailAddress EmailAddress
	Salt         []byte
	PasswordHash []byte
}

type Person

type Person struct {
	ID         string
	FirstName  string
	MiddleName string
	LastName   string
}

type Role

type Role struct {
	ID     int
	Name   string
	Scopes []Scope
}

type Scope

type Scope string
const (
	AllAccess Scope = "ALL_ACCESS"

	EventView    Scope = "EVENT_VIEW"
	EventCheckIn Scope = "EVENT_CHECK_IN"

	ProfileView   Scope = "PROFILE_VIEW"
	ProfileUpdate Scope = "PROFILE_UPDATE"
)

type Token

type Token string

Jump to

Keyboard shortcuts

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