data

package
v0.0.0-...-76a351f Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB() (*gorm.DB, error)

ConnectDB Crea la conexión a la base de datos postgres

func InitDB

func InitDB()

InitDB - Inicializa la base de datos

func InitEnv

func InitEnv()

InitEnv Inicializa el .env para poder leerlo (*NO - y creamos directorios para images por si no existen (si existen no hace nada) *)

Types

type CacheProvider

type CacheProvider interface {
	Get(key string) (value interface{}, exists bool)
	Set(key string, value interface{})
	SetExpiration(key string, value interface{}, exp time.Duration)
}

func GetCacheClient

func GetCacheClient() CacheProvider

type GoCacheClient

type GoCacheClient struct {
	// contains filtered or unexported fields
}

func NewGoCacheClient

func NewGoCacheClient() *GoCacheClient

func (*GoCacheClient) Get

func (client *GoCacheClient) Get(key string) (value interface{}, exists bool)

func (*GoCacheClient) Set

func (client *GoCacheClient) Set(key string, value interface{})

func (*GoCacheClient) SetExpiration

func (client *GoCacheClient) SetExpiration(key string, value interface{}, expiration time.Duration)

Jump to

Keyboard shortcuts

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