store_mem

package
v0.0.0-...-2f30af1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemToken

type MemToken struct {
	Id              int64
	ClientId        string
	UserId          string
	Scope           string
	Access          string
	AccessCreateAt  time.Time
	AccessExpireIn  int64
	Refresh         string
	RefreshCreateAt time.Time
	RefreshExpireIn int64
	Code            string
	CodeCreateAt    time.Time
	CodeExpireIn    int64
}

func (*MemToken) GetAccess

func (token *MemToken) GetAccess() string

access info

func (*MemToken) GetAccessCreateAt

func (token *MemToken) GetAccessCreateAt() time.Time

func (*MemToken) GetAccessExpireIn

func (token *MemToken) GetAccessExpireIn() int64

func (*MemToken) GetClientId

func (token *MemToken) GetClientId() string

func (*MemToken) GetCode

func (token *MemToken) GetCode() string

code info

func (*MemToken) GetCodeCreateAt

func (token *MemToken) GetCodeCreateAt() time.Time

func (*MemToken) GetCodeExpireIn

func (token *MemToken) GetCodeExpireIn() int64

func (*MemToken) GetRefresh

func (token *MemToken) GetRefresh() string

refresh info

func (*MemToken) GetRefreshCreateAt

func (token *MemToken) GetRefreshCreateAt() time.Time

func (*MemToken) GetRefreshExpireIn

func (token *MemToken) GetRefreshExpireIn() int64

func (*MemToken) GetScope

func (token *MemToken) GetScope() string

func (*MemToken) GetUserId

func (token *MemToken) GetUserId() string

func (*MemToken) IsAccessExpired

func (token *MemToken) IsAccessExpired() bool

func (*MemToken) IsCodeExpired

func (token *MemToken) IsCodeExpired() bool

func (*MemToken) IsRefreshExpired

func (token *MemToken) IsRefreshExpired() bool

func (*MemToken) SetAccess

func (token *MemToken) SetAccess(access string)

func (*MemToken) SetAccessCreateAt

func (token *MemToken) SetAccessCreateAt(accessCreateAt time.Time)

func (*MemToken) SetAccessExpireIn

func (token *MemToken) SetAccessExpireIn(accessExpireIn int64)

func (*MemToken) SetClientId

func (token *MemToken) SetClientId(clientId string)

func (*MemToken) SetCode

func (token *MemToken) SetCode(code string)

func (*MemToken) SetCodeCreateAt

func (token *MemToken) SetCodeCreateAt(codeCreateAt time.Time)

func (*MemToken) SetCodeExpireIn

func (token *MemToken) SetCodeExpireIn(codeExpireIn int64)

func (*MemToken) SetRefresh

func (token *MemToken) SetRefresh(refresh string)

func (*MemToken) SetRefreshCreateAt

func (token *MemToken) SetRefreshCreateAt(refreshCreateAt time.Time)

func (*MemToken) SetRefreshExpireIn

func (token *MemToken) SetRefreshExpireIn(refreshExpireIn int64)

func (*MemToken) SetScope

func (token *MemToken) SetScope(scope string)

func (*MemToken) SetUserId

func (token *MemToken) SetUserId(userId string)

type MemTokenStore

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

func (*MemTokenStore) Create

func (s *MemTokenStore) Create(token store.Token) error

func (*MemTokenStore) CreateAndDel

func (s *MemTokenStore) CreateAndDel(tokenNew store.Token, tokenDel store.Token) error

func (*MemTokenStore) GC

func (s *MemTokenStore) GC(gcInterval int64)

func (*MemTokenStore) GetByAccess

func (s *MemTokenStore) GetByAccess(access string) (store.Token, error)

func (*MemTokenStore) GetByCode

func (s *MemTokenStore) GetByCode(code string) (store.Token, error)

func (*MemTokenStore) GetByRefresh

func (s *MemTokenStore) GetByRefresh(refresh string) (store.Token, error)

func (*MemTokenStore) Init

func (s *MemTokenStore) Init(tokenConfig string) error

func (*MemTokenStore) NewToken

func (s *MemTokenStore) NewToken(ctx *context.Context) store.Token

Jump to

Keyboard shortcuts

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