state

package
v0.0.0-...-8b7ce6b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: AGPL-3.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeIdentifier

func EncodeIdentifier(identifier string) string

Types

type NoSuchIdentifierTokenPair

type NoSuchIdentifierTokenPair struct{}

func (*NoSuchIdentifierTokenPair) Error

func (e *NoSuchIdentifierTokenPair) Error() string

type State

type State struct {
	DB          *badger.DB
	RSAKeyPairs []myCrypto.PublicPrivateRSAKeyPair
}

func NewState

func NewState(config config.Config, rsaKeyPairs []myCrypto.PublicPrivateRSAKeyPair) (*State, error)

func (*State) AllKeys

func (s *State) AllKeys() ([][]byte, error)

func (*State) InsertToken

func (s *State) InsertToken(config config.Config, identifier string, token string) error

func (*State) InvalidateToken

func (s *State) InvalidateToken(identifier string, token string) error

func (*State) KeyForIdentifierTokenPair

func (s *State) KeyForIdentifierTokenPair(identifier string, token string) ([]byte, error)

func (*State) TokensForIdentifier

func (s *State) TokensForIdentifier(identifier string) ([]string, error)

type TooManyTokensIssued

type TooManyTokensIssued struct{}

func (*TooManyTokensIssued) Error

func (e *TooManyTokensIssued) Error() string

type ZerologBadgerLogger

type ZerologBadgerLogger struct {
	badger.Logger
}

func (ZerologBadgerLogger) Debugf

func (zl ZerologBadgerLogger) Debugf(format string, v ...interface{})

func (ZerologBadgerLogger) Errorf

func (zl ZerologBadgerLogger) Errorf(format string, v ...interface{})

func (ZerologBadgerLogger) Infof

func (zl ZerologBadgerLogger) Infof(format string, v ...interface{})

func (ZerologBadgerLogger) Warningf

func (zl ZerologBadgerLogger) Warningf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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