Documentation ¶
Index ¶
- Constants
- Variables
- func AddStatus(currentStatus int, statusToAdd int) int
- func IsStatusSet(currentStatus int, statusToCheck int) bool
- func RemoveStatus(currentStatus int, statusToRemove int) int
- type Module
- func (m *Module) AutoMigrate() error
- func (m *Module) ClearCtx()
- func (m *Module) ExtractEventStatements(ctx context.Context, block *tmctypes.ResultBlock, txHash common.Hash, ...) (map[string][]interface{}, error)
- func (m *Module) GetCtx(key string) interface{}
- func (m *Module) HandleEvent(ctx context.Context, block *tmctypes.ResultBlock, txHash common.Hash, ...) error
- func (m *Module) Name() string
- func (m *Module) PrepareTables() error
- func (m *Module) SetCtx(key string, val interface{})
- type OffChainStatus
Constants ¶
View Source
const (
ModuleName = "bucket"
)
Variables ¶
View Source
var ( EventCreateBucket = proto.MessageName(&storagetypes.EventCreateBucket{}) EventDeleteBucket = proto.MessageName(&storagetypes.EventDeleteBucket{}) EventUpdateBucketInfo = proto.MessageName(&storagetypes.EventUpdateBucketInfo{}) EventDiscontinueBucket = proto.MessageName(&storagetypes.EventDiscontinueBucket{}) EventCompleteMigrationBucket = proto.MessageName(&storagetypes.EventCompleteMigrationBucket{}) EventToggleSPAsDelegatedAgent = proto.MessageName(&storagetypes.EventToggleSPAsDelegatedAgent{}) )
View Source
var BucketEvents = map[string]bool{ EventCreateBucket: true, EventDeleteBucket: true, EventUpdateBucketInfo: true, EventDiscontinueBucket: true, EventCompleteMigrationBucket: true, EventToggleSPAsDelegatedAgent: true, }
Functions ¶
func AddStatus ¶ added in v1.6.0
AddStatus updates the current status by adding the specified status to it.
func IsStatusSet ¶ added in v1.6.0
IsStatusSet checks if the specified status is set in the current status.
func RemoveStatus ¶ added in v1.6.0
RemoveStatus removes the specified status from the current status.
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module represents the bucket module
func (*Module) ClearCtx ¶ added in v1.2.0
func (m *Module) ClearCtx()
ClearCtx resets the module's context to a new, empty context. This effectively removes all key-value pairs previously stored in the context. This can be used for cleanup or reinitialization purposes.
func (*Module) ExtractEventStatements ¶
func (*Module) GetCtx ¶ added in v1.2.0
GetCtx retrieves the value associated with a given key from the module's context. If the key exists in the context, it returns the value; otherwise, it returns nil. This is commonly used to access data that was previously stored with Set.
func (*Module) HandleEvent ¶
type OffChainStatus ¶ added in v1.6.0
type OffChainStatus int
const ( // OffChainStatusIsLimited has the value of 1 (binary: 00000001) OffChainStatusIsLimited OffChainStatus = 1 << iota // 1 // OffChainStatusSpAsDelegatedAgentDisabled has the value of 2 (binary: 00000010) OffChainStatusSpAsDelegatedAgentDisabled // 1 << 1 )
Click to show internal directories.
Click to hide internal directories.