sql

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResetSQLDB

func ResetSQLDB(dsn string)

Types

type Config

type Config struct {
	DBName string
	DBHost string
	DBUser string
	DBPass string
}

func (Config) DBDsn

func (c Config) DBDsn() string

type PostgreSQLSchema

type PostgreSQLSchema struct {
	wmSql.DefaultPostgreSQLSchema
}

PostgreSQLSchema is an implementation of SchemaAdapter based on PostgreSQL.

func (PostgreSQLSchema) SchemaInitializingQueries

func (s PostgreSQLSchema) SchemaInitializingQueries(topic string) []string

type SQLQueue

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

func NewSQLQueue

func NewSQLQueue(c Config) *SQLQueue

func (*SQLQueue) Close

func (q *SQLQueue) Close()

func (*SQLQueue) Publish

func (q *SQLQueue) Publish(ctx context.Context, msgs ...message.Message) error

func (*SQLQueue) RegisterCtxKey

func (q *SQLQueue) RegisterCtxKey(key interface{ String() string }, fn func([]byte) interface{})

func (*SQLQueue) Subscribe

func (q *SQLQueue) Subscribe(topCtx context.Context, fn func(context.Context, message.Message) error)

Jump to

Keyboard shortcuts

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