dal

package
v0.0.0-...-e6dd299 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DAL

type DAL struct {
	// Configuration
	DbConfig *DALConfig

	// Database driver interface
	DbDriver DatabaseDriver
}

DAL is the Data Access Layer

func NewDAL

func NewDAL(config *DALConfig) (*DAL, error)

NewDAL creates a new instance of the Data Access Layer

type DALConfig

type DALConfig struct {
	DbType   string
	DbHost   string
	DbPort   int
	DbUser   string
	DbPass   string
	DbName   string
	DbLogger zerolog.Logger
}

DALConfig represents the configuration for the Data Access Layer

type DatabaseDriver

type DatabaseDriver interface {
	Connect() error
	Close() error
	Migrate() error
	InsertUserData(accountID string, data string) error
	GetUserData(accountID string) (string, time.Time, error)
	DeleteUserData(accountID string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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