Documentation ¶
Index ¶
- Variables
- type BooleanExpression
- type CreateUserForm
- type FloatExpression
- type IntExpression
- type Log
- type LoginResponse
- type Object
- func (Object) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Object) GormDataType() string
- func (o Object) MarshalGQL(w io.Writer)
- func (o *Object) Scan(v interface{}) error
- func (o *Object) UnmarshalGQL(v interface{}) error
- func (o Object) Validate(schema map[string]config.Field) error
- func (o Object) Value() (driver.Value, error)
- type OrderDirection
- type RefreshToken
- type SignupForm
- type StringExpression
- type TimeExpression
- type User
- func (u *User) AcceptEmailInvite(tx *gorm.DB, log Log) error
- func (u *User) AcceptPhoneInvite(tx *gorm.DB, log Log) error
- func (u *User) AccountUnlockedAt() time.Time
- func (u *User) ChangeEmail(tx *gorm.DB, log Log, email string) error
- func (u *User) ChangePassword(tx *gorm.DB, log Log, password string, cost int) error
- func (u *User) ChangePhone(tx *gorm.DB, log Log, phone string) error
- func (u *User) ConfirmEmail(tx *gorm.DB, log Log) error
- func (u *User) ConfirmEmailChange(tx *gorm.DB, log Log) error
- func (u *User) ConfirmPhone(tx *gorm.DB, log Log) error
- func (u *User) ConfirmPhoneChange(tx *gorm.DB, log Log) error
- func (u *User) ConfirmReset(tx *gorm.DB, log Log) error
- func (u *User) Create(db *gorm.DB) error
- func (u *User) CreateWithLog(tx *gorm.DB, log *Log) error
- func (u *User) FinishedLoginAttempts() bool
- func (u *User) IncorrectAttempt(tx *gorm.DB, log Log) error
- func (u *User) InitEmailConfirmation(tx *gorm.DB) error
- func (u *User) InitPhoneConfirmation(tx *gorm.DB) error
- func (u *User) InviteByEmail(tx *gorm.DB, name string, email string) error
- func (u *User) InviteByPhone(tx *gorm.DB, name string, phone string) error
- func (u *User) ResetAttempt(tx *gorm.DB) error
- func (u *User) ResetByEmail(tx *gorm.DB, log Log) error
- func (u *User) ResetByPhone(tx *gorm.DB, log Log) error
- func (u *User) Save(tx *gorm.DB) error
- func (u *User) SaveWithLog(tx *gorm.DB, log *Log) error
- func (u *User) SetPassword(password string, cost int) error
- func (u *User) SignedIn(tx *gorm.DB, log Log) error
- func (u *User) VerifyPassword(password string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var AllOrderDirection = []OrderDirection{ OrderDirectionAsc, OrderDirectionDesc, }
Functions ¶
This section is empty.
Types ¶
type BooleanExpression ¶
type CreateUserForm ¶
type FloatExpression ¶ added in v0.7.1
type FloatExpression struct { // Equals value Eq *float64 `json:"_eq"` // Does not equal value Neq *float64 `json:"_neq"` // Is greater than value Gt *float64 `json:"_gt"` // Is greater than or equals value Gte *float64 `json:"_gte"` // Is value null (true) or not null (false) IsNull *bool `json:"_is_null"` // Is lesser than value Lt *float64 `json:"_lt"` // Is lesser than or equals value Lte *float64 `json:"_lte"` }
type IntExpression ¶ added in v0.7.1
type IntExpression struct { // Equals value Eq *int `json:"_eq"` // Does not equal value Neq *int `json:"_neq"` // Is greater than value Gt *int `json:"_gt"` // Is greater than or equals value Gte *int `json:"_gte"` // Is value null (true) or not null (false) IsNull *bool `json:"_is_null"` // Is lesser than value Lt *int `json:"_lt"` // Is lesser than or equals value Lte *int `json:"_lte"` }
type Log ¶
type LoginResponse ¶
type Object ¶ added in v0.2.0
type Object map[string]interface{}
func (Object) GormDBDataType ¶ added in v0.2.0
func (Object) GormDataType ¶ added in v0.2.0
func (Object) MarshalGQL ¶ added in v0.2.0
func (*Object) UnmarshalGQL ¶ added in v0.2.0
type OrderDirection ¶
type OrderDirection string
const ( // Ascending OrderDirectionAsc OrderDirection = "asc" // Descending OrderDirectionDesc OrderDirection = "desc" )
func (OrderDirection) IsValid ¶
func (e OrderDirection) IsValid() bool
func (OrderDirection) MarshalGQL ¶
func (e OrderDirection) MarshalGQL(w io.Writer)
func (OrderDirection) String ¶
func (e OrderDirection) String() string
func (*OrderDirection) UnmarshalGQL ¶
func (e *OrderDirection) UnmarshalGQL(v interface{}) error
type RefreshToken ¶
type SignupForm ¶
type StringExpression ¶
type StringExpression struct { // Equals value Eq *string `json:"_eq"` // Does not equal value Neq *string `json:"_neq"` // Is greater than value Gt *string `json:"_gt"` // Is greater than or equals value Gte *string `json:"_gte"` // Value matching pattern where '%' represents zero or more characters and '_' represents a single character. Eg. '_r%' finds values having 'r' in second position Like *string `json:"_like"` // Value matching (case-insensitive) pattern where '%' represents zero or more characters and '_' represents a single character. Eg. '_r%' finds values having 'r' in second position Ilike *string `json:"_ilike"` // Value not matching pattern where '%' represents zero or more characters and '_' represents a single character. Eg. '_r%' finds values not having 'r' in second position Nlike *string `json:"_nlike"` // Value not matching (case-insensitive) pattern where '%' represents zero or more characters and '_' represents a single character. Eg. '_r%' finds values not having 'r' in second position Nilike *string `json:"_nilike"` // Is value null (true) or not null (false) IsNull *bool `json:"_is_null"` // Is lesser than value Lt *string `json:"_lt"` // Is lesser than or equals value Lte *string `json:"_lte"` }
type TimeExpression ¶ added in v0.7.1
type TimeExpression struct { // Equals value Eq *string `json:"_eq"` // Does not equal value Neq *string `json:"_neq"` // Is greater than value Gt *string `json:"_gt"` // Is greater than or equals value Gte *string `json:"_gte"` // Is value null (true) or not null (false) IsNull *bool `json:"_is_null"` // Is lesser than value Lt *string `json:"_lt"` // Is lesser than or equals value Lte *string `json:"_lte"` }
type User ¶
type User struct { Config *config.Config `json:"-" gorm:"-"` ID string `json:"id,omitempty" gorm:"autoIncrement"` Email *string `json:"email,omitempty"` Phone *string `json:"phone,omitempty"` Name *string `json:"name,omitempty"` Avatar *string `json:"avatar,omitempty"` EmailConfirmed bool `json:"email_confirmed,omitempty"` EmailConfirmationTokenSentAt *time.Time `json:"email_confirmation_token_sent_at,omitempty"` EmailConfirmedAt *time.Time `json:"email_confirmed_at,omitempty"` PhoneConfirmed bool `json:"phone_confirmed,omitempty"` PhoneConfirmationTokenSentAt *time.Time `json:"phone_confirmation_token_sent_at,omitempty"` PhoneConfirmedAt *time.Time `json:"phone_confirmed_at,omitempty"` RecoveryTokenSentAt *time.Time `json:"recovery_token_sent_at,omitempty"` EmailChangeTokenSentAt *time.Time `json:"email_change_token_sent_at,omitempty"` PhoneChangeTokenSentAt *time.Time `json:"phone_change_token_sent_at,omitempty"` LastSigninAt *time.Time `json:"last_signin_at,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` NewEmail *string `json:"new_email,omitempty"` NewPhone *string `json:"new_phone,omitempty"` PhoneChangedAt *time.Time `json:"phone_changed_at,omitempty"` EmailChangedAt *time.Time `json:"email_changed_at,omitempty"` PasswordChangedAt *time.Time `json:"password_changed_at,omitempty"` IncorrectLoginAttempts int `json:"incorrect_login_attempts,omitempty"` LastIncorrectLoginAttemptAt *time.Time `json:"last_incorrect_login_attempt_at,omitempty"` Password *string `json:"-"` EmailConfirmationToken *string `json:"-"` PhoneConfirmationToken *string `json:"-"` RecoveryToken *string `json:"-"` EmailChangeToken *string `json:"-"` PhoneChangeToken *string `json:"-"` Data *Object `json:"data,omitempty"` }
func (*User) AccountUnlockedAt ¶ added in v0.8.0
func (*User) ChangePassword ¶
func (*User) CreateWithLog ¶ added in v0.8.0
func (*User) FinishedLoginAttempts ¶ added in v0.8.0
func (*User) InviteByEmail ¶
func (*User) InviteByPhone ¶
func (*User) VerifyPassword ¶
Click to show internal directories.
Click to hide internal directories.