Documentation ¶
Index ¶
Constants ¶
View Source
const ( BlockType_TX = "tx" // corresponds to blocks containing regular transactions BlockType_Config = "config" // corresponds to blocks containing channel configurations and updates EventPayloadType_Bytes = "bytes" // default data type of the event payload, no special processing is done before returning to the subscribing client EventPayloadType_String = "string" // event payload will be an UTF-8 encoded string EventPayloadType_StringifiedJSON = "stringifiedJSON" // event payload will be a structured map with UTF-8 encoded string values )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventEntry ¶
type SubscriptionInfo ¶
type SubscriptionInfo struct { TimeSorted ID string `json:"id,omitempty"` ChannelId string `json:"channel,omitempty"` Path string `json:"path"` Summary string `json:"-"` // System generated name for the subscription Name string `json:"name"` // User provided name for the subscription, set to Summary if missing Stream string `json:"stream"` // the event stream this subscription is associated under Signer string `json:"signer"` FromBlock string `json:"fromBlock,omitempty"` Filter persistedFilter `json:"filter"` PayloadType string `json:"payloadType,omitempty"` // optional. data type of the payload bytes; "bytes", "string" or "stringifiedJSON". Default to "bytes" }
SubscriptionInfo is the persisted data for the subscription
func (*SubscriptionInfo) GetID ¶
func (info *SubscriptionInfo) GetID() string
GetID returns the ID (for sorting)
type TimeSortable ¶
type TimeSortable interface { IsLessThan(TimeSortable, TimeSortable) bool GetISO8601() string GetID() string }
TimeSortable interface can be implemented by embedding TimeSorted and adding getID
type TimeSorted ¶
type TimeSorted struct {
CreatedISO8601 string `json:"created"`
}
TimeSorted base structure for time sortable things
func (*TimeSorted) GetISO8601 ¶
func (i *TimeSorted) GetISO8601() string
GetISO8601 returns an ISO8601 string
func (*TimeSorted) IsLessThan ¶
func (*TimeSorted) IsLessThan(i TimeSortable, j TimeSortable) bool
IsLessThan performs reverse sorting by age, then forward sorting by ID
Click to show internal directories.
Click to hide internal directories.