store

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JWTActivationStore added in v1.0.0

type JWTActivationStore interface {
	LoadAct(hash string) (string, error)
	SaveAct(hash string, theJWT string) error
}

JWTStore extension to also store activations.

type JWTStore

type JWTStore interface {
	LoadAcc(publicKey string) (string, error)
	SaveAcc(publicKey string, theJWT string) error
	IsReadOnly() bool
	Close()
}

JWTStore is the interface for all store implementations in the account server The store provides a handful of methods for setting and getting a JWT. The data doesn't really have to be a JWT, no validation is expected at this level

type PackableJWTStore added in v0.8.2

type PackableJWTStore interface {
	// Pack the jwts, up to maxJWTs. If maxJWTs is negative, do not limit.
	Pack(maxJWTs int) (string, error)
	Merge(pack string) error
}

PackableJWTStore is implemented by stores that can pack up their content or merge content from another stores pack. The format of a packed store is a single string with 1 JWT per line, \n is as the line separator. The line format is: pubkey|encodedjwt\n Stores with locking may be locked during pack/merge which should be considered in very high performance situations. No preference is required on the JWTs included if maxJWTS is less than the total, that is store dependent. Merge implies writability and does not check the "is readonly" flag of a store

Jump to

Keyboard shortcuts

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