state

package
v0.0.0-...-b5b3c4d Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DesignStateValueHint       = hint.MustNewHint("mitum-prescription-design-state-value-v0.0.1")
	PrescriptionStateKeyPrefix = "prescription"
	DesignStateKeySuffix       = "design"
)
View Source
var (
	PrescriptionInfoStateValueHint = hint.MustNewHint("mitum-prescription-prescription-info-state-value-v0.0.1")
	PrescriptionInfoStateKeySuffix = "prescriptioninfo"
)

Functions

func DesignStateKey

func DesignStateKey(addr mitumbase.Address) string

func GetDesignFromState

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

func GetPrescriptionInfoFromState

func GetPrescriptionInfoFromState(st mitumbase.State) (types.PrescriptionInfo, error)

func IsDesignStateKey

func IsDesignStateKey(key string) bool

func IsPrescriptionInfoStateKey

func IsPrescriptionInfoStateKey(key string) bool

func PrescriptionInfoStateKey

func PrescriptionInfoStateKey(addr mitumbase.Address, key string) string

func PrescriptionStateKey

func PrescriptionStateKey(addr mitumbase.Address) string

Types

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 PrescriptionInfoStateValue

type PrescriptionInfoStateValue struct {
	hint.BaseHinter
	PrescriptionInfo types.PrescriptionInfo
}

func NewPrescriptionInfoStateValue

func NewPrescriptionInfoStateValue(prescriptionInfo types.PrescriptionInfo) PrescriptionInfoStateValue

func (*PrescriptionInfoStateValue) DecodeBSON

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

func (*PrescriptionInfoStateValue) DecodeJSON

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

func (PrescriptionInfoStateValue) HashBytes

func (sv PrescriptionInfoStateValue) HashBytes() []byte

func (PrescriptionInfoStateValue) Hint

func (PrescriptionInfoStateValue) IsValid

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

func (PrescriptionInfoStateValue) MarshalBSON

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

func (PrescriptionInfoStateValue) MarshalJSON

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

type PrescriptionInfoStateValueBSONUnmarshaler

type PrescriptionInfoStateValueBSONUnmarshaler struct {
	Hint             string   `bson:"_hint"`
	PrescriptionInfo bson.Raw `bson:"prescription_info"`
}

type PrescriptionInfoStateValueJSONMarshaler

type PrescriptionInfoStateValueJSONMarshaler struct {
	hint.BaseHinter
	PrescriptionInfo types.PrescriptionInfo `json:"prescription_info"`
}

type PrescriptionInfoStateValueJSONUnmarshaler

type PrescriptionInfoStateValueJSONUnmarshaler struct {
	Hint             hint.Hint       `json:"_hint"`
	PrescriptionInfo json.RawMessage `json:"prescription_info"`
}

Jump to

Keyboard shortcuts

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