identity

package
v2.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Id    string
	Value interface{}
}

type AttributeDescriptor

type AttributeDescriptor struct {
	DisplayName   string
	TechnicalName string
	Description   string
}

type BooleanAttribute

type BooleanAttribute struct {
	Attribute
}

func NewBooleanAttribute

func NewBooleanAttribute(key string, value bool) BooleanAttribute

func NewBooleanAttributeFromProto

func NewBooleanAttributeFromProto(s *proto.BooleanAttribute) BooleanAttribute

func (BooleanAttribute) ToProto

type BooleanAttributeDescriptor

type BooleanAttributeDescriptor struct {
	AttributeDescriptor
}

func NewBooleanAttributeDescriptor

func NewBooleanAttributeDescriptor(name string, technicalName string, description string) BooleanAttributeDescriptor

func (BooleanAttributeDescriptor) ToProto

type Credential

type Credential struct {
	Context           []string
	Id                string
	Type              []string
	IssuanceDate      string
	CredentialSubject interface{}
	CredentialStatus  CredentialStatus
	Issuer            string
	CredentialSchema  CredentialSchema
	Proof             CredentialProof
}

func NewCredentialFromJson

func NewCredentialFromJson(json string) (Credential, error)

func NewCredentialFromProto

func NewCredentialFromProto(s *proto.Credential) Credential

func (Credential) ToJson

func (c Credential) ToJson() (string, error)

func (Credential) ToProto

func (c Credential) ToProto() *proto.Credential

type CredentialBuilder

type CredentialBuilder struct {
	// contains filtered or unexported fields
}

func NewCredentialBuilder

func NewCredentialBuilder(schemaId string, holderKey string, configData *proto.ConfigData) CredentialBuilder

func (CredentialBuilder) Build

func (CredentialBuilder) WithBooleanAttribute

func (c CredentialBuilder) WithBooleanAttribute(key string, value bool) CredentialBuilder

func (CredentialBuilder) WithDateAttribute

func (c CredentialBuilder) WithDateAttribute(key string, value int64) CredentialBuilder

func (CredentialBuilder) WithDatetimeAttribute

func (c CredentialBuilder) WithDatetimeAttribute(key string, value int64) CredentialBuilder

func (CredentialBuilder) WithNumberAttribute

func (c CredentialBuilder) WithNumberAttribute(key string, value int64) CredentialBuilder

func (CredentialBuilder) WithStringAttribute added in v2.5.7

func (c CredentialBuilder) WithStringAttribute(key string, value string) CredentialBuilder

type CredentialOffer

type CredentialOffer struct {
	Thid string
	Body CredentialOfferBody
	From string
	To   string
}

func NewCredentialOfferFromJson

func NewCredentialOfferFromJson(json string) (CredentialOffer, error)

func NewCredentialOfferFromProto

func NewCredentialOfferFromProto(s *proto.CredentialOffer) CredentialOffer

func (CredentialOffer) ToJson

func (c CredentialOffer) ToJson() (string, error)

func (CredentialOffer) ToProto

func (c CredentialOffer) ToProto() *proto.CredentialOffer

type CredentialOfferBody

type CredentialOfferBody struct {
	Url         string
	Credentials []CredentialOfferCredential
}

func NewCredentialOfferBodyFromProto

func NewCredentialOfferBodyFromProto(s *proto.CredentialOfferBody) CredentialOfferBody

func (CredentialOfferBody) ToProto

type CredentialOfferCredential

type CredentialOfferCredential struct {
	Id          string
	Description string
}

func (CredentialOfferCredential) ToProto

type CredentialProof

type CredentialProof struct {
	BloockProof    integrity.Proof
	SignatureProof authenticity.SignatureJws
}

func NewCredentialProofFromProto

func NewCredentialProofFromProto(s *proto.CredentialProof) CredentialProof

func (CredentialProof) ToProto

func (c CredentialProof) ToProto() *proto.CredentialProof

type CredentialReceipt

type CredentialReceipt struct {
	Id       string
	AnchorID int64
}

func NewCredentialReceiptFromProto

func NewCredentialReceiptFromProto(s *proto.CredentialReceipt) CredentialReceipt

func (CredentialReceipt) ToProto

type CredentialSchema

type CredentialSchema struct {
	Id   string
	Type string
}

func NewCredentialSchemaFromProto

func NewCredentialSchemaFromProto(s *proto.CredentialSchema) CredentialSchema

func (CredentialSchema) ToProto

type CredentialStatus

type CredentialStatus struct {
	Id              string
	RevocationNonce int64
	Type            string
}

func NewCredentialStatusFromProto

func NewCredentialStatusFromProto(s *proto.CredentialStatus) CredentialStatus

func (CredentialStatus) ToProto

type CredentialVerification

type CredentialVerification struct {
	Timestamp  uint64
	Issuer     string
	Revocation uint64
}

func (CredentialVerification) ToProto

type DateAttribute

type DateAttribute struct {
	Attribute
}

func NewDateAttribute

func NewDateAttribute(key string, value int64) DateAttribute

func NewDateAttributeFromProto

func NewDateAttributeFromProto(s *proto.DateAttribute) DateAttribute

func (DateAttribute) ToProto

func (s DateAttribute) ToProto() *proto.DateAttribute

type DateAttributeDescriptor

type DateAttributeDescriptor struct {
	AttributeDescriptor
}

func NewDateAttributeDescriptor

func NewDateAttributeDescriptor(name string, technicalName string, description string) DateAttributeDescriptor

func (DateAttributeDescriptor) ToProto

type DatetimeAttribute

type DatetimeAttribute struct {
	Attribute
}

func NewDatetimeAttribute

func NewDatetimeAttribute(key string, value int64) DatetimeAttribute

func NewDatetimeAttributeFromProto

func NewDatetimeAttributeFromProto(s *proto.DateTimeAttribute) DatetimeAttribute

func (DatetimeAttribute) ToProto

type DatetimeAttributeDescriptor

type DatetimeAttributeDescriptor struct {
	AttributeDescriptor
}

func NewDatetimeAttributeDescriptor

func NewDatetimeAttributeDescriptor(name string, technicalName string, description string) DatetimeAttributeDescriptor

func (DatetimeAttributeDescriptor) ToProto

type Identity

type Identity struct {
	Mnemonic   string
	Key        string
	PrivateKey string
}

func NewIdentityFromProto

func NewIdentityFromProto(s *proto.Identity) Identity

func (Identity) ToProto

func (c Identity) ToProto() *proto.Identity

type NumberAttribute

type NumberAttribute struct {
	Attribute
}

func NewNumberAttribute

func NewNumberAttribute(key string, value int64) NumberAttribute

func NewNumberAttributeFromProto

func NewNumberAttributeFromProto(s *proto.NumberAttribute) NumberAttribute

func (NumberAttribute) ToProto

func (s NumberAttribute) ToProto() *proto.NumberAttribute

type NumberAttributeDescriptor

type NumberAttributeDescriptor struct {
	AttributeDescriptor
}

func NewNumberAttributeDescriptor

func NewNumberAttributeDescriptor(name string, technicalName string, description string) NumberAttributeDescriptor

func (NumberAttributeDescriptor) ToProto

type Schema

type Schema struct {
	Id   string
	Json string
}

func NewSchemaFromProto

func NewSchemaFromProto(s *proto.Schema) Schema

func (Schema) ToProto

func (c Schema) ToProto() *proto.Schema

type SchemaBuilder

type SchemaBuilder struct {
	// contains filtered or unexported fields
}

func NewSchemaBuilder

func NewSchemaBuilder(displayName string, technicalName string, configData *proto.ConfigData) SchemaBuilder

func (SchemaBuilder) AddBooleanAttribute

func (c SchemaBuilder) AddBooleanAttribute(name string, technicalName string, description string) SchemaBuilder

func (SchemaBuilder) AddDateAttribute

func (c SchemaBuilder) AddDateAttribute(name string, technicalName string, description string) SchemaBuilder

func (SchemaBuilder) AddDatetimeAttribute

func (c SchemaBuilder) AddDatetimeAttribute(name string, technicalName string, description string) SchemaBuilder

func (SchemaBuilder) AddNumberAttribute

func (c SchemaBuilder) AddNumberAttribute(name string, technicalName string, description string) SchemaBuilder

func (SchemaBuilder) AddStringAttribute added in v2.5.7

func (c SchemaBuilder) AddStringAttribute(name string, technicalName string, description string) SchemaBuilder

func (SchemaBuilder) Build

func (c SchemaBuilder) Build() (Schema, error)

type StringAttribute added in v2.5.7

type StringAttribute struct {
	Attribute
}

func NewStringAttribute added in v2.5.7

func NewStringAttribute(key string, value string) StringAttribute

func NewStringAttributeFromProto added in v2.5.7

func NewStringAttributeFromProto(s *proto.StringAttribute) StringAttribute

func (StringAttribute) ToProto added in v2.5.7

func (s StringAttribute) ToProto() *proto.StringAttribute

type StringAttributeDescriptor added in v2.5.7

type StringAttributeDescriptor struct {
	AttributeDescriptor
}

func NewStringAttributeDescriptor added in v2.5.7

func NewStringAttributeDescriptor(name string, technicalName string, description string) StringAttributeDescriptor

func NewStringAttributeDescriptorFromProto added in v2.5.7

func NewStringAttributeDescriptorFromProto(s *proto.StringAttributeDefinition) StringAttributeDescriptor

func (StringAttributeDescriptor) ToProto added in v2.5.7

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL