Skip to main content

identity

import "github.com/bloock/bloock-sdk-go/v2/entity/identity"

Index

Variables

DidMethodEnumFromProto
var (
DidMethodEnumFromProto = map[proto.DidMethod]DidMethod{
proto.DidMethod_POLYGON_ID: PolygonID,
proto.DidMethod_POLYGON_ID_TEST: PolygonIDTest,
}

DidMethodEnumToProto = map[DidMethod]proto.DidMethod{
PolygonID: proto.DidMethod_POLYGON_ID,
PolygonIDTest: proto.DidMethod_POLYGON_ID_TEST,
}
)
PublishIntervalParamsFromProto
var (
PublishIntervalParamsFromProto = map[proto.PublishInterval]PublishIntervalParams{
proto.PublishInterval_INTERVAL_5: Interval5,
proto.PublishInterval_INTERVAL_15: Interval15,
proto.PublishInterval_INTERVAL_60: Interval60,
}

PublishIntervalParamsToProto = map[PublishIntervalParams]proto.PublishInterval{
Interval5: proto.PublishInterval_INTERVAL_5,
Interval15: proto.PublishInterval_INTERVAL_15,
Interval60: proto.PublishInterval_INTERVAL_60,
}
)
Attribute

type Attribute

Attribute represents an attribute with an identifier and a corresponding value.

type Attribute struct {
Id string
Value interface{}
}
AttributeDescriptor

type AttributeDescriptor

AttributeDescriptor represents a descriptor for an attribute.

type AttributeDescriptor struct {
// DisplayName is the human-readable display name of the attribute.
DisplayName string
// Id is the identifier for the attribute.
Id string
// Description is a description providing additional information about the attribute.
Description string
// Required specifies whether the attribute is required.
Required bool
}
BooleanAttribute

type BooleanAttribute

BooleanAttribute represents an attribute with a boolean value.

type BooleanAttribute struct {
Attribute
}
NewBooleanAttribute

func NewBooleanAttribute

func NewBooleanAttribute(key string, value bool) BooleanAttribute

NewBooleanAttribute creates a new BooleanAttribute instance with the provided key and value.

NewBooleanAttributeFromProto

func NewBooleanAttributeFromProto

func NewBooleanAttributeFromProto(s *proto.BooleanAttribute) BooleanAttribute
BooleanAttribute.ToProto

func (BooleanAttribute) ToProto

func (s BooleanAttribute) ToProto() *proto.BooleanAttribute
BooleanAttributeDescriptor

type BooleanAttributeDescriptor

BooleanAttributeDescriptor represents a descriptor for a boolean attribute.

type BooleanAttributeDescriptor struct {
AttributeDescriptor
}
NewBooleanAttributeDescriptor

func NewBooleanAttributeDescriptor

func NewBooleanAttributeDescriptor(name string, id string, description string, required bool) BooleanAttributeDescriptor

NewBooleanAttributeDescriptor creates a new BooleanAttributeDescriptor instance with the provided details.

NewBooleanAttributeDescriptorFromProto

func NewBooleanAttributeDescriptorFromProto

func NewBooleanAttributeDescriptorFromProto(s *proto.BooleanAttributeDefinition) BooleanAttributeDescriptor
BooleanAttributeDescriptor.ToProto

func (BooleanAttributeDescriptor) ToProto

func (s BooleanAttributeDescriptor) ToProto() *proto.BooleanAttributeDefinition
Credential

type Credential

Credential represents a verifiable credential with its associated information. Verifiable Credentials Data Model v2.0.

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

func NewCredentialFromJson

func NewCredentialFromJson(json string) (Credential, error)

NewCredentialFromJson creates a Credential instance from a JSON string representation.

NewCredentialFromProto

func NewCredentialFromProto

func NewCredentialFromProto(s *proto.Credential) Credential
Credential.ToJson

func (Credential) ToJson

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

ToJson converts the Credential instance to its JSON string representation.

Credential.ToProto

func (Credential) ToProto

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

type CredentialBuilder

CredentialBuilder helps construct credentials by specifying various attributes.

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

func NewCredentialBuilder

func NewCredentialBuilder(issuer Issuer, schemaId, holderDid string, expiration int64, version int32, configData *proto.ConfigData) CredentialBuilder

NewCredentialBuilder creates a new CredentialBuilder instance with the specified parameters.

CredentialBuilder.Build

func (CredentialBuilder) Build

func (c CredentialBuilder) Build() (CredentialReceipt, error)

Build creates and returns a Credential using the specified attributes.

CredentialBuilder.WithBooleanAttribute

func (CredentialBuilder) WithBooleanAttribute

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

WithBooleanAttribute adds a boolean attribute to the CredentialBuilder.

CredentialBuilder.WithDateAttribute

func (CredentialBuilder) WithDateAttribute

func (c CredentialBuilder) WithDateAttribute(key string, value time.Time) CredentialBuilder

WithDateAttribute adds a date attribute to the CredentialBuilder.

CredentialBuilder.WithDatetimeAttribute

func (CredentialBuilder) WithDatetimeAttribute

func (c CredentialBuilder) WithDatetimeAttribute(key string, value time.Time) CredentialBuilder

WithDatetimeAttribute adds a datetime attribute to the CredentialBuilder.

CredentialBuilder.WithDecimalAttribute

func (CredentialBuilder) WithDecimalAttribute

func (c CredentialBuilder) WithDecimalAttribute(key string, value float64) CredentialBuilder

WithDecimalAttribute adds a decimal attribute to the CredentialBuilder.

CredentialBuilder.WithIntegerAttribute

func (CredentialBuilder) WithIntegerAttribute

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

WithIntegerAttribute adds an integer attribute to the CredentialBuilder.

CredentialBuilder.WithStringAttribute

func (CredentialBuilder) WithStringAttribute

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

WithStringAttribute adds a string attribute to the CredentialBuilder.

CredentialCoreBuilder

type CredentialCoreBuilder

CredentialCoreBuilder helps construct credentials by specifying various attributes.

type CredentialCoreBuilder struct {
// contains filtered or unexported fields
}
NewCredentialCoreBuilder

func NewCredentialCoreBuilder

func NewCredentialCoreBuilder(issuer Issuer, schemaId, holderDid string, expiration int64, version int32, configData *proto.ConfigData) CredentialCoreBuilder

NewCredentialCoreBuilder creates a new CredentialCoreBuilder instance with the specified parameters.

CredentialCoreBuilder.Build

func (CredentialCoreBuilder) Build

func (c CredentialCoreBuilder) Build() (CredentialReceipt, error)

Build creates and returns a Credential using the specified attributes.

CredentialCoreBuilder.WithBooleanAttribute

func (CredentialCoreBuilder) WithBooleanAttribute

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

WithBooleanAttribute adds a boolean attribute to the CredentialCoreBuilder.

CredentialCoreBuilder.WithDateAttribute

func (CredentialCoreBuilder) WithDateAttribute

func (c CredentialCoreBuilder) WithDateAttribute(key string, value time.Time) CredentialCoreBuilder

WithDateAttribute adds a date attribute to the CredentialCoreBuilder.

CredentialCoreBuilder.WithDatetimeAttribute

func (CredentialCoreBuilder) WithDatetimeAttribute

func (c CredentialCoreBuilder) WithDatetimeAttribute(key string, value time.Time) CredentialCoreBuilder

WithDatetimeAttribute adds a datetime attribute to the CredentialCoreBuilder.

CredentialCoreBuilder.WithDecimalAttribute

func (CredentialCoreBuilder) WithDecimalAttribute

func (c CredentialCoreBuilder) WithDecimalAttribute(key string, value float64) CredentialCoreBuilder

WithDecimalAttribute adds a decimal attribute to the CredentialCoreBuilder.

CredentialCoreBuilder.WithIntegerAttribute

func (CredentialCoreBuilder) WithIntegerAttribute

func (c CredentialCoreBuilder) WithIntegerAttribute(key string, value int64) CredentialCoreBuilder

WithIntegerAttribute adds an integer attribute to the CredentialCoreBuilder.

CredentialCoreBuilder.WithStringAttribute

func (CredentialCoreBuilder) WithStringAttribute

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

WithStringAttribute adds a string attribute to the CredentialCoreBuilder.

CredentialProof

type CredentialProof

CredentialProof represents the proof associated with a credential, including signature and sparse merkle tree proof.

type CredentialProof struct {
SignatureProof string
SparseMtProof string
}
NewCredentialProofFromProto

func NewCredentialProofFromProto

func NewCredentialProofFromProto(s *proto.CredentialProof) CredentialProof
CredentialProof.ToProto

func (CredentialProof) ToProto

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

type CredentialReceipt

CredentialReceipt represents a receipt for a credential, including the credential itself, its ID, and type.

type CredentialReceipt struct {
Credential Credential
CredentialId string
CredentialType string
}
NewCredentialReceiptFromProto

func NewCredentialReceiptFromProto

func NewCredentialReceiptFromProto(s *proto.CredentialReceipt) CredentialReceipt
CredentialReceipt.ToProto

func (CredentialReceipt) ToProto

func (c CredentialReceipt) ToProto() *proto.CredentialReceipt
CredentialSchema

type CredentialSchema

CredentialSchema represents the schema information for a credential, including its ID and type.

type CredentialSchema struct {
Id string
Type string
}
NewCredentialSchemaFromProto

func NewCredentialSchemaFromProto

func NewCredentialSchemaFromProto(s *proto.CredentialSchema) CredentialSchema
CredentialSchema.ToProto

func (CredentialSchema) ToProto

func (c CredentialSchema) ToProto() *proto.CredentialSchema
CredentialStatus

type CredentialStatus

CredentialStatus represents the status information for a credential, including its ID, revocation nonce, and type.

type CredentialStatus struct {
Id string
RevocationNonce int64
Type string
}
NewCredentialStatusFromProto

func NewCredentialStatusFromProto

func NewCredentialStatusFromProto(s *proto.CredentialStatus) CredentialStatus
CredentialStatus.ToProto

func (CredentialStatus) ToProto

func (c CredentialStatus) ToProto() *proto.CredentialStatus
DateAttribute

type DateAttribute

DateAttribute represents an attribute with a date value, including its key and formatted value.

type DateAttribute struct {
Attribute
}
NewDateAttribute

func NewDateAttribute

func NewDateAttribute(key string, value time.Time) DateAttribute

NewDateAttribute creates a new DateAttribute instance with the provided key and time value.

NewDateAttributeFromProto

func NewDateAttributeFromProto

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

func (DateAttribute) ToProto

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

type DateAttributeDescriptor

DateAttributeDescriptor represents a descriptor for a date attribute, including its display name, ID, description, and required status.

type DateAttributeDescriptor struct {
AttributeDescriptor
}
NewDateAttributeDescriptor

func NewDateAttributeDescriptor

func NewDateAttributeDescriptor(name string, id string, description string, required bool) DateAttributeDescriptor

NewDateAttributeDescriptor creates a new DateAttributeDescriptor instance with the provided details.

NewDateAttributeDescriptorFromProto

func NewDateAttributeDescriptorFromProto

func NewDateAttributeDescriptorFromProto(s *proto.DateAttributeDefinition) DateAttributeDescriptor
DateAttributeDescriptor.ToProto

func (DateAttributeDescriptor) ToProto

func (s DateAttributeDescriptor) ToProto() *proto.DateAttributeDefinition
DatetimeAttribute

type DatetimeAttribute

DatetimeAttribute represents an attribute with a datetime value.

type DatetimeAttribute struct {
Attribute
}
NewDatetimeAttribute

func NewDatetimeAttribute

func NewDatetimeAttribute(key string, value time.Time) DatetimeAttribute

NewDatetimeAttribute creates a new DatetimeAttribute instance with the provided key and value.

NewDatetimeAttributeFromProto

func NewDatetimeAttributeFromProto

func NewDatetimeAttributeFromProto(s *proto.DateTimeAttribute) DatetimeAttribute
DatetimeAttribute.ToProto

func (DatetimeAttribute) ToProto

func (s DatetimeAttribute) ToProto() *proto.DateTimeAttribute
DatetimeAttributeDescriptor

type DatetimeAttributeDescriptor

DatetimeAttributeDescriptor represents a descriptor for an attribute with a datetime value.

type DatetimeAttributeDescriptor struct {
AttributeDescriptor
}
NewDatetimeAttributeDescriptor

func NewDatetimeAttributeDescriptor

func NewDatetimeAttributeDescriptor(name string, id string, description string, required bool) DatetimeAttributeDescriptor

NewDatetimeAttributeDescriptor creates a new DatetimeAttributeDescriptor instance with the provided details.

NewDatetimeAttributeDescriptorFromProto

func NewDatetimeAttributeDescriptorFromProto

func NewDatetimeAttributeDescriptorFromProto(s *proto.DateTimeAttributeDefinition) DatetimeAttributeDescriptor
DatetimeAttributeDescriptor.ToProto

func (DatetimeAttributeDescriptor) ToProto

func (s DatetimeAttributeDescriptor) ToProto() *proto.DateTimeAttributeDefinition
DecimalAttribute

type DecimalAttribute

DecimalAttribute represents an attribute with a decimal value.

type DecimalAttribute struct {
Attribute
}
NewDecimalAttribute

func NewDecimalAttribute

func NewDecimalAttribute(key string, value float64) DecimalAttribute

NewDecimalAttribute creates a new DecimalAttribute instance with the provided key and value.

NewDecimalAttributeFromProto

func NewDecimalAttributeFromProto

func NewDecimalAttributeFromProto(s *proto.DecimalAttribute) DecimalAttribute
DecimalAttribute.ToProto

func (DecimalAttribute) ToProto

func (s DecimalAttribute) ToProto() *proto.DecimalAttribute
DecimalAttributeDescriptor

type DecimalAttributeDescriptor

DecimalAttributeDescriptor represents a descriptor for an attribute with a decimal value.

type DecimalAttributeDescriptor struct {
AttributeDescriptor
}
NewDecimalAttributeDescriptor

func NewDecimalAttributeDescriptor

func NewDecimalAttributeDescriptor(name string, id string, description string, required bool) DecimalAttributeDescriptor

NewDecimalAttributeDescriptor creates a new DecimalAttributeDescriptor instance with the provided details.

NewDecimalAttributeDescriptorFromProto

func NewDecimalAttributeDescriptorFromProto

func NewDecimalAttributeDescriptorFromProto(s *proto.DecimalAttributeDefinition) DecimalAttributeDescriptor
DecimalAttributeDescriptor.ToProto

func (DecimalAttributeDescriptor) ToProto

func (s DecimalAttributeDescriptor) ToProto() *proto.DecimalAttributeDefinition
DecimalEnumAttributeDescriptor

type DecimalEnumAttributeDescriptor

DecimalEnumAttributeDescriptor represents a descriptor for an attribute with a decimal enum value.

type DecimalEnumAttributeDescriptor struct {
AttributeDescriptor
Enum []float64
}
NewDecimalEnumAttributeDescriptor

func NewDecimalEnumAttributeDescriptor

func NewDecimalEnumAttributeDescriptor(name string, id string, description string, required bool, enum []float64) DecimalEnumAttributeDescriptor

NewDecimalEnumAttributeDescriptor creates a new DecimalEnumAttributeDescriptor instance with the provided details.

NewDecimalEnumAttributeDescriptorFromProto

func NewDecimalEnumAttributeDescriptorFromProto

func NewDecimalEnumAttributeDescriptorFromProto(s *proto.DecimalEnumAttributeDefinition) DecimalEnumAttributeDescriptor
DecimalEnumAttributeDescriptor.ToProto

func (DecimalEnumAttributeDescriptor) ToProto

func (s DecimalEnumAttributeDescriptor) ToProto() *proto.DecimalEnumAttributeDefinition
Did

type Did

Did represents a DID.

type Did struct {
Did string
DidMethod DidMethod
}
NewDid

func NewDid

func NewDid(did string, didMethod DidMethod) Did

NewDid returns a new instance of Did for the given parameters.

DidMethod

type DidMethod

DidMethod represents the type of method did.

type DidMethod int32
PolygonID
const (
// PolygonID represents the polygon id method did.
PolygonID DidMethod = iota
// PolygonIDTest represents the polygon id test method did.
PolygonIDTest DidMethod = iota
)
Holder

type Holder

Holder represents a Holder identity.

type Holder struct {
Did Did
Key key.Key
}
NewHolder

func NewHolder

func NewHolder(did string, didMethod DidMethod, key key.Key) Holder

NewHolder returns a new instance of Holder identity for the given parameters.

IntegerAttribute

type IntegerAttribute

IntegerAttribute represents an attribute with an integer value.

type IntegerAttribute struct {
Attribute
}
NewIntegerAttribute

func NewIntegerAttribute

func NewIntegerAttribute(key string, value int64) IntegerAttribute

NewIntegerAttribute creates a new IntegerAttribute instance with the provided key and value.

NewIntegerAttributeFromProto

func NewIntegerAttributeFromProto

func NewIntegerAttributeFromProto(s *proto.IntegerAttribute) IntegerAttribute
IntegerAttribute.ToProto

func (IntegerAttribute) ToProto

func (s IntegerAttribute) ToProto() *proto.IntegerAttribute
IntegerAttributeDescriptor

type IntegerAttributeDescriptor

IntegerAttributeDescriptor represents a descriptor for an attribute with an integer value.

type IntegerAttributeDescriptor struct {
AttributeDescriptor
}
NewIntegerAttributeDescriptor

func NewIntegerAttributeDescriptor

func NewIntegerAttributeDescriptor(name string, id string, description string, required bool) IntegerAttributeDescriptor

NewIntegerAttributeDescriptor creates a new IntegerAttributeDescriptor instance with the provided details.

NewNumberAttributeDescriptorFromProto

func NewNumberAttributeDescriptorFromProto

func NewNumberAttributeDescriptorFromProto(s *proto.IntegerAttributeDefinition) IntegerAttributeDescriptor
IntegerAttributeDescriptor.ToProto

func (IntegerAttributeDescriptor) ToProto

func (s IntegerAttributeDescriptor) ToProto() *proto.IntegerAttributeDefinition
IntegerEnumAttributeDescriptor

type IntegerEnumAttributeDescriptor

IntegerEnumAttributeDescriptor represents a descriptor for an attribute with an integer enum value.

type IntegerEnumAttributeDescriptor struct {
AttributeDescriptor
Enum []int64
}
NewIntegerEnumAttributeDescriptor

func NewIntegerEnumAttributeDescriptor

func NewIntegerEnumAttributeDescriptor(name string, id string, description string, required bool, enum []int64) IntegerEnumAttributeDescriptor

NewIntegerEnumAttributeDescriptor creates a new IntegerEnumAttributeDescriptor instance with the provided details.

NewIntegerEnumAttributeDescriptorFromProto

func NewIntegerEnumAttributeDescriptorFromProto

func NewIntegerEnumAttributeDescriptorFromProto(s *proto.IntegerEnumAttributeDefinition) IntegerEnumAttributeDescriptor
IntegerEnumAttributeDescriptor.ToProto

func (IntegerEnumAttributeDescriptor) ToProto

func (s IntegerEnumAttributeDescriptor) ToProto() *proto.IntegerEnumAttributeDefinition
Issuer

type Issuer

Issuer represents an Issuer identity.

type Issuer struct {
Did Did
Key key.Key
}
NewIssuer

func NewIssuer

func NewIssuer(did string, didMethod DidMethod, key key.Key) Issuer

NewIssuer returns a new instance of Issuer identity for the given parameters.

IssuerStateReceipt

type IssuerStateReceipt

IssuerStateReceipt represents a receipt for the issuer's state.

type IssuerStateReceipt struct {
TxHash string
}
NewIssuerStateReceiptFromProto

func NewIssuerStateReceiptFromProto

func NewIssuerStateReceiptFromProto(s *proto.IssuerStateReceipt) IssuerStateReceipt
IssuerStateReceipt.ToProto

func (IssuerStateReceipt) ToProto

func (i IssuerStateReceipt) ToProto() *proto.IssuerStateReceipt
PublishIntervalParams

type PublishIntervalParams

PublishIntervalParams represents different publish intervals.

type PublishIntervalParams int32
Interval5
const (
// Interval5 represents a 5-minute publish interval.
Interval5 PublishIntervalParams = iota
// Interval15 represents a 15-minute publish interval.
Interval15 PublishIntervalParams = iota
// Interval60 represents a 60-minute publish interval.
Interval60 PublishIntervalParams = iota
)
Schema

type Schema

Schema represents a schema with its attributes.

type Schema struct {
Cid string
CidJsonLd string
SchemaType string
Json string
}
NewSchemaFromProto

func NewSchemaFromProto

func NewSchemaFromProto(s *proto.Schema) Schema
Schema.ToProto

func (Schema) ToProto

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

type SchemaBuilder

SchemaBuilder is a builder pattern for constructing schema instances.

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

func NewSchemaBuilder

func NewSchemaBuilder(displayName string, schemaType, version, description string, configData *proto.ConfigData) SchemaBuilder

NewSchemaBuilder creates a new instance of SchemaBuilder with initial values.

SchemaBuilder.AddBooleanAttribute

func (SchemaBuilder) AddBooleanAttribute

func (c SchemaBuilder) AddBooleanAttribute(name string, id string, description string, required bool) SchemaBuilder

AddBooleanAttribute adds a boolean attribute descriptor to the schema builder.

SchemaBuilder.AddDateAttribute

func (SchemaBuilder) AddDateAttribute

func (c SchemaBuilder) AddDateAttribute(name string, id string, description string, required bool) SchemaBuilder

AddDateAttribute adds a date attribute descriptor to the schema builder.

SchemaBuilder.AddDatetimeAttribute

func (SchemaBuilder) AddDatetimeAttribute

func (c SchemaBuilder) AddDatetimeAttribute(name string, id string, description string, required bool) SchemaBuilder

AddDatetimeAttribute adds a datetime attribute descriptor to the schema builder.

SchemaBuilder.AddDecimalAttribute

func (SchemaBuilder) AddDecimalAttribute

func (c SchemaBuilder) AddDecimalAttribute(name string, id string, description string, required bool) SchemaBuilder

AddDecimalAttribute adds a decimal attribute descriptor to the schema builder.

SchemaBuilder.AddDecimalEnumAttribute

func (SchemaBuilder) AddDecimalEnumAttribute

func (c SchemaBuilder) AddDecimalEnumAttribute(name string, id string, description string, required bool, enum []float64) SchemaBuilder

AddDecimalEnumAttribute adds a decimal enum attribute descriptor to the schema builder.

SchemaBuilder.AddIntegerAttribute

func (SchemaBuilder) AddIntegerAttribute

func (c SchemaBuilder) AddIntegerAttribute(name string, id string, description string, required bool) SchemaBuilder

AddIntegerAttribute adds an integer attribute descriptor to the schema builder.

SchemaBuilder.AddIntegerEnumAttribute

func (SchemaBuilder) AddIntegerEnumAttribute

func (c SchemaBuilder) AddIntegerEnumAttribute(name string, id string, description string, required bool, enum []int64) SchemaBuilder

AddIntegerEnumAttribute adds an integer enum attribute descriptor to the schema builder.

SchemaBuilder.AddStringAttribute

func (SchemaBuilder) AddStringAttribute

func (c SchemaBuilder) AddStringAttribute(name string, id string, description string, required bool) SchemaBuilder

AddStringAttribute adds a string attribute descriptor to the schema builder.

SchemaBuilder.AddStringEnumAttribute

func (SchemaBuilder) AddStringEnumAttribute

func (c SchemaBuilder) AddStringEnumAttribute(name string, id string, description string, required bool, enum []string) SchemaBuilder

AddStringEnumAttribute adds a string enum attribute descriptor to the schema builder.

SchemaBuilder.Build

func (SchemaBuilder) Build

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

Build creates a schema using the configured attributes.

StringAttribute

type StringAttribute

StringAttribute represents an attribute with a string value.

type StringAttribute struct {
Attribute
}
NewStringAttribute

func NewStringAttribute

func NewStringAttribute(key string, value string) StringAttribute

NewStringAttribute creates a new StringAttribute instance with the provided key and value.

NewStringAttributeFromProto

func NewStringAttributeFromProto

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

func (StringAttribute) ToProto

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

type StringAttributeDescriptor

StringAttributeDescriptor represents a descriptor for an attribute with a string value.

type StringAttributeDescriptor struct {
AttributeDescriptor
}
NewStringAttributeDescriptor

func NewStringAttributeDescriptor

func NewStringAttributeDescriptor(name string, id string, description string, required bool) StringAttributeDescriptor

NewStringAttributeDescriptor creates a new StringAttributeDescriptor instance with the provided details.

NewStringAttributeDescriptorFromProto

func NewStringAttributeDescriptorFromProto

func NewStringAttributeDescriptorFromProto(s *proto.StringAttributeDefinition) StringAttributeDescriptor
StringAttributeDescriptor.ToProto

func (StringAttributeDescriptor) ToProto

func (s StringAttributeDescriptor) ToProto() *proto.StringAttributeDefinition
StringEnumAttributeDescriptor

type StringEnumAttributeDescriptor

StringEnumAttributeDescriptor represents a descriptor for an attribute with a string enum value.

type StringEnumAttributeDescriptor struct {
AttributeDescriptor
Enum []string
}
NewStringEnumAttributeDescriptor

func NewStringEnumAttributeDescriptor

func NewStringEnumAttributeDescriptor(name string, id string, description string, required bool, enum []string) StringEnumAttributeDescriptor

NewStringEnumAttributeDescriptor creates a new StringEnumAttributeDescriptor instance with the provided details.

NewStringEnumAttributeDescriptorFromProto

func NewStringEnumAttributeDescriptorFromProto

func NewStringEnumAttributeDescriptorFromProto(s *proto.StringEnumAttributeDefinition) StringEnumAttributeDescriptor
StringEnumAttributeDescriptor.ToProto

func (StringEnumAttributeDescriptor) ToProto

func (s StringEnumAttributeDescriptor) ToProto() *proto.StringEnumAttributeDefinition
VerificationParams

type VerificationParams

VerificationParams represents parameters for verification.

type VerificationParams struct {
Timeout int64
}
NewVerificationParams

func NewVerificationParams

func NewVerificationParams() VerificationParams

NewVerificationParams creates a new VerificationParams instance with default values.

VerificationReceipt

type VerificationReceipt

VerificationReceipt represents a receipt for a verification session.

type VerificationReceipt struct {
SessionID int64
VerificationRequest string
}
NewVerificationReceiptFromProto

func NewVerificationReceiptFromProto

func NewVerificationReceiptFromProto(s *proto.VerificationReceipt) VerificationReceipt
VerificationReceipt.ToProto

func (VerificationReceipt) ToProto

func (i VerificationReceipt) ToProto() *proto.VerificationReceipt

Generated by gomarkdoc