db

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Connection() *sqlx.DB
}

DB interface for database connections

type Module

type Module struct{}

Module basic struct

func (*Module) Configure

func (m *Module) Configure(injector *dingo.Injector)

Configure module

func (*Module) CueConfig added in v1.2.0

func (m *Module) CueConfig() string

CueConfig for the module

func (*Module) FlamingoLegacyConfigAlias added in v1.2.0

func (m *Module) FlamingoLegacyConfigAlias() map[string]string

FlamingoLegacyConfigAlias maps legacy config entries to new ones

type ShutdownSubscriber

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

ShutdownSubscriber handles the graceful app shutdown for the db connection

func (*ShutdownSubscriber) Inject

func (s *ShutdownSubscriber) Inject(db DB)

Inject dependencies

func (*ShutdownSubscriber) Notify

func (s *ShutdownSubscriber) Notify(_ context.Context, event flamingo.Event)

Notify handles the incoming event if it is an AppShutdownEvent and closes the db connection

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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