Documentation ¶
Overview ¶
Package db contains database configurations and methods for querying.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { GetConfig() *cfg.DbConfig Init() Select(tableName string, conditions string) []map[string]interface{} TestConnection() Insert(inDto InsertDto) error Update(upDto UpdateDto) error }
Database interface is the blueprint for all structs for specific databases.
type DatabaseError ¶
type DatabaseError struct { DBName string `json:"dbName"` ErrMsg string `json:"errMsg"` KeyName string `json:"keyName"` KeyValue interface{} `json:"keyVal"` }
DatabaseError is a custom db error.
func (*DatabaseError) Error ¶
func (e *DatabaseError) Error() string
type Databases ¶
Databases imports, validates and holds information about databases from JSON config files.
Click to show internal directories.
Click to hide internal directories.