Documentation
¶
Index ¶
- Constants
- Variables
- func GetSessionForAccountKeyPrefix(addr sdk.AccAddress) []byte
- func GetSessionForAllocationKeyPrefix(id uint64, addr sdk.AccAddress) []byte
- func GetSessionForInactiveAtKeyPrefix(at time.Time) []byte
- func GetSessionForNodeKeyPrefix(addr base.NodeAddress) []byte
- func GetSessionForPlanByNodeKeyPrefix(id uint64, addr base.NodeAddress) []byte
- func GetSessionForPlanKeyPrefix(id uint64) []byte
- func GetSessionForSubscriptionKeyPrefix(id uint64) []byte
- func IDFromSessionForAccountKey(key []byte) uint64
- func IDFromSessionForAllocationKey(key []byte) uint64
- func IDFromSessionForInactiveAtKey(key []byte) uint64
- func IDFromSessionForNodeKey(key []byte) uint64
- func IDFromSessionForPlanByNodeKey(key []byte) uint64
- func IDFromSessionForSubscriptionKey(key []byte) uint64
- func NewErrorInvalidDownloadBytes(bytes sdkmath.Int) error
- func NewErrorInvalidDuration(duration time.Duration) error
- func NewErrorInvalidSessionStatus(id uint64, status v1base.Status) error
- func NewErrorInvalidSignature(signature []byte) error
- func NewErrorInvalidUploadBytes(bytes sdkmath.Int) error
- func NewErrorSessionNotFound(id uint64) error
- func NewErrorUnauthorized(addr string) error
- func SessionForAccountKey(addr sdk.AccAddress, id uint64) []byte
- func SessionForAllocationKey(subscriptionID uint64, addr sdk.AccAddress, sessionID uint64) []byte
- func SessionForInactiveAtKey(at time.Time, id uint64) []byte
- func SessionForNodeKey(addr base.NodeAddress, id uint64) []byte
- func SessionForPlanByNodeKey(planID uint64, addr base.NodeAddress, sessionID uint64) []byte
- func SessionForSubscriptionKey(subscriptionID, sessionID uint64) []byte
- func SessionKey(id uint64) []byte
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") )
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 GetSessionForNodeKeyPrefix ¶
func GetSessionForNodeKeyPrefix(addr base.NodeAddress) []byte
func GetSessionForPlanByNodeKeyPrefix ¶
func GetSessionForPlanByNodeKeyPrefix(id uint64, addr base.NodeAddress) []byte
func IDFromSessionForNodeKey ¶
func NewErrorInvalidDownloadBytes ¶
NewErrorInvalidDownloadBytes returns an error indicating that the download bytes are invalid.
func NewErrorInvalidDuration ¶
NewErrorInvalidDuration returns an error indicating that the specified duration is invalid.
func NewErrorInvalidSessionStatus ¶
NewErrorInvalidSessionStatus returns an error indicating that the provided status is invalid for the session.
func NewErrorInvalidSignature ¶
NewErrorInvalidSignature returns an error indicating that the provided signature is invalid.
func NewErrorInvalidUploadBytes ¶
NewErrorInvalidUploadBytes returns an error indicating that the upload bytes are invalid.
func NewErrorSessionNotFound ¶
NewErrorSessionNotFound returns an error indicating that the specified session does not exist.
func NewErrorUnauthorized ¶
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 SessionForNodeKey ¶
func SessionForNodeKey(addr base.NodeAddress, id uint64) []byte
func SessionForPlanByNodeKey ¶
func SessionForPlanByNodeKey(planID uint64, addr base.NodeAddress, sessionID uint64) []byte
func SessionKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.