types

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderBy added in v0.1.7

type OrderBy struct {
	Column string `json:"column" binding:"exists"`
	Order  string `json:"order" binding:"exists"`
}

type Session

type Session struct {
	Ctx        context.Context
	CancelFunc context.CancelFunc

	ReplConn *pgx.ReplicationConn
	PGConn   *pgx.Conn

	WSConn *websocket.Conn

	SlotName     string
	SnapshotName string
	RestartLSN   uint64
}

Session stores the context, active db and ws connections, and replication slot state

type SnapshotDataJSON

type SnapshotDataJSON struct {
	// SlotName is the name of the replication slot for which the snapshot data needs to be fetched
	// (not used as of now, will be useful in multi client setup)
	SlotName string `json:"slotName" binding:"omitempty"`

	Table   string   `json:"table" binding:"required"`
	Offset  *uint    `json:"offset" binding:"exists"`
	Limit   *uint    `json:"limit" binding:"exists"`
	OrderBy *OrderBy `json:"order_by" binding:"exists"`
}

SnapshotDataJSON is the struct that binds with an incoming request for snapshot data

type Wal2JSONEvent

type Wal2JSONEvent struct {
	NextLSN string `json:"nextlsn"`
	Change  []map[string]interface{}
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL