service

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

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

Go to latest
Published: Oct 26, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiAccessTokenKey = "access_token"
View Source
var ApiExpireInKey = "expire_in"
View Source
var ApiRefreshTokenKey = "refresh_token"

Functions

func DotFileHidingFileSystem

func DotFileHidingFileSystem(fileSystems http.FileSystem) *dotFileHidingFileSystem

Types

type ApiClientService

type ApiClientService struct{}

func (*ApiClientService) Authorize

func (a *ApiClientService) Authorize(auth model.Auth) (token model.TokenSet, error error)

func (*ApiClientService) Deauthorize

func (a *ApiClientService) Deauthorize(accessToken string) (error error)

func (*ApiClientService) Refresh

func (a *ApiClientService) Refresh(refreshToken string) (tokenSet model.TokenSet, error error)

func (*ApiClientService) Verify

func (a *ApiClientService) Verify(accessToken string) (user model.User, error error)

type BackendStoreService

type BackendStoreService struct{}

func (*BackendStoreService) Del

func (b *BackendStoreService) Del(key string) (error error)

func (*BackendStoreService) Get

func (b *BackendStoreService) Get(key string) (result string, error error)

func (*BackendStoreService) IsServiceAvailable

func (b *BackendStoreService) IsServiceAvailable() bool

func (*BackendStoreService) Set

func (b *BackendStoreService) Set(key, value string, expire_in time.Duration) (error error)

type BackendStoreServiceType

type BackendStoreServiceType uint
const (
	Redis BackendStoreServiceType = iota
	Memcached
)
var DefaultBackendStore BackendStoreServiceType = Redis

type SessionService

type SessionService struct{}

func (*SessionService) GetSessionStore

func (s *SessionService) GetSessionStore() (*sessions.Store, error)

Jump to

Keyboard shortcuts

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