repo

package
v0.0.0-...-7d2e9ce Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Memory

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

func (*Memory) GetAccessToken

func (memo *Memory) GetAccessToken(_ context.Context) (string, time.Time, error)

func (*Memory) Lock

func (memo *Memory) Lock() error

func (*Memory) UnLock

func (memo *Memory) UnLock()

func (*Memory) UpdateAccessToken

func (memo *Memory) UpdateAccessToken(_ context.Context, tok string, expiredTime time.Time) error

type RedisCache

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

func NewRedisRepo

func NewRedisRepo(appId string, host string, port int, password string) *RedisCache

func (*RedisCache) Close

func (rc *RedisCache) Close()

func (*RedisCache) GetAccessToken

func (rc *RedisCache) GetAccessToken(ctx context.Context) (string, time.Time, error)

func (*RedisCache) Lock

func (rc *RedisCache) Lock() error

func (*RedisCache) UnLock

func (rc *RedisCache) UnLock()

func (*RedisCache) UpdateAccessToken

func (rc *RedisCache) UpdateAccessToken(ctx context.Context, tok string, expiredTime time.Time) error

Jump to

Keyboard shortcuts

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