state

package
v3.0.0-alpha.0...-52a94c4 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DesignStateValueHint = hint.MustNewHint("mitum-did-design-state-value-v0.0.1")
	DIDStateKeyPrefix    = "did"
	DesignStateKeySuffix = "design"
)
View Source
var (
	DataStateValueHint = hint.MustNewHint("mitum-did-data-state-value-v0.0.1")
	DataStateKeySuffix = "data"
)
View Source
var (
	DocumentStateValueHint = hint.MustNewHint("mitum-did-document-state-value-v0.0.1")
	DocumentStateKeySuffix = "document"
)

Functions

func DIDStateKey

func DIDStateKey(addr base.Address) string

func DataStateKey

func DataStateKey(addr base.Address, key string) string

func DesignStateKey

func DesignStateKey(addr base.Address) string

func DocumentStateKey

func DocumentStateKey(addr base.Address, key string) string

func GetDataFromState

func GetDataFromState(st base.State) (types.Data, error)

func GetDesignFromState

func GetDesignFromState(st base.State) (types.Design, error)

func GetDocumentFromState

func GetDocumentFromState(st base.State) (types.DIDDocument, error)

func IsDataStateKey

func IsDataStateKey(key string) bool

func IsDesignStateKey

func IsDesignStateKey(key string) bool

func IsDocumentStateKey

func IsDocumentStateKey(key string) bool

Types

type DIDDataStateValueJSONMarshaler

type DIDDataStateValueJSONMarshaler struct {
	hint.BaseHinter
	Data types.Data `json:"did_data"`
}

type DIDDocumentStateValueJSONMarshaler

type DIDDocumentStateValueJSONMarshaler struct {
	hint.BaseHinter
	Document types.DIDDocument `json:"did_document"`
}

type DataStateValue

type DataStateValue struct {
	hint.BaseHinter
	Data types.Data
}

func NewDataStateValue

func NewDataStateValue(data types.Data) DataStateValue

func (*DataStateValue) DecodeBSON

func (sv *DataStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DataStateValue) DecodeJSON

func (sv *DataStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DataStateValue) HashBytes

func (sv DataStateValue) HashBytes() []byte

func (DataStateValue) Hint

func (sv DataStateValue) Hint() hint.Hint

func (DataStateValue) IsValid

func (sv DataStateValue) IsValid([]byte) error

func (DataStateValue) MarshalBSON

func (sv DataStateValue) MarshalBSON() ([]byte, error)

func (DataStateValue) MarshalJSON

func (sv DataStateValue) MarshalJSON() ([]byte, error)

type DataStateValueBSONUnmarshaler

type DataStateValueBSONUnmarshaler struct {
	Hint    string   `bson:"_hint"`
	DIDData bson.Raw `bson:"did_data"`
}

type DataStateValueJSONUnmarshaler

type DataStateValueJSONUnmarshaler struct {
	Hint    hint.Hint       `json:"_hint"`
	DIDData json.RawMessage `json:"did_data"`
}

type DesignStateValue

type DesignStateValue struct {
	hint.BaseHinter
	Design types.Design
}

func NewDesignStateValue

func NewDesignStateValue(design types.Design) DesignStateValue

func (*DesignStateValue) DecodeBSON

func (sv *DesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DesignStateValue) DecodeJSON

func (sv *DesignStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DesignStateValue) HashBytes

func (sv DesignStateValue) HashBytes() []byte

func (DesignStateValue) Hint

func (sv DesignStateValue) Hint() hint.Hint

func (DesignStateValue) IsValid

func (sv DesignStateValue) IsValid([]byte) error

func (DesignStateValue) MarshalBSON

func (sv DesignStateValue) MarshalBSON() ([]byte, error)

func (DesignStateValue) MarshalJSON

func (sv DesignStateValue) MarshalJSON() ([]byte, error)

type DesignStateValueBSONUnmarshaler

type DesignStateValueBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Design bson.Raw `bson:"design"`
}

type DesignStateValueJSONMarshaler

type DesignStateValueJSONMarshaler struct {
	hint.BaseHinter
	Design types.Design `json:"design"`
}

type DesignStateValueJSONUnmarshaler

type DesignStateValueJSONUnmarshaler struct {
	Hint   hint.Hint       `json:"_hint"`
	Design json.RawMessage `json:"design"`
}

type DocumentStateValue

type DocumentStateValue struct {
	hint.BaseHinter
	Document types.DIDDocument
}

func NewDocumentStateValue

func NewDocumentStateValue(document types.DIDDocument) DocumentStateValue

func (*DocumentStateValue) DecodeBSON

func (sv *DocumentStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DocumentStateValue) DecodeJSON

func (sv *DocumentStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DocumentStateValue) HashBytes

func (sv DocumentStateValue) HashBytes() []byte

func (DocumentStateValue) Hint

func (sv DocumentStateValue) Hint() hint.Hint

func (DocumentStateValue) IsValid

func (sv DocumentStateValue) IsValid([]byte) error

func (DocumentStateValue) MarshalBSON

func (sv DocumentStateValue) MarshalBSON() ([]byte, error)

func (DocumentStateValue) MarshalJSON

func (sv DocumentStateValue) MarshalJSON() ([]byte, error)

type DocumentStateValueBSONUnmarshaler

type DocumentStateValueBSONUnmarshaler struct {
	Hint        string   `bson:"_hint"`
	DIDDocument bson.Raw `bson:"did_document"`
}

type DocumentStateValueJSONUnmarshaler

type DocumentStateValueJSONUnmarshaler struct {
	Hint        hint.Hint       `json:"_hint"`
	DIDDocument json.RawMessage `json:"did_document"`
}

Jump to

Keyboard shortcuts

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