types

package
v0.0.0-...-7e510f9 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MinKeyLen = 128
View Source
const Nid = "0000"

Variables

View Source
var DataHint = hint.MustNewHint("mitum-did-data-v0.0.1")
View Source
var DesignHint = hint.MustNewHint("mitum-did-design-v0.0.1")
View Source
var DocumentHint = hint.MustNewHint("mitum-did-document-v0.0.1")

Functions

This section is empty.

Types

type Authentication

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

func NewAuthentication

func NewAuthentication(
	id, authType, controller, publicKeyHex string,
) Authentication

func (Authentication) Bytes

func (d Authentication) Bytes() []byte

func (Authentication) IsValid

func (d Authentication) IsValid([]byte) error

type AuthenticationBSONUnmarshaler

type AuthenticationBSONUnmarshaler struct {
	ID           string `bson:"id"`
	Type         string `bson:"type"`
	Controller   string `bson:"controller"`
	PublicKeyHex string `bson:"publicKeyHex"`
}

type AuthenticationMarshaler

type AuthenticationMarshaler struct {
	ID           string `json:"id"`
	Type         string `json:"type"`
	Controller   string `json:"controller"`
	PublicKeyHex string `json:"publicKeyHex"`
}

type DIDDocument

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

func NewDIDDocument

func NewDIDDocument(
	context_, did, created, status, authType, publicKeyHex, serviceType, serviceEndPoint string,
) DIDDocument

func (DIDDocument) Bytes

func (d DIDDocument) Bytes() []byte

func (DIDDocument) DID

func (d DIDDocument) DID() string

func (DIDDocument) IsValid

func (d DIDDocument) IsValid([]byte) error

func (*DIDDocument) SetStatus

func (d *DIDDocument) SetStatus(status string)

func (DIDDocument) Status

func (d DIDDocument) Status() string

type DIDDocumentBSONUnmarshaler

type DIDDocumentBSONUnmarshaler struct {
	Context_ string   `bson:"@context"`
	ID       string   `bson:"id"`
	Created  string   `bson:"created"`
	Status   string   `bson:"status"`
	Auth     bson.Raw `bson:"authentication"`
	Service  bson.Raw `bson:"service"`
}

type DIDDocumentMarshaler

type DIDDocumentMarshaler struct {
	Context_ string                  `json:"@context"`
	ID       string                  `json:"id"`
	Created  string                  `json:"created"`
	Status   string                  `json:"status"`
	Auth     AuthenticationMarshaler `json:"authentication"`
	Service  ServiceMarshaler        `json:"service"`
}

type Data

type Data struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewData

func NewData(
	pkey, method string,
) Data

func (Data) Bytes

func (d Data) Bytes() []byte

func (Data) DID

func (d Data) DID() string

func (*Data) DecodeBSON

func (d *Data) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Data) DecodeJSON

func (d *Data) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Data) Equal

func (d Data) Equal(ct Data) bool

func (Data) IsValid

func (d Data) IsValid([]byte) error

func (Data) MarshalBSON

func (d Data) MarshalBSON() ([]byte, error)

func (Data) MarshalJSON

func (d Data) MarshalJSON() ([]byte, error)

func (Data) PubKey

func (d Data) PubKey() string

type DataBSONUnmarshaler

type DataBSONUnmarshaler struct {
	Hint      string `bson:"_hint"`
	PublicKey string `bson:"publicKey"`
	DID       string `bson:"did"`
}

type DataJSONMarshaler

type DataJSONMarshaler struct {
	hint.BaseHinter
	PublicKey string `json:"publicKey"`
	DID       string `json:"did"`
}

type DataJSONUnmarshaler

type DataJSONUnmarshaler struct {
	Hint      hint.Hint `json:"_hint"`
	PublicKey string    `json:"publicKey"`
	DID       string    `json:"did"`
}

type Design

type Design struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDesign

func NewDesign(didMethod, docContext, docAuthType, docSvcType, docSvcEndpoint string) Design

func (Design) Bytes

func (de Design) Bytes() []byte

func (Design) DIDMethod

func (de Design) DIDMethod() string

func (*Design) DecodeBSON

func (de *Design) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Design) DecodeJSON

func (de *Design) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Design) DocAuthType

func (de Design) DocAuthType() string

func (Design) DocContext

func (de Design) DocContext() string

func (Design) DocSvcEndPoint

func (de Design) DocSvcEndPoint() string

func (Design) DocSvcType

func (de Design) DocSvcType() string

func (Design) Equal

func (de Design) Equal(cd Design) bool

func (Design) GenerateHash

func (de Design) GenerateHash() util.Hash

func (Design) Hash

func (de Design) Hash() util.Hash

func (Design) IsValid

func (de Design) IsValid([]byte) error

func (Design) MarshalBSON

func (de Design) MarshalBSON() ([]byte, error)

func (Design) MarshalJSON

func (de Design) MarshalJSON() ([]byte, error)

type DesignBSONUnmarshaler

type DesignBSONUnmarshaler struct {
	Hint           string `bson:"_hint"`
	DIDMethod      string `bson:"didMethod"`
	DocContext     string `bson:"docContext"`
	DocAuthType    string `bson:"docAuthType"`
	DocSvcType     string `bson:"docSvcType"`
	DocSvcEndPoint string `bson:"docSvcEndPoint"`
}

type DesignJSONMarshaler

type DesignJSONMarshaler struct {
	hint.BaseHinter
	DIDMethod      string `json:"didMethod"`
	DocContext     string `json:"docContext"`
	DocAuthType    string `json:"docAuthType"`
	DocSvcType     string `json:"docSvcType"`
	DocSvcEndPoint string `json:"docSvcEndPoint"`
}

type DesignJSONUnmarshaler

type DesignJSONUnmarshaler struct {
	Hint           hint.Hint `json:"_hint"`
	DIDMethod      string    `json:"didMethod"`
	DocContext     string    `json:"docContext"`
	DocAuthType    string    `json:"docAuthType"`
	DocSvcType     string    `json:"docSvcType"`
	DocSvcEndPoint string    `json:"docSvcEndPoint"`
}

type Document

type Document struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDocument

func NewDocument(
	didDoc DIDDocument,
) Document

func (Document) Bytes

func (d Document) Bytes() []byte

func (Document) DIDDoc

func (d Document) DIDDoc() DIDDocument

func (*Document) DecodeBSON

func (d *Document) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Document) DecodeJSON

func (d *Document) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Document) IsValid

func (d Document) IsValid([]byte) error

func (Document) MarshalBSON

func (d Document) MarshalBSON() ([]byte, error)

func (Document) MarshalJSON

func (d Document) MarshalJSON() ([]byte, error)

type DocumentBSONUnmarshaler

type DocumentBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	DIDDoc bson.Raw `bson:"did_document"`
}

type DocumentJSONMarshaler

type DocumentJSONMarshaler struct {
	hint.BaseHinter
	DIDDoc DIDDocumentMarshaler `json:"did_document"`
}

type DocumentJSONUnmarshaler

type DocumentJSONUnmarshaler struct {
	Hint   hint.Hint            `json:"_hint"`
	DIDDoc DIDDocumentMarshaler `json:"did_document"`
}

type Service

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

func NewService

func NewService(
	id, serviceType, serviceEndPoint string,
) Service

func (Service) Bytes

func (d Service) Bytes() []byte

func (Service) IsValid

func (d Service) IsValid([]byte) error

type ServiceBSONUnmarshaler

type ServiceBSONUnmarshaler struct {
	ID              string `bson:"id"`
	Type            string `bson:"type"`
	ServiceEndPoint string `bson:"service_end_point"`
}

type ServiceMarshaler

type ServiceMarshaler struct {
	ID              string `json:"id"`
	Type            string `json:"type"`
	ServiceEndPoint string `json:"service_end_point"`
}

Jump to

Keyboard shortcuts

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