tokenservice

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyTokenProvided     = errors.New("empty token provided")
	ErrTokenContentNotPresent = errors.New("token content not present")
)

Errors related to Client connection and health check

Functions

func BuildToken

func BuildToken(database string, token string) []byte

func NewFileTokenService

func NewFileTokenService() *file

NewFileTokenService ...

func NewInmemoryTokenService

func NewInmemoryTokenService() *inmemoryTokenService

Types

type TokenService

type TokenService interface {
	SetToken(database string, token string) error
	IsTokenPresent() (bool, error)
	DeleteToken() error
	GetToken() (string, error)
	GetDatabase() (string, error)
}

Jump to

Keyboard shortcuts

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