Documentation ¶
Index ¶
- Constants
- Variables
- func ActiveNodeKey(addr base.NodeAddress) []byte
- func AddressFromNodeForInactiveAtKey(key []byte) base.NodeAddress
- func AddressFromNodeForPlanKey(key []byte) base.NodeAddress
- func GetNodeForInactiveAtKeyPrefix(at time.Time) []byte
- func GetNodeForPlanKeyPrefix(id uint64) []byte
- func InactiveNodeKey(addr base.NodeAddress) []byte
- func NewErrorDuplicateNode(addr base.NodeAddress) error
- func NewErrorInvalidGigabytes(gigabytes int64) error
- func NewErrorInvalidHours(hours int64) error
- func NewErrorInvalidNodeStatus(addr base.NodeAddress, status v1base.Status) error
- func NewErrorInvalidPrices(prices sdk.Coins) error
- func NewErrorNodeNotFound(addr base.NodeAddress) error
- func NewErrorPriceNotFound(denom string) error
- func NewErrorUnauthorized(addr string) error
- func NodeForInactiveAtKey(at time.Time, addr base.NodeAddress) []byte
- func NodeForPlanKey(id uint64, addr base.NodeAddress) []byte
Constants ¶
View Source
const (
ModuleName = "node"
)
Variables ¶
View Source
var ( ErrorInvalidMessage = sdkerrors.Register(ModuleName, 101, "invalid message") ErrorDuplicateNode = sdkerrors.Register(ModuleName, 201, "duplicate node") ErrorInvalidGigabytes = sdkerrors.Register(ModuleName, 202, "invalid gigabytes") ErrorInvalidHours = sdkerrors.Register(ModuleName, 203, "invalid hours") ErrorInvalidNodeStatus = sdkerrors.Register(ModuleName, 205, "invalid node status") ErrorInvalidPrices = sdkerrors.Register(ModuleName, 204, "invalid prices") ErrorNodeNotFound = sdkerrors.Register(ModuleName, 206, "node not found") ErrorPriceNotFound = sdkerrors.Register(ModuleName, 207, "price not found") )
View Source
var ( ParamsKey = []byte{0x00} NodeKeyPrefix = []byte{0x10} ActiveNodeKeyPrefix = append(NodeKeyPrefix, 0x01) InactiveNodeKeyPrefix = append(NodeKeyPrefix, 0x02) NodeForPlanKeyPrefix = []byte{0x11} NodeForInactiveAtKeyPrefix = []byte{0x12} )
Functions ¶
func ActiveNodeKey ¶
func ActiveNodeKey(addr base.NodeAddress) []byte
func AddressFromNodeForInactiveAtKey ¶
func AddressFromNodeForInactiveAtKey(key []byte) base.NodeAddress
func AddressFromNodeForPlanKey ¶
func AddressFromNodeForPlanKey(key []byte) base.NodeAddress
func GetNodeForPlanKeyPrefix ¶
func InactiveNodeKey ¶
func InactiveNodeKey(addr base.NodeAddress) []byte
func NewErrorDuplicateNode ¶
func NewErrorDuplicateNode(addr base.NodeAddress) error
func NewErrorInvalidHours ¶
func NewErrorInvalidNodeStatus ¶
func NewErrorInvalidNodeStatus(addr base.NodeAddress, status v1base.Status) error
func NewErrorInvalidPrices ¶
func NewErrorNodeNotFound ¶
func NewErrorNodeNotFound(addr base.NodeAddress) error
func NewErrorPriceNotFound ¶
func NewErrorUnauthorized ¶
func NodeForInactiveAtKey ¶
func NodeForInactiveAtKey(at time.Time, addr base.NodeAddress) []byte
func NodeForPlanKey ¶
func NodeForPlanKey(id uint64, addr base.NodeAddress) []byte
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.