types

package
v12.0.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "lease"
)

Variables

View Source
var (
	ErrorInvalidMessage = sdkerrors.Register(ModuleName, 101, "invalid message")

	ErrorDuplicateLease        = sdkerrors.Register(ModuleName, 201, "duplicate lease")
	ErrorInvalidHours          = sdkerrors.Register(ModuleName, 202, "invalid hours")
	ErrorInvalidNodeStatus     = sdkerrors.Register(ModuleName, 203, "invalid node status")
	ErrorInvalidProviderStatus = sdkerrors.Register(ModuleName, 204, "invalid provider status")
	ErrorLeaseNotFound         = sdkerrors.Register(ModuleName, 205, "lease not found")
	ErrorNodeNotFound          = sdkerrors.Register(ModuleName, 206, "node not found")
	ErrorPriceNotFound         = sdkerrors.Register(ModuleName, 207, "price not found")
	ErrorProviderNotFound      = sdkerrors.Register(ModuleName, 208, "provider not found")
	ErrorUnauthorized          = sdkerrors.Register(ModuleName, 209, "unauthorized")
)
View Source
var (
	CountKey  = []byte{0x00}
	ParamsKey = []byte{0x01}

	LeaseKeyPrefix                  = []byte{0x10}
	LeaseForNodeKeyPrefix           = []byte{0x11}
	LeaseForProviderKeyPrefix       = []byte{0x12}
	LeaseForProviderByNodeKeyPrefix = []byte{0x13}
	LeaseForInactiveAtKeyPrefix     = []byte{0x14}
	LeaseForPayoutAtKeyPrefix       = []byte{0x15}
	LeaseForRenewalAtKeyPrefix      = []byte{0x16}
)

Functions

func GetLeaseForInactiveAtKeyPrefix

func GetLeaseForInactiveAtKeyPrefix(at time.Time) []byte

func GetLeaseForNodeKeyPrefix

func GetLeaseForNodeKeyPrefix(addr base.NodeAddress) []byte

func GetLeaseForPayoutAtKeyPrefix

func GetLeaseForPayoutAtKeyPrefix(at time.Time) []byte

func GetLeaseForProviderByNodeKeyPrefix

func GetLeaseForProviderByNodeKeyPrefix(provAddr base.ProvAddress, nodeAddr base.NodeAddress) (key []byte)

func GetLeaseForProviderKeyPrefix

func GetLeaseForProviderKeyPrefix(addr base.ProvAddress) []byte

func GetLeaseForRenewalAtKeyPrefix

func GetLeaseForRenewalAtKeyPrefix(at time.Time) []byte

func IDFromLeaseForInactiveAtKey

func IDFromLeaseForInactiveAtKey(key []byte) uint64

func IDFromLeaseForNodeKey

func IDFromLeaseForNodeKey(key []byte) uint64

func IDFromLeaseForPayoutAtKey

func IDFromLeaseForPayoutAtKey(key []byte) uint64

func IDFromLeaseForProviderByNodeKey

func IDFromLeaseForProviderByNodeKey(key []byte) uint64

func IDFromLeaseForProviderKey

func IDFromLeaseForProviderKey(key []byte) uint64

func IDFromLeaseForRenewalAtKey

func IDFromLeaseForRenewalAtKey(key []byte) uint64

func LeaseForInactiveAtKey

func LeaseForInactiveAtKey(at time.Time, id uint64) []byte

func LeaseForNodeKey

func LeaseForNodeKey(addr base.NodeAddress, id uint64) []byte

func LeaseForPayoutAtKey

func LeaseForPayoutAtKey(at time.Time, id uint64) []byte

func LeaseForProviderByNodeKey

func LeaseForProviderByNodeKey(provAddr base.ProvAddress, nodeAddr base.NodeAddress, id uint64) []byte

func LeaseForProviderKey

func LeaseForProviderKey(addr base.ProvAddress, id uint64) []byte

func LeaseForRenewalAtKey

func LeaseForRenewalAtKey(at time.Time, id uint64) []byte

func LeaseKey

func LeaseKey(id uint64) []byte

func NewErrorDuplicateLease

func NewErrorDuplicateLease(provAddr base.ProvAddress, nodeAddr base.NodeAddress) error

NewErrorDuplicateLease returns an error indicating that a lease for the specified provider and node already exists.

func NewErrorInvalidHours

func NewErrorInvalidHours(hours int64) error

NewErrorInvalidHours returns an error indicating that the provided hours are invalid.

func NewErrorInvalidNodeStatus

func NewErrorInvalidNodeStatus(addr base.NodeAddress, status v1base.Status) error

NewErrorInvalidNodeStatus returns an error indicating that the provided status is invalid for the given node.

func NewErrorInvalidProviderStatus

func NewErrorInvalidProviderStatus(addr base.ProvAddress, status v1base.Status) error

NewErrorInvalidProviderStatus returns an error indicating that the provided status is invalid for the given provider.

func NewErrorLeaseNotFound

func NewErrorLeaseNotFound(id uint64) error

NewErrorLeaseNotFound returns an error indicating that the specified lease does not exist.

func NewErrorNodeNotFound

func NewErrorNodeNotFound(addr base.NodeAddress) error

NewErrorNodeNotFound returns an error indicating that the specified node does not exist.

func NewErrorPriceNotFound

func NewErrorPriceNotFound(denom string) error

NewErrorPriceNotFound returns an error indicating that the price for the specified denom does not exist.

func NewErrorProviderNotFound

func NewErrorProviderNotFound(addr base.ProvAddress) error

NewErrorProviderNotFound returns an error indicating that the specified provider does not exist.

func NewErrorUnauthorized

func NewErrorUnauthorized(addr string) error

NewErrorUnauthorized returns an error indicating that the specified address is not authorized.

Types

This section is empty.

Directories

Path Synopsis
Package v1 is a reverse proxy.
Package v1 is a reverse proxy.

Jump to

Keyboard shortcuts

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