cache

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

* @Author: i@rysa.cn * @Date: 2022-05-14 15:59:22 * @LastEditTime: 2022-05-14 15:59:26 * @LastEditors: i@rysa.cn * @Description: * @FilePath: \go-utils\cache\cache.go

* @Author: i@rysa.cn * @Date: 2021-10-31 16:32:16 * @LastEditTime: 2022-05-28 14:23:07 * @LastEditors: i@rysa.cn * @Description: * @FilePath: \go-utils\cache\redis.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRedis

func InitRedis(opt *RedisOpt)

func NewRedisConn

func NewRedisConn() *redisPool

Types

type Cache

type Cache interface {
	Get(key string) (string, error)
	Set(key string, data string, timeout int64) error
	IsExist(key string) bool
	Del(key string) error
}

type GeoLocation added in v1.0.8

type GeoLocation struct {
	UserId string
	Lat    string
	Lng    string
}

定义结构体

type GeoPositions added in v1.0.11

type GeoPositions struct {
	UserId   string
	Lat      string
	Lng      string
	Distance string
}

type RedisOpt

type RedisOpt struct {
	Host        string
	Password    string
	Database    int
	MaxIdle     int
	MaxActive   int
	IdleTimeout int //second
}

Jump to

Keyboard shortcuts

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