types

package
v12.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleName = "session"
)

Variables

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

	ErrInvalidDownloadBytes = sdkerrors.Register(ModuleName, 201, "invalid download bytes")
	ErrInvalidDuration      = sdkerrors.Register(ModuleName, 202, "invalid duration")
	ErrInvalidSessionStatus = sdkerrors.Register(ModuleName, 203, "invalid session status")
	ErrInvalidSignature     = sdkerrors.Register(ModuleName, 204, "invalid signature")
	ErrInvalidUploadBytes   = sdkerrors.Register(ModuleName, 205, "invalid upload bytes")
	ErrSessionNotFound      = sdkerrors.Register(ModuleName, 206, "session not found")
	ErrUnauthorized         = sdkerrors.Register(ModuleName, 207, "unauthorized")
)
View Source
var (
	CountKey  = []byte{0x00}
	ParamsKey = []byte{0x01}

	SessionKeyPrefix                = []byte{0x10}
	SessionForAccountKeyPrefix      = []byte{0x11}
	SessionForAllocationKeyPrefix   = []byte{0x12}
	SessionForNodeKeyPrefix         = []byte{0x13}
	SessionForPlanKeyPrefix         = []byte{0x14}
	SessionForSubscriptionKeyPrefix = []byte{0x15}
	SessionForInactiveAtKeyPrefix   = []byte{0x16}
)

Functions

func GetSessionForAccountKeyPrefix

func GetSessionForAccountKeyPrefix(addr sdk.AccAddress) []byte

func GetSessionForAllocationKeyPrefix

func GetSessionForAllocationKeyPrefix(id uint64, addr sdk.AccAddress) []byte

func GetSessionForInactiveAtKeyPrefix

func GetSessionForInactiveAtKeyPrefix(at time.Time) []byte

func GetSessionForNodeKeyPrefix

func GetSessionForNodeKeyPrefix(addr base.NodeAddress) []byte

func GetSessionForPlanByNodeKeyPrefix

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

func GetSessionForPlanKeyPrefix

func GetSessionForPlanKeyPrefix(id uint64) []byte

func GetSessionForSubscriptionKeyPrefix

func GetSessionForSubscriptionKeyPrefix(id uint64) []byte

func IDFromSessionForAccountKey

func IDFromSessionForAccountKey(key []byte) uint64

func IDFromSessionForAllocationKey

func IDFromSessionForAllocationKey(key []byte) uint64

func IDFromSessionForInactiveAtKey

func IDFromSessionForInactiveAtKey(key []byte) uint64

func IDFromSessionForNodeKey

func IDFromSessionForNodeKey(key []byte) uint64

func IDFromSessionForPlanByNodeKey

func IDFromSessionForPlanByNodeKey(key []byte) uint64

func IDFromSessionForSubscriptionKey

func IDFromSessionForSubscriptionKey(key []byte) uint64

func NewErrorInvalidDownloadBytes

func NewErrorInvalidDownloadBytes(bytes sdkmath.Int) error

NewErrorInvalidDownloadBytes returns an error indicating that the download bytes are invalid.

func NewErrorInvalidDuration

func NewErrorInvalidDuration(duration time.Duration) error

NewErrorInvalidDuration returns an error indicating that the specified duration is invalid.

func NewErrorInvalidSessionStatus

func NewErrorInvalidSessionStatus(id uint64, status v1base.Status) error

NewErrorInvalidSessionStatus returns an error indicating that the provided status is invalid for the session.

func NewErrorInvalidSignature

func NewErrorInvalidSignature(signature []byte) error

NewErrorInvalidSignature returns an error indicating that the provided signature is invalid.

func NewErrorInvalidUploadBytes

func NewErrorInvalidUploadBytes(bytes sdkmath.Int) error

NewErrorInvalidUploadBytes returns an error indicating that the upload bytes are invalid.

func NewErrorSessionNotFound

func NewErrorSessionNotFound(id uint64) error

NewErrorSessionNotFound returns an error indicating that the specified session does not exist.

func NewErrorUnauthorized

func NewErrorUnauthorized(addr string) error

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

func SessionForAccountKey

func SessionForAccountKey(addr sdk.AccAddress, id uint64) []byte

func SessionForAllocationKey

func SessionForAllocationKey(subscriptionID uint64, addr sdk.AccAddress, sessionID uint64) []byte

func SessionForInactiveAtKey

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

func SessionForNodeKey

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

func SessionForPlanByNodeKey

func SessionForPlanByNodeKey(planID uint64, addr base.NodeAddress, sessionID uint64) []byte

func SessionForSubscriptionKey

func SessionForSubscriptionKey(subscriptionID, sessionID uint64) []byte

func SessionKey

func SessionKey(id uint64) []byte

Types

This section is empty.

Directories

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

Jump to

Keyboard shortcuts

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