db

package
v0.44.5 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

The very core database/cache data operations package.

Index

Constants

This section is empty.

Variables

View Source
var (
	FlowCache         *core.Cache
	PollCache         *core.Cache
	RequestCache      *core.Cache
	SubscriptionCache *core.Cache
	TokenCache        *core.Cache
	UserCache         *core.Cache
)

Functions

func DeleteOne

func DeleteOne(cache *core.Cache, key string) bool

DeleteOne

func DumpAll

func DumpAll() string

func GetAll

func GetAll[T any](cache *core.Cache, model T) (map[string]T, int)

GetAll

func GetGravatarURL

func GetGravatarURL(emailInput string, channel chan string, wg *sync.WaitGroup) string

GetGravatarURL function returns the avatar image location/URL, or it defaults to a app logo.

func GetOne

func GetOne[T any](cache *core.Cache, key string, model T) (T, bool)

GetOne

func LoadAll

func LoadAll() string

func Lock added in v0.43.2

func Lock()

Lock function ensures that the database driver is set to the readonly mode.

func Router

func Router() chi.Router

func RunMigrations

func RunMigrations(l *common.Logger) string

RunMigrations is a wrapper function for the migration registration and execution.

func SetOne

func SetOne[T any](cache *core.Cache, key string, model T) bool

SetOne

func Unlock added in v0.43.2

func Unlock()

Unlock function ensures that the database driver is set to the readwrite mode.

Types

This section is empty.

Jump to

Keyboard shortcuts

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