account

package
v0.0.0-...-d2a2bec Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: GPL-3.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenClaims

type AccessTokenClaims struct {
	jwt.StandardClaims
	UserID string
	Admin  bool
}

type Client

type Client struct {
	alira.Model
	Code          string
	Name          string
	SecretKey     string
	CreatedBy     string
	Domain        string
	Namespace     string
	PrivacyPolicy string
	TermOfService string
	Icon          string
	Email         string
	NotBefore     time.Time `gorm:"default:null"`
	NotAfter      time.Time `gorm:"default:null"`
}

func (*Client) BeforeCreate

func (client *Client) BeforeCreate(scope *gorm.Scope) error

func (Client) TableName

func (Client) TableName() string

type Identity

type Identity struct {
	alira.Model
	Class     string
	UserID    string
	Code      string
	Email     string `gorm:"default:null"`
	NotBefore time.Time
	NotAfter  time.Time `gorm:"default:null"`
	Valid     bool      `gorm:"default:true"`
}

func (*Identity) BeforeCreate

func (model *Identity) BeforeCreate(scope *gorm.Scope) error

func (Identity) TableName

func (Identity) TableName() string

type NationalIdentity

type NationalIdentity struct {
	alira.Model
	IdentityID     string
	UserID         string
	Document       string
	NationID       string
	Fullname       string
	BirthPlace     string
	BirthDate      time.Time `gorm:"default:null"`
	Address        string    `gorm:"default:null"`
	City           string    `gorm:"default:null"`
	State          string    `gorm:"default:null"`
	Province       string    `gorm:"default:null"`
	Country        string    `gorm:"default:null"`
	PostalCode     string    `gorm:"default:null"`
	BloodType      string    `gorm:"default:null"`
	Religion       string    `gorm:"default:null"`
	MarriedStatus  string    `gorm:"default:null"`
	Type           string    `gorm:"default:null"`
	Nationality    string    `gorm:"default:null"`
	IssueDate      time.Time `gorm:"default:null"`
	ExpiryDate     time.Time `gorm:"default:null"`
	RegistrationNo string    `gorm:"default:null"`
	IssuedOffice   string    `gorm:"default:null"`
	Nikim          string    `gorm:"default:null"`
}

func (NationalIdentity) TableName

func (NationalIdentity) TableName() string

type Profile

type Profile struct {
	ID              string `gorm:"primary_key"`
	CreatedBy       string `gorm:"default:null"`
	CreatedAt       time.Time
	UpdatedBy       string `gorm:"default:null"`
	UpdatedAt       time.Time
	DeletedBy       string     `gorm:"default:null"`
	DeletedAt       *time.Time `sql:"index"`
	FirstName       string
	MiddleName      string
	LastName        string
	NickName        string
	Gender          string
	SecondaryMobile string
}

func (Profile) TableName

func (Profile) TableName() string

type RefreshTokenClaims

type RefreshTokenClaims struct {
	jwt.StandardClaims
	UserID string
	Sub    int
}

type Role

type Role struct {
	alira.Model
	ClientID    string
	Code        string
	Name        string
	Description string
}

func (Role) TableName

func (Role) TableName() string

type Subscription

type Subscription struct {
	alira.Model
	Class       string `gorm:"default:'USERTYPE'"`
	Code        string
	Name        string
	Description string
	Applicator  string `gorm:"default:null"`
	Subscriber  string `sql:"index"`
	Signature   string
	NotBefore   time.Time
	NotAfter    time.Time
	AgreedAt    time.Time
}

func (*Subscription) BeforeCreate

func (model *Subscription) BeforeCreate(scope *gorm.Scope) error

func (Subscription) TableName

func (Subscription) TableName() string

type Token

type Token struct {
	alira.Model
	Class        string
	Referer      string
	UserID       string
	Agent        string
	AccessToken  string
	RefreshToken string
	IPAddress    string
	NotBefore    time.Time
	NotAfter     time.Time `gorm:"default:null"`
	Valid        bool      `gorm:"default:true"`
}

func (*Token) BeforeCreate

func (model *Token) BeforeCreate(scope *gorm.Scope) error

func (Token) TableName

func (Token) TableName() string

type User

type User struct {
	alira.Model
	Username       string
	Email          string
	Mobile         string
	Avatar         string
	Active         bool `grom:"default:false"`
	FirstTimeLogin bool `grom:"default:false"`
	UsePin         bool `grom:"default:false"`
	Pin            string
	Profile        Profile `gorm:"foreignkey:ID"`
}

User hold information about an user

func (User) TableName

func (User) TableName() string

Jump to

Keyboard shortcuts

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