broadcast

package
v0.31.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BulkChange

func BulkChange(ctx context.Context, dbId string, table string)

func Delete

func Delete(ctx context.Context, dbId string, table string, pk interface{})

func Insert

func Insert(ctx context.Context, dbId string, table string, pk interface{})

func Update

func Update(ctx context.Context, dbId string, table string, pk interface{}, fieldnames ...string)

Types

type BroadcasterI

type BroadcasterI interface {
	Insert(ctx context.Context, dbId string, table string, pk interface{})
	Update(ctx context.Context, dbId string, table string, pk interface{}, fieldnames ...string)
	Delete(ctx context.Context, dbId string, table string, pk interface{})
	BulkChange(ctx context.Context, dbId string, table string)
}
var Broadcaster BroadcasterI

Broadcaster is the injected broadcaster that the generated forms use to notify the application that the database has changed. The application will start with the given default below, but you can change it if needed.

type DefaultBroadcaster

type DefaultBroadcaster struct {
}

DefaultBroadcaster broadcasts database changes to the client using the watcher's pub/sub mechanism

func (DefaultBroadcaster) BulkChange

func (b DefaultBroadcaster) BulkChange(ctx context.Context, dbId string, table string)

func (DefaultBroadcaster) Delete

func (b DefaultBroadcaster) Delete(ctx context.Context, dbId string, table string, pk interface{})

func (DefaultBroadcaster) Insert

func (b DefaultBroadcaster) Insert(ctx context.Context, dbId string, table string, pk interface{})

func (DefaultBroadcaster) Update

func (b DefaultBroadcaster) Update(ctx context.Context, dbId string, table string, pk interface{}, fieldnames ...string)

Jump to

Keyboard shortcuts

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