Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentityID ¶
func NewIdentityID ¶
func NewIdentityID(id iden3core.ID) *IdentityID
func (*IdentityID) Scan ¶
func (id *IdentityID) Scan(src interface{}) error
type User ¶
type User struct {
ID uuid.UUID `db:"id" structs:"id"`
Status UserStatus `db:"status" structs:"status"`
CreatedAt time.Time `db:"created_at" structs:"created_at"`
// IdentityID is a unique user's ident3 identity id
IdentityID *IdentityID `db:"identity_id" structs:"-"`
EthAddress *common.Address `db:"eth_address" structs:"eth_address"`
// ProviderData Store raw information that received from identity provider.
// Its json structure depends on identity provider.
ProviderData []byte `db:"provider_data" structs:"provider_data"`
// ProviderHash is used for data uniqueness check.
ProviderHash []byte `db:"provider_hash" structs:"provider_hash"`
ClaimID uuid.UUID `db:"claim_id" structs:"claim_id"`
}
type UserStatus ¶
type UserStatus string
const ( UserStatusInitialized UserStatus = "initialized" UserStatusPending UserStatus = "pending" UserStatusVerified UserStatus = "verified" UserStatusUnverified UserStatus = "unverified" )
func (UserStatus) String ¶
func (s UserStatus) String() string
type UsersQ ¶
type UsersQ interface {
Get() (*User, error)
Select() ([]User, error)
Insert(user *User) error
Upsert(user *User) error
Update(user *User) error
Sort(sort pgdb.SortedOffsetPageParams) UsersQ
WhereID(id uuid.UUID) UsersQ
WhereStatus(status UserStatus) UsersQ
WhereIdentityID(id *IdentityID) UsersQ
WhereEthAddress(address common.Address) UsersQ
WhereProviderHash(providerHash []byte) UsersQ
}
Click to show internal directories.
Click to hide internal directories.