Documentation
¶
Index ¶
- type CivicData
- type Details
- type Flag
- type Flagger
- type Flags
- type GitcoinPassportData
- type Included
- func (c *Included) Add(includes ...Resource)
- func (c Included) MarshalJSON() ([]byte, error)
- func (c *Included) MustNewNonce(key Key) *NewNonce
- func (c *Included) MustNonce(key Key) *Nonce
- func (c *Included) MustVerify(key Key) *Verify
- func (c *Included) MustVerifyStatus(key Key) *VerifyStatus
- func (c *Included) UnmarshalJSON(data []byte) error
- type Key
- type Links
- type NewNonce
- type NewNonceAttributes
- type NewNonceListResponse
- type NewNonceResponse
- type Nonce
- type NonceAttributes
- type NonceListRequest
- type NonceRequest
- type Relation
- type RelationCollection
- type Resource
- type ResourceType
- type UnauthorizedError
- type UnstoppableDomainsData
- type Verify
- type VerifyAttributes
- type VerifyListRequest
- type VerifyRequest
- type VerifyStatus
- type VerifyStatusAttributes
- type VerifyStatusListRequest
- type VerifyStatusRequest
- type WorldcoinData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CivicData ¶
type CivicData struct {
// The user's address
Address string `json:"address"`
// One of the available chain's name
ChainName string `json:"chain_name"`
// The signature of the requested nonce to validate if the user owns the address
Signature string `json:"signature"`
}
Civic provider's data
type Details ¶
type Details json.RawMessage
func (Details) MarshalJSON ¶
MarshalJSON - casts Details to []byte
func (*Details) UnmarshalJSON ¶
UnmarshalJSON - casts data to Details
type GitcoinPassportData ¶
type GitcoinPassportData struct {
// The user's address
Address string `json:"address"`
// The signature of the requested nonce to validate if the user owns the address
Signature string `json:"signature"`
}
Gitcoin passport provider's data
type Included ¶
type Included struct {
// contains filtered or unexported fields
}
Included - an array of Resource objects that are related to the primary data and/or each other (“included resources”).
func (Included) MarshalJSON ¶
MarshalJSON - marshals include collection as array of json objects
func (*Included) MustNewNonce ¶
MustNewNonce - returns NewNonce from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustNonce ¶
MustNonce - returns Nonce from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustVerify ¶
MustVerify - returns Verify from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) MustVerifyStatus ¶
func (c *Included) MustVerifyStatus(key Key) *VerifyStatus
MustVerifyStatus - returns VerifyStatus from include collection. if entry with specified key does not exist - returns nil if entry with specified key exists but type or ID mismatches - panics
func (*Included) UnmarshalJSON ¶
UmarshalJSON - unmarshal array of json objects into include collection
type Key ¶
type Key struct {
ID string `json:"id"`
Type ResourceType `json:"type"`
}
func NewKeyInt64 ¶
func NewKeyInt64(id int64, resourceType ResourceType) Key
func (Key) AsRelation ¶
type NewNonce ¶
type NewNonce struct {
Key
Attributes NewNonceAttributes `json:"attributes"`
}
type NewNonceAttributes ¶
type NewNonceAttributes struct {
// Message to be signed with MetaMask's `personal_sign`. Contains some user-friendly text and a random nonce.
Message string `json:"message"`
}
type NewNonceListResponse ¶
type NewNonceResponse ¶
type Nonce ¶
type Nonce struct {
Key
Attributes NonceAttributes `json:"attributes"`
}
type NonceAttributes ¶
type NonceAttributes struct {
// Account Address from MetaMask
Address string `json:"address"`
}
type NonceListRequest ¶
type NonceRequest ¶
type RelationCollection ¶
func (RelationCollection) MarshalJSON ¶
func (r RelationCollection) MarshalJSON() ([]byte, error)
type ResourceType ¶
type ResourceType string
const ( NONCE ResourceType = "nonce" NONCE_REQUEST ResourceType = "nonce_request" VERIFICATION_ID ResourceType = "verification_id" VERIFY ResourceType = "verify" VERIFY_STATUS ResourceType = "verify_status" )
List of ResourceType
type UnauthorizedError ¶
type UnstoppableDomainsData ¶
type UnstoppableDomainsData struct {
// The API access token provides the ability to retrieve the user's metadata. You can receive it by using AuthWithPopUp of Unstoppable Domain API.
AccessToken string `json:"access_token"`
}
Unstoppable domain provider's data
type Verify ¶
type Verify struct {
Key
Attributes VerifyAttributes `json:"attributes"`
}
type VerifyAttributes ¶
type VerifyAttributes struct {
// Iden3 identity's id
IdentityId string `json:"identity_id"`
ProviderData json.RawMessage `json:"provider_data"`
}
type VerifyListRequest ¶
type VerifyRequest ¶
type VerifyStatus ¶
type VerifyStatus struct {
Key
Attributes VerifyStatusAttributes `json:"attributes"`
}
type VerifyStatusAttributes ¶
type VerifyStatusListRequest ¶
type VerifyStatusListRequest struct {
Data []VerifyStatus `json:"data"`
Included Included `json:"included"`
Links *Links `json:"links"`
}
type VerifyStatusRequest ¶
type VerifyStatusRequest struct {
Data VerifyStatus `json:"data"`
Included Included `json:"included"`
}
type WorldcoinData ¶
type WorldcoinData struct {
// The API JWT provides the ability to retrieve the user's metadata. You can receive it after successful /authorize flow.
IdToken string `json:"id_token"`
}
Worldcoin provider's data
Source Files
¶
- db.go
- flag.go
- included.go
- model_civic_data.go
- model_details.go
- model_gitcoin_passport_data.go
- model_key.go
- model_links.go
- model_new_nonce.go
- model_new_nonce_attributes.go
- model_nonce.go
- model_nonce_attributes.go
- model_relation.go
- model_relation_collection.go
- model_resource_type.go
- model_unauthorized_error.go
- model_unstoppable_domains_data.go
- model_verify.go
- model_verify_attributes.go
- model_verify_status.go
- model_verify_status_attributes.go
- model_worldcoin_data.go