model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConditionEq  = 0
	ConditionPre = 1
)

filter condition

View Source
const (
	LiverpcSchema = "liverpc"
	HTTPSchema    = "http"
)

Notify callback schema

Variables

This section is empty.

Functions

This section is empty.

Types

type ArgPub

type ArgPub struct {
	AppKey    string `form:"appkey" validate:"min=1"`
	AppSecret string `form:"appsecret" validate:"min=1"`
	Group     string `form:"group" validate:"min=1"`
	Topic     string `form:"topic" validate:"min=1"`
	Key       string `form:"key" validate:"min=1"`
	Msg       string `form:"msg" validate:"min=1"`
}

ArgPub pub arg.

type Callback

type Callback struct {
	URL      *NotifyURL
	Priority int8
	Finished bool
}

Callback define callback event

type FailBackup

type FailBackup struct {
	ID      int64
	Cluster string
	Topic   string
	Group   string
	Offset  int64
	Msg     string
	Index   int64
}

FailBackup fail backup msg.

type Filter

type Filter struct {
	Field     string
	Condition int8 // 0 :eq 1:neq
	Value     string
}

Filter define filter object.

type Message

type Message struct {
	Table  string `json:"table,omitempty"`
	Action string `json:"action,omitempty"`
}

Message define canal message.

type NotifyURL

type NotifyURL struct {
	RawURL string
	Schema string
	Host   string
	Path   string
	Query  url.Values
}

NotifyURL callback url with parsed info

type Pub

type Pub struct {
	ID        int64
	Cluster   string
	Topic     string
	Group     string
	Operation int8
	AppSecret string
}

Pub define pub.

type Watcher

type Watcher struct {
	ID         int64
	Cluster    string
	Topic      string
	Group      string
	Offset     string
	Callback   string
	Callbacks  []*Callback
	Filter     bool
	Filters    []*Filter
	Concurrent int // concurrent goroutine for sub.
	Mtime      time.Time
}

Watcher define watcher object.

Jump to

Keyboard shortcuts

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