session

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetStroe added in v0.4.2

func SetStroe(s Store)

Types

type Getter added in v0.4.2

type Getter interface {
	GetToken(token string) *token.Token
}

func S

func S() Getter

type MemoryStore added in v0.4.2

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

func NewMemoryStore added in v0.4.2

func NewMemoryStore() *MemoryStore

func (*MemoryStore) Debug added in v0.4.6

func (s *MemoryStore) Debug(l logger.Logger)

func (*MemoryStore) GetToken added in v0.4.2

func (s *MemoryStore) GetToken(token string) *token.Token

func (*MemoryStore) LeaseToken added in v0.4.2

func (s *MemoryStore) LeaseToken(token string) *token.Token

租把这个token租出去

func (*MemoryStore) ReturnToken added in v0.4.2

func (s *MemoryStore) ReturnToken(tk *token.Token)

还回来

func (*MemoryStore) SetToken added in v0.4.2

func (s *MemoryStore) SetToken(tk *token.Token) error

type Setter added in v0.4.2

type Setter interface {
	SetToken(*token.Token) error
	LeaseToken(token string) *token.Token
	ReturnToken(*token.Token)
}

type Store added in v0.4.2

type Store interface {
	Getter
	Setter
}

Jump to

Keyboard shortcuts

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