Documentation ¶
Index ¶
- type Claim
- type ClaimAttributes
- type ClaimListResponse
- type ClaimResponse
- type Details
- type DocumentNullifier
- type DocumentNullifierAttributes
- type DocumentNullifierListResponse
- type DocumentNullifierResponse
- type EncapsulatedData
- type Flag
- type Flagger
- type Flags
- type GistData
- type GistDataAttributes
- type GistDataListResponse
- type GistDataResponse
- type GistProof
- type Included
- func (c *Included) Add(includes ...Resource)
- func (c Included) MarshalJSON() ([]byte, error)
- func (c *Included) MustClaim(key Key) *Claim
- func (c *Included) MustDocumentNullifier(key Key) *DocumentNullifier
- func (c *Included) MustGistData(key Key) *GistData
- func (c *Included) UnmarshalJSON(data []byte) error
- type Key
- type Links
- type Relation
- type RelationCollection
- type Resource
- type ResourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claim ¶
type Claim struct { Key Attributes ClaimAttributes `json:"attributes"` }
type ClaimAttributes ¶
type ClaimListResponse ¶
type ClaimResponse ¶
type Details ¶
type Details json.RawMessage
func (Details) MarshalJSON ¶
MarshalJSON - casts Details to []byte
func (*Details) UnmarshalJSON ¶
UnmarshalJSON - casts data to Details
type DocumentNullifier ¶ added in v0.7.0
type DocumentNullifier struct { Key Attributes DocumentNullifierAttributes `json:"attributes"` }
type DocumentNullifierAttributes ¶ added in v0.7.0
type DocumentNullifierAttributes struct {
DocumentNullifierHash string `json:"document_nullifier_hash"`
}
type DocumentNullifierListResponse ¶ added in v0.7.0
type DocumentNullifierListResponse struct { Data []DocumentNullifier `json:"data"` Included Included `json:"included"` Links *Links `json:"links"` }
type DocumentNullifierResponse ¶ added in v0.7.0
type DocumentNullifierResponse struct { Data DocumentNullifier `json:"data"` Included Included `json:"included"` }
type EncapsulatedData ¶
type EncapsulatedData struct { Version int PrivateKeyAlgorithm asn1.RawValue PrivateKey struct { El1 struct { Integer int OctetStr asn1.RawValue } El2 struct { Integer int OctetStr asn1.RawValue } El3 struct { Integer int OctetStr asn1.RawValue } El4 struct { Integer int OctetStr asn1.RawValue } El5 struct { Integer int OctetStr asn1.RawValue } El6 struct { Integer int OctetStr asn1.RawValue } El7 struct { Integer int OctetStr asn1.RawValue } El8 struct { Integer int OctetStr asn1.RawValue } } }
type GistData ¶ added in v0.5.0
type GistData struct { Key Attributes GistDataAttributes `json:"attributes"` }
type GistDataAttributes ¶ added in v0.5.0
type GistDataListResponse ¶ added in v0.5.0
type GistDataResponse ¶ added in v0.5.0
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) MustClaim ¶
MustClaim - returns Claim 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) MustDocumentNullifier ¶ added in v0.7.0
func (c *Included) MustDocumentNullifier(key Key) *DocumentNullifier
MustDocumentNullifier - returns DocumentNullifier 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) MustGistData ¶ added in v0.5.0
MustGistData - returns GistData 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 ¶
UnmarshalJSON - 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 RelationCollection ¶
func (RelationCollection) MarshalJSON ¶
func (r RelationCollection) MarshalJSON() ([]byte, error)
type ResourceType ¶
type ResourceType string
const ( CLAIMS ResourceType = "claims" NULLIFIERS ResourceType = "nullifiers" GIST_DATAS ResourceType = "gist_datas" )
List of ResourceType
Source Files ¶
- db.go
- encapsulated_content.go
- flag.go
- included.go
- links.go
- model_claim.go
- model_claim_attributes.go
- model_details.go
- model_document_nullifier.go
- model_document_nullifier_attributes.go
- model_gist_data.go
- model_gist_data_attributes.go
- model_gist_proof.go
- model_key.go
- model_relation.go
- model_relation_collection.go
- model_resource_type.go