postgres

package
v0.0.1-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresClient

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

PostgresClient cliente para manipulações em banco de dados postgres

func NewProduction

func NewProduction(tables []string, host, dbname, user, port, password string, logger *zap.SugaredLogger) (*PostgresClient, error)

NewProduction se conecta ao banco de dados tenta criar o banco e suas tabelas e retorna um cliente

func (*PostgresClient) AddEvent

func (pc *PostgresClient) AddEvent(ctx context.Context, name string) error

func (*PostgresClient) Close

func (pc *PostgresClient) Close()

func (*PostgresClient) DeleteEventByID

func (pc *PostgresClient) DeleteEventByID(ctx context.Context, id int) error

func (*PostgresClient) StartListeningToNotifications

func (pc *PostgresClient) StartListeningToNotifications(ctx context.Context) error

func (*PostgresClient) UpdateEventByID

func (pc *PostgresClient) UpdateEventByID(ctx context.Context, name string, id int) error

func (*PostgresClient) WithEventBus

func (pc *PostgresClient) WithEventBus(eventBus *eventbus.EventBus)

Jump to

Keyboard shortcuts

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