listen_collection

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentName = "firestore_listen_collection"
	ResponsePort  = "response"
	StartPort     = "start"
	StopPort      = "stop"
	ErrorPort     = "error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component struct {
	// contains filtered or unexported fields
}

func (*Component) GetInfo

func (g *Component) GetInfo() module.ComponentInfo

func (*Component) Handle

func (g *Component) Handle(ctx context.Context, handler module.Handler, port string, msg interface{}) error

func (*Component) Instance

func (g *Component) Instance() module.Component

func (*Component) Ports

func (g *Component) Ports() []module.Port

type Context

type Context any

type Error

type Error struct {
	Context Context `json:"context"`
	Error   string  `json:"error"`
}

type Response

type Response struct {
	Context  Context                `json:"context" title:"Context"`
	RefID    string                 `json:"refID"`
	Document map[string]interface{} `json:"document" title:"Document" description:"Document that changed"`
	Action   string                 `json:"action" title:"Action" enum:"added,modified,removed"`
}

type Settings

type Settings struct {
	EnableErrorPort bool `` /* 137-byte string literal not displayed */
	EnableStopPort  bool `json:"enableStopPort" required:"true" title:"Enable stop port" description:"Stop port allows you to stop listener"`
}

type Start added in v0.1.14

type Start struct {
	Context    Context          `json:"context,omitempty" title:"Context" configurable:"true"`
	Config     etc.ClientConfig `json:"config" title:"Config"  required:"true" description:"Client Config"`
	Collection string           `json:"collection" title:"Collection" required:"true"`
	Wheres     []utils.Where    `json:"wheres,omitempty" title:"Where" description:"Where to filter. Leave empty if you want to listen the entire collection."`
}

type StartControl added in v0.1.14

type StartControl struct {
	Status string `json:"status" title:"Status" readonly:"true"`
}

type Stop added in v0.1.14

type Stop struct {
}

type StopControl added in v0.1.14

type StopControl struct {
	Stop   bool   `json:"stop" format:"button" title:"Stop" required:"true" description:"Stop listening"`
	Status string `json:"status" title:"Status" readonly:"true"`
}

Jump to

Keyboard shortcuts

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