redis

package
v0.0.0-...-4350bb9 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	DB *redis.Client
}

Client - Redisの構造体

func NewClient

func NewClient(ctx context.Context, host string, port string, db int) (*Client, error)

NewClient - Redis Clientの初期化

func (*Client) Get

func (client *Client) Get(ctx context.Context, key string) (string, error)

Get - Redisから値を取得

func (*Client) Set

func (client *Client) Set(ctx context.Context, key string, value interface{}, expiration int) error

Set - Redisへ保存

Jump to

Keyboard shortcuts

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