Documentation ¶
Overview ¶
This package is used to interact with the corrosion API.
Index ¶
- Variables
- type Change
- type ChangeType
- type Columns
- type Config
- type CorroClient
- func (c *CorroClient) Exec(ctx context.Context, stmts []Statement) (*ExecResult, error)
- func (c *CorroClient) GetSubscription(ctx context.Context, subscriptionId string) (*Subscription, error)
- func (c *CorroClient) PostSubscription(ctx context.Context, statement Statement) (*Subscription, error)
- func (c *CorroClient) Query(ctx context.Context, stmt Statement) (*Rows, error)
- func (c *CorroClient) QueryRow(ctx context.Context, stmt Statement) (*Row, error)
- type EOQ
- type Error
- type Event
- type EventType
- type ExecResult
- type Result
- type Row
- type Rows
- type Statement
- type Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidChange = errors.New("corrosubs: Invalid change")
View Source
var ErrInvalidRow = errors.New("corrosubs: Invalid row")
View Source
var ErrNoRows = errors.New("corroclient: no rows")
View Source
var ErrScan = errors.New("corroclient: scan error")
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct { ChangeId int64 `json:"change_id"` ChangeType ChangeType `json:"change_type"` Row *Row `json:"row"` }
type ChangeType ¶
type ChangeType string
const ( ChangeTypeInsert ChangeType = "insert" ChangeTypeUpdate ChangeType = "update" ChangeTypeDelete ChangeType = "delete" )
type CorroClient ¶
type CorroClient struct {
// contains filtered or unexported fields
}
func NewCorroClient ¶
func NewCorroClient(config Config) *CorroClient
func (*CorroClient) Exec ¶
func (c *CorroClient) Exec(ctx context.Context, stmts []Statement) (*ExecResult, error)
func (*CorroClient) GetSubscription ¶
func (c *CorroClient) GetSubscription(ctx context.Context, subscriptionId string) (*Subscription, error)
func (*CorroClient) PostSubscription ¶
func (c *CorroClient) PostSubscription(ctx context.Context, statement Statement) (*Subscription, error)
type ExecResult ¶
type ExecResult struct {
Results []Result `json:"results"`
}
func (*ExecResult) Errors ¶
func (e *ExecResult) Errors() []error
type Result ¶
type Row ¶
type Row struct {
// contains filtered or unexported fields
}
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Close ¶
func (s *Subscription) Close()
func (*Subscription) Events ¶
func (s *Subscription) Events() <-chan Event
func (*Subscription) Id ¶
func (s *Subscription) Id() string
Click to show internal directories.
Click to hide internal directories.