state

package
v0.0.0-...-390575e Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StateKeyTimeStampPrefix     = "timestamp"
	ServiceDesignStateValueHint = hint.MustNewHint("mitum-timestamp-service-design-state-value-v0.0.1")
	StateKeyServiceDesignSuffix = "service"
)
View Source
var (
	TimeStampLastIndexStateValueHint = hint.MustNewHint("mitum-timestamp-last-index-state-value-v0.0.1")
	StateKeyProjectLastIndexSuffix   = "timestampidx"
)
View Source
var (
	TimeStampItemStateValueHint = hint.MustNewHint("mitum-timestamp-item-state-value-v0.0.1")
	StateKeyTimeStampItemSuffix = "timestampitem"
)

Functions

func IsStateServiceDesignKey

func IsStateServiceDesignKey(key string) bool

func IsStateTimeStampItemKey

func IsStateTimeStampItemKey(key string) bool

func IsStateTimeStampLastIndexKey

func IsStateTimeStampLastIndexKey(key string) bool

func StateKeyServiceDesign

func StateKeyServiceDesign(addr mitumbase.Address) string

func StateKeyTimeStampItem

func StateKeyTimeStampItem(addr mitumbase.Address, pid string, index uint64) string

func StateKeyTimeStampLastIndex

func StateKeyTimeStampLastIndex(addr mitumbase.Address, pid string) string

func StateKeyTimeStampService

func StateKeyTimeStampService(addr mitumbase.Address) string

func StateServiceDesignValue

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

func StateTimeStampItemValue

func StateTimeStampItemValue(st mitumbase.State) (types.TimeStampItem, error)

func StateTimeStampLastIndexValue

func StateTimeStampLastIndexValue(st mitumbase.State) (uint64, error)

Types

type ServiceDesignStateValue

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

func NewServiceDesignStateValue

func NewServiceDesignStateValue(design types.Design) ServiceDesignStateValue

func (*ServiceDesignStateValue) DecodeBSON

func (s *ServiceDesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*ServiceDesignStateValue) DecodeJSON

func (s *ServiceDesignStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (ServiceDesignStateValue) HashBytes

func (sd ServiceDesignStateValue) HashBytes() []byte

func (ServiceDesignStateValue) Hint

func (sd ServiceDesignStateValue) Hint() hint.Hint

func (ServiceDesignStateValue) IsValid

func (sd ServiceDesignStateValue) IsValid([]byte) error

func (ServiceDesignStateValue) MarshalBSON

func (s ServiceDesignStateValue) MarshalBSON() ([]byte, error)

func (ServiceDesignStateValue) MarshalJSON

func (s ServiceDesignStateValue) MarshalJSON() ([]byte, error)

type ServiceDesignStateValueBSONUnmarshaler

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

type ServiceDesignStateValueJSONMarshaler

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

type ServiceDesignStateValueJSONUnmarshaler

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

type TimeStampItemStateValue

type TimeStampItemStateValue struct {
	hint.BaseHinter
	TimeStampItem types.TimeStampItem
}

func NewTimeStampItemStateValue

func NewTimeStampItemStateValue(item types.TimeStampItem) TimeStampItemStateValue

func (*TimeStampItemStateValue) DecodeBSON

func (s *TimeStampItemStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*TimeStampItemStateValue) DecodeJSON

func (s *TimeStampItemStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (TimeStampItemStateValue) HashBytes

func (ts TimeStampItemStateValue) HashBytes() []byte

func (TimeStampItemStateValue) Hint

func (ts TimeStampItemStateValue) Hint() hint.Hint

func (TimeStampItemStateValue) IsValid

func (ts TimeStampItemStateValue) IsValid([]byte) error

func (TimeStampItemStateValue) MarshalBSON

func (s TimeStampItemStateValue) MarshalBSON() ([]byte, error)

func (TimeStampItemStateValue) MarshalJSON

func (s TimeStampItemStateValue) MarshalJSON() ([]byte, error)

type TimeStampItemStateValueJSONMarshaler

type TimeStampItemStateValueJSONMarshaler struct {
	hint.BaseHinter
	TimeStampItem types.TimeStampItem `json:"timestampitem"`
}

type TimeStampItemStateValueJSONUnmarshaler

type TimeStampItemStateValueJSONUnmarshaler struct {
	Hint          hint.Hint       `json:"_hint"`
	TimeStampItem json.RawMessage `json:"timestampitem"`
}

type TimeStampLastIndexStateValue

type TimeStampLastIndexStateValue struct {
	hint.BaseHinter
	ProjectID string
	Index     uint64
}

func NewTimeStampLastIndexStateValue

func NewTimeStampLastIndexStateValue(pid string, index uint64) TimeStampLastIndexStateValue

func (*TimeStampLastIndexStateValue) DecodeBSON

func (s *TimeStampLastIndexStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*TimeStampLastIndexStateValue) DecodeJSON

func (s *TimeStampLastIndexStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (TimeStampLastIndexStateValue) HashBytes

func (ti TimeStampLastIndexStateValue) HashBytes() []byte

func (TimeStampLastIndexStateValue) Hint

func (TimeStampLastIndexStateValue) IsValid

func (ti TimeStampLastIndexStateValue) IsValid([]byte) error

func (TimeStampLastIndexStateValue) MarshalBSON

func (s TimeStampLastIndexStateValue) MarshalBSON() ([]byte, error)

func (TimeStampLastIndexStateValue) MarshalJSON

func (s TimeStampLastIndexStateValue) MarshalJSON() ([]byte, error)

type TimeStampLastIndexStateValueBSONUnmarshaler

type TimeStampLastIndexStateValueBSONUnmarshaler struct {
	Hint      string `bson:"_hint"`
	ProjectID string `bson:"projectid"`
	Index     uint64 `bson:"index"`
}

type TimeStampLastIndexStateValueJSONMarshaler

type TimeStampLastIndexStateValueJSONMarshaler struct {
	hint.BaseHinter
	ProjectID string `json:"projectid"`
	Index     uint64 `json:"index"`
}

type TimeStampLastIndexStateValueJSONUnmarshaler

type TimeStampLastIndexStateValueJSONUnmarshaler struct {
	Hint      hint.Hint `json:"_hint"`
	ProjectID string    `json:"projectid"`
	Index     uint64    `json:"index"`
}

type TimeStampStateValueBSONUnmarshaler

type TimeStampStateValueBSONUnmarshaler struct {
	Hint          string   `bson:"_hint"`
	TimeStampItem bson.Raw `bson:"timestampitem"`
}

Jump to

Keyboard shortcuts

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