memory

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package memory provides an in-memory implementation of the lockbox.dev/clients.Storer interface.

This implementation is useful for testing and demo setups in which data is not meant to be stored reliably or for a long time. All the data will be permanently lost when the service process exits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory struct{}

func (Factory) NewStorer

func (m Factory) NewStorer(ctx context.Context) (clients.Storer, error)

func (Factory) TeardownStorers

func (m Factory) TeardownStorers() error

type Storer

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

Storer is an in-memory implementation of the Storer interface.

func NewStorer

func NewStorer() (*Storer, error)

NewStorer returns a Storer instance that is ready to be used as a Storer.

func (Storer) AddRedirectURIs

func (s Storer) AddRedirectURIs(ctx context.Context, uris []clients.RedirectURI) error

func (Storer) Create

func (s Storer) Create(ctx context.Context, client clients.Client) error

func (Storer) Delete

func (s Storer) Delete(ctx context.Context, id string) error

func (Storer) Get

func (s Storer) Get(ctx context.Context, id string) (clients.Client, error)

func (Storer) ListRedirectURIs

func (s Storer) ListRedirectURIs(ctx context.Context, clientID string) ([]clients.RedirectURI, error)

func (Storer) RemoveRedirectURIs

func (s Storer) RemoveRedirectURIs(ctx context.Context, uris []string) error

func (Storer) Update

func (s Storer) Update(ctx context.Context, id string, change clients.Change) error

Jump to

Keyboard shortcuts

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