Help us shape the future of Go! Take the 2026 Go Developer Survey

db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSqlDB added in v0.6.0

func NewSqlDB(cfg modules.DatabaseConfig) (*sql.DB, error)

Types

type DB

type DB struct {
	DB *sqlx.DB

	Workspaces       dao.WorkspaceDAO
	Endpoints        dao.EndpointDAO
	EndpointsWS      dao.EndpointDAO
	Events           dao.EventDAO
	EventsWS         dao.EventDAO
	Attempts         dao.AttemptDAO
	AttemptsWS       dao.AttemptDAO
	Sources          dao.SourceDAO
	SourcesWS        dao.SourceDAO
	AttemptDetails   dao.AttemptDetailDAO
	AttemptDetailsWS dao.AttemptDetailDAO
	Plugins          dao.PluginDAO
	PluginsWS        dao.PluginDAO
	// contains filtered or unexported fields
}

func NewDB

func NewDB(sqlDB *sql.DB, log *zap.SugaredLogger, bus eventbus.EventBus) (*DB, error)

func (*DB) Close added in v1.0.1

func (db *DB) Close() error

func (*DB) Ping

func (db *DB) Ping() error

func (*DB) SqlDB added in v1.0.0

func (db *DB) SqlDB() *sql.DB

func (*DB) Stats added in v0.8.0

func (db *DB) Stats() map[string]interface{}

func (*DB) TX

func (db *DB) TX(ctx context.Context, fn func(ctx context.Context) error) error

func (*DB) Truncate

func (db *DB) Truncate(table string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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