db

package
v0.0.0-...-33bd477 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Db represents of global Db map ex: db.Db["readapi"]["redis"] gives DB methods that's selected

Functions

func Init

func Init(projectName constants.Project)

Init initializes the DB According to given projectName DB instance will be created and set to global DB variable for reach where ever what you want.

Types

type DB

type DB interface {
	GetAll() interface{}
	Get(dbName constants.DbName, key string, params *[]string) (interface{}, error)
	Set(dbName constants.DbName, key string, value interface{}, params *[]string) error
}

DB represents methods that will be implemented Every DB must be implemented those methods

func SelectedDb

func SelectedDb(project constants.Project, dbType constants.DbType) DB

SelectedDb returns DB according to given information

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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