Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthIdentity

type AuthIdentity struct {
	gorm.Model
	Basic
	SignLogs
}

    AuthIdentity auth identity session model

    type Basic

    type Basic struct {
    	Provider          string // phone, email, wechat, github...
    	UID               string `gorm:"column:uid"`
    	EncryptedPassword string
    	UserID            string
    	ConfirmedAt       *time.Time
    }

      Basic basic information about auth identity

      func (Basic) ToClaims

      func (basic Basic) ToClaims() *claims.Claims

        ToClaims convert to auth Claims

        type SignLog

        type SignLog struct {
        	UserAgent string
        	At        *time.Time
        	IP        string
        }

          SignLog sign log

          type SignLogs

          type SignLogs struct {
          	Log         string `sql:"-"`
          	SignInCount uint
          	Logs        []SignLog
          }

            SignLogs record sign in logs

            func (*SignLogs) Scan

            func (signLogs *SignLogs) Scan(data interface{}) (err error)

              Scan scan data into sign logs

              func (SignLogs) Value

              func (signLogs SignLogs) Value() (driver.Value, error)

                Value return struct's Value