utils

package
v0.0.0-...-1985c56 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Database

func Database(dialect, fname string) (*gorm.DB, error)

func GetOrDefault

func GetOrDefault(keys map[string]interface{}, key, def string) (string, bool)

func GetRedisClient

func GetRedisClient(addr string) *redis.Client

GetRedisClient returns a *redis.Client instance

func MarshalIntoRedis

func MarshalIntoRedis(f interface{}, r *redis.Client, key string) error

MarshalIntoRedis marshals a type interface{} into a redis data

func PanfromMobile

func PanfromMobile(username string, r *redis.Client) (string, bool)

func RedisHelper

func RedisHelper(s []string) ebs_fields.CardsRedis

func SaveRedisList

func SaveRedisList(r *redis.Client, key string, value interface{}) error

SaveRedisList saves to a list in redis

func StringsToBytes

func StringsToBytes(s []string) (bytes.Buffer, error)

Types

type Service

type Service struct {
	Redis *redis.Client
	Db    *gorm.DB
}

Jump to

Keyboard shortcuts

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