Documentation
¶
Index ¶
- type ApprovalOpMsg
- type BlockRangeMessage
- type CollectionCreatedMessage
- type CollectionDataCreatedMessage
- type CollectionDataRemovedMessage
- type CollectionDataUpdatedMessage
- type CollectionRemovedMessage
- type ConfirmationOpMsg
- type Consumer
- type ConsumerConfig
- type Consumerer
- type ConsumererOpts
- type Handler
- type ItemCreatedMessage
- type ItemOnChainDataCreatedMessage
- type ItemOnChainDataRemovedMessage
- type ItemRemovedMessage
- type Message
- func (m *Message) MustApprovalOpMessage() (msg ApprovalOpMsg)
- func (m *Message) MustBlockRangeMessage() (msg BlockRangeMessage)
- func (m *Message) MustCollectionCreatedMessage() (msg CollectionCreatedMessage)
- func (m *Message) MustCollectionDataCreatedMessage() (msg CollectionDataCreatedMessage)
- func (m *Message) MustCollectionDataRemovedMessage() (msg CollectionDataRemovedMessage)
- func (m *Message) MustCollectionDataUpdatedMessage() (msg CollectionDataUpdatedMessage)
- func (m *Message) MustCollectionRemovedMessage() (msg CollectionRemovedMessage)
- func (m *Message) MustConfirmationOpMessage() (msg ConfirmationOpMsg)
- func (m *Message) MustItemCreatedMessage() (msg ItemCreatedMessage)
- func (m *Message) MustItemOnChainDataCreatedMessage() (msg ItemOnChainDataCreatedMessage)
- func (m *Message) MustItemOnChainDataRemovedMessage() (msg ItemOnChainDataRemovedMessage)
- func (m *Message) MustItemRemovedMessage() (msg ItemRemovedMessage)
- func (m *Message) MustRejectionOpMessage() (msg RejectionOpMsg)
- func (m *Message) MustSeedCreatedMessage() (msg SeedCreatedMessage)
- func (m *Message) MustSeedRemovedMessage() (msg SeedRemovedMessage)
- func (m *Message) MustTransferOpMessage() (msg TransferOpMsg)
- func (m *Message) MustVoteOpMessage() (msg VoteOpMsg)
- func (m Message) String() string
- func (m *Message) Type() MessageType
- type MessageType
- type MultiPublisher
- type Publisher
- type RejectionOpMsg
- type SeedCreatedMessage
- type SeedRemovedMessage
- type TransferOpMsg
- type VoteOpMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApprovalOpMsg ¶
type ApprovalOpMsg struct { OperationID string `json:"operation_id"` OperationType string `json:"operation_type"` TransactionHash string `json:"transaction_hash"` }
func (ApprovalOpMsg) Message ¶
func (m ApprovalOpMsg) Message() Message
type BlockRangeMessage ¶
func (BlockRangeMessage) Message ¶
func (br BlockRangeMessage) Message() Message
type CollectionCreatedMessage ¶
type CollectionCreatedMessage struct {
Index string `json:"index"`
}
func (CollectionCreatedMessage) Message ¶
func (m CollectionCreatedMessage) Message() Message
type CollectionDataCreatedMessage ¶
type CollectionDataCreatedMessage struct { CollectionIndex string `json:"index"` Chain string `json:"chain"` }
func (CollectionDataCreatedMessage) Message ¶
func (m CollectionDataCreatedMessage) Message() Message
type CollectionDataRemovedMessage ¶
type CollectionDataRemovedMessage struct { CollectionIndex string `json:"index"` Chain string `json:"chain"` }
func (CollectionDataRemovedMessage) Message ¶
func (m CollectionDataRemovedMessage) Message() Message
type CollectionDataUpdatedMessage ¶
type CollectionDataUpdatedMessage struct { CollectionIndex string `json:"index"` Chain string `json:"chain"` }
func (CollectionDataUpdatedMessage) Message ¶
func (m CollectionDataUpdatedMessage) Message() Message
type CollectionRemovedMessage ¶
type CollectionRemovedMessage struct {
Index string `json:"index"`
}
func (CollectionRemovedMessage) Message ¶
func (m CollectionRemovedMessage) Message() Message
type ConfirmationOpMsg ¶
type ConfirmationOpMsg struct { ConfirmationID string `json:"confirmation_id"` TransactionHash string `json:"transaction_hash"` }
func (ConfirmationOpMsg) Message ¶
func (m ConfirmationOpMsg) Message() Message
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func NewConsumer(log *logan.Entry, cfg ConsumerConfig, handler Handler) *Consumer
type ConsumerConfig ¶
type ConsumerConfig struct { Name string `fig:"name"` Queue string `fig:"queue,required"` PrefetchLimit int64 `fig:"prefetch_limit"` PollDuration time.Duration `fig:"poll_duration"` MinRetryPeriod time.Duration `fig:"min_retry_period"` MaxRetryPeriod time.Duration `fig:"max_retry_period"` RetryConsumeAttempts uint64 `fig:"retry_consume_attempts"` RedisClient *redis.Client `fig:"-"` }
type Consumerer ¶
type Consumerer interface {
Consumer() ConsumerConfig
}
func NewConsumerer ¶
func NewConsumerer(getter kv.Getter, name string, opts ConsumererOpts) Consumerer
type ConsumererOpts ¶
type ConsumererOpts struct {
RedisClient *redis.Client
}
type ItemCreatedMessage ¶
type ItemCreatedMessage struct {
Index string `json:"index"`
}
func (ItemCreatedMessage) Message ¶
func (m ItemCreatedMessage) Message() Message
type ItemOnChainDataCreatedMessage ¶
type ItemOnChainDataCreatedMessage struct { ItemIndex string `json:"index"` Chain string `json:"chain"` }
func (ItemOnChainDataCreatedMessage) Message ¶
func (m ItemOnChainDataCreatedMessage) Message() Message
type ItemOnChainDataRemovedMessage ¶
type ItemOnChainDataRemovedMessage struct { ItemIndex string `json:"index"` Chain string `json:"chain"` }
func (ItemOnChainDataRemovedMessage) Message ¶
func (m ItemOnChainDataRemovedMessage) Message() Message
type ItemRemovedMessage ¶
type ItemRemovedMessage struct {
Index string `json:"index"`
}
func (ItemRemovedMessage) Message ¶
func (m ItemRemovedMessage) Message() Message
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func (*Message) MustApprovalOpMessage ¶
func (m *Message) MustApprovalOpMessage() (msg ApprovalOpMsg)
func (*Message) MustBlockRangeMessage ¶
func (m *Message) MustBlockRangeMessage() (msg BlockRangeMessage)
func (*Message) MustCollectionCreatedMessage ¶
func (m *Message) MustCollectionCreatedMessage() (msg CollectionCreatedMessage)
func (*Message) MustCollectionDataCreatedMessage ¶
func (m *Message) MustCollectionDataCreatedMessage() (msg CollectionDataCreatedMessage)
func (*Message) MustCollectionDataRemovedMessage ¶
func (m *Message) MustCollectionDataRemovedMessage() (msg CollectionDataRemovedMessage)
func (*Message) MustCollectionDataUpdatedMessage ¶
func (m *Message) MustCollectionDataUpdatedMessage() (msg CollectionDataUpdatedMessage)
func (*Message) MustCollectionRemovedMessage ¶
func (m *Message) MustCollectionRemovedMessage() (msg CollectionRemovedMessage)
func (*Message) MustConfirmationOpMessage ¶
func (m *Message) MustConfirmationOpMessage() (msg ConfirmationOpMsg)
func (*Message) MustItemCreatedMessage ¶
func (m *Message) MustItemCreatedMessage() (msg ItemCreatedMessage)
func (*Message) MustItemOnChainDataCreatedMessage ¶
func (m *Message) MustItemOnChainDataCreatedMessage() (msg ItemOnChainDataCreatedMessage)
func (*Message) MustItemOnChainDataRemovedMessage ¶
func (m *Message) MustItemOnChainDataRemovedMessage() (msg ItemOnChainDataRemovedMessage)
func (*Message) MustItemRemovedMessage ¶
func (m *Message) MustItemRemovedMessage() (msg ItemRemovedMessage)
func (*Message) MustRejectionOpMessage ¶
func (m *Message) MustRejectionOpMessage() (msg RejectionOpMsg)
func (*Message) MustSeedCreatedMessage ¶
func (m *Message) MustSeedCreatedMessage() (msg SeedCreatedMessage)
func (*Message) MustSeedRemovedMessage ¶
func (m *Message) MustSeedRemovedMessage() (msg SeedRemovedMessage)
func (*Message) MustTransferOpMessage ¶
func (m *Message) MustTransferOpMessage() (msg TransferOpMsg)
func (*Message) MustVoteOpMessage ¶
func (*Message) Type ¶
func (m *Message) Type() MessageType
type MessageType ¶
type MessageType string
const ( MessageTypeCollectionCreated MessageType = tokenmanager.EventTypeCollectionCreated MessageTypeCollectionRemoved MessageType = tokenmanager.EventTypeCollectionRemoved MessageTypeCollectionDataCreated MessageType = tokenmanager.EventTypeCollectionDataCreated MessageTypeCollectionDataRemoved MessageType = tokenmanager.EventTypeCollectionDataRemoved MessageTypeCollectionDataUpdated MessageType = tokenmanager.EventTypeCollectionDataUpdated )
const ( MessageTypeItemCreated MessageType = tokenmanager.EventTypeItemCreated MessageTypeItemRemoved MessageType = tokenmanager.EventTypeItemRemoved MessageTypeItemOnChainDataCreated MessageType = tokenmanager.EventTypeOnChainItemCreated MessageTypeItemOnChainDataRemoved MessageType = tokenmanager.EventTypeOnChainItemRemoved )
const ( MessageTypeTransferOp MessageType = rarimocore.EventTypeNewOperation MessageTypeConfirmationOp MessageType = rarimocore.EventTypeNewConfirmation )
const ( MessageTypeSeedCreated MessageType = tokenmanager.EventTypeSeedCreated MessageTypeSeedRemoved MessageType = tokenmanager.EventTypeSeedRemoved )
const ( MessageTypeVoteOp MessageType = rarimocore.EventTypeVoted MessageTypeApprovalOp MessageType = rarimocore.EventTypeOperationApproved MessageTypeRejectionOp MessageType = rarimocore.EventTypeOperationRejected )
const MessageTypeBlockRange MessageType = "block_range"
type MultiPublisher ¶
type MultiPublisher struct {
// contains filtered or unexported fields
}
func (*MultiPublisher) PublishMsgs ¶
func (m *MultiPublisher) PublishMsgs(ctx context.Context, msgs ...Message) error
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
func NewPublisher ¶
type RejectionOpMsg ¶
type RejectionOpMsg struct { OperationID string `json:"operation_id"` OperationType string `json:"operation_type"` TransactionHash string `json:"transaction_hash"` }
func (RejectionOpMsg) Message ¶
func (m RejectionOpMsg) Message() Message
type SeedCreatedMessage ¶
type SeedCreatedMessage struct { Seed string `json:"seed"` ItemIndex string `json:"index"` TxHash string `json:"tx_hash"` }
func (SeedCreatedMessage) Message ¶
func (m SeedCreatedMessage) Message() Message
type SeedRemovedMessage ¶
type SeedRemovedMessage struct { Seed string `json:"seed"` ItemIndex string `json:"index"` TxHash string `json:"tx_hash"` }
func (SeedRemovedMessage) Message ¶
func (m SeedRemovedMessage) Message() Message
type TransferOpMsg ¶
type TransferOpMsg struct { TransferID string `json:"transfer_id"` TransactionHash string `json:"transaction_hash"` }
func (TransferOpMsg) Message ¶
func (m TransferOpMsg) Message() Message
Click to show internal directories.
Click to hide internal directories.