Documentation ¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetNames() []string
- type DBTX
- type DeleteSnapshotParams
- type GetSnapshotPositionParams
- type GetSnapshotPositionRow
- type LockSubscriberPositionParams
- type LockSubscriberPositionRow
- type PoMessage
- type PoSnapshot
- type PoSubscription
- type Queries
- func (q *Queries) DeleteSnapshot(ctx context.Context, arg DeleteSnapshotParams) error
- func (q *Queries) GetSnapshotPosition(ctx context.Context, arg GetSnapshotPositionParams) (GetSnapshotPositionRow, error)
- func (q *Queries) GetStreamPosition(ctx context.Context, stream string) (int64, error)
- func (q *Queries) LockSubscriberPosition(ctx context.Context, arg LockSubscriberPositionParams) ([]LockSubscriberPositionRow, error)
- func (q *Queries) ReadRecordsByGroup(ctx context.Context, arg ReadRecordsByGroupParams) ([]PoMessage, error)
- func (q *Queries) ReadRecordsByStream(ctx context.Context, arg ReadRecordsByStreamParams) ([]PoMessage, error)
- func (q *Queries) SetSubscriberPosition(ctx context.Context, arg SetSubscriberPositionParams) error
- func (q *Queries) StoreRecord(ctx context.Context, arg StoreRecordParams) (PoMessage, error)
- func (q *Queries) UpdateSnapshot(ctx context.Context, arg UpdateSnapshotParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type ReadRecordsByGroupParams
- type ReadRecordsByStreamParams
- type SetSubscriberPositionParams
- type StoreRecordParams
- type UpdateSnapshotParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
Types ¶
type DeleteSnapshotParams ¶ added in v0.8.0
type GetSnapshotPositionParams ¶ added in v0.4.0
type GetSnapshotPositionRow ¶ added in v0.4.0
type LockSubscriberPositionParams ¶ added in v0.8.0
type LockSubscriberPositionRow ¶ added in v0.8.0
type PoMessage ¶ added in v0.8.0
type PoMessage struct { ID int64 `json:"id"` Created time.Time `json:"created"` Stream string `json:"stream"` No int64 `json:"no"` Grp string `json:"grp"` ContentType string `json:"content_type"` Data []byte `json:"data"` CorrelationID sql.NullString `json:"correlation_id"` }
contains messages
type PoSnapshot ¶ added in v0.8.0
type PoSnapshot struct { Created time.Time `json:"created"` Updated time.Time `json:"updated"` Stream string `json:"stream"` SnapshotID string `json:"snapshot_id"` No int64 `json:"no"` Data []byte `json:"data"` ContentType string `json:"content_type"` }
snapshot position and data
type PoSubscription ¶ added in v0.8.0
type PoSubscription struct { Created time.Time `json:"created"` Updated time.Time `json:"updated"` Stream string `json:"stream"` SubscriberID string `json:"subscriber_id"` No int64 `json:"no"` }
position of a stream subscribers
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) DeleteSnapshot ¶ added in v0.8.0
func (q *Queries) DeleteSnapshot(ctx context.Context, arg DeleteSnapshotParams) error
func (*Queries) GetSnapshotPosition ¶ added in v0.4.0
func (q *Queries) GetSnapshotPosition(ctx context.Context, arg GetSnapshotPositionParams) (GetSnapshotPositionRow, error)
func (*Queries) GetStreamPosition ¶ added in v0.4.0
func (*Queries) LockSubscriberPosition ¶ added in v0.8.0
func (q *Queries) LockSubscriberPosition(ctx context.Context, arg LockSubscriberPositionParams) ([]LockSubscriberPositionRow, error)
func (*Queries) ReadRecordsByGroup ¶ added in v0.8.0
func (*Queries) ReadRecordsByStream ¶ added in v0.8.0
func (*Queries) SetSubscriberPosition ¶ added in v0.4.0
func (q *Queries) SetSubscriberPosition(ctx context.Context, arg SetSubscriberPositionParams) error
func (*Queries) StoreRecord ¶ added in v0.8.0
func (*Queries) UpdateSnapshot ¶ added in v0.8.0
func (q *Queries) UpdateSnapshot(ctx context.Context, arg UpdateSnapshotParams) error
type ReadRecordsByGroupParams ¶ added in v0.8.0
type ReadRecordsByStreamParams ¶ added in v0.8.0
type SetSubscriberPositionParams ¶ added in v0.4.0
type StoreRecordParams ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.