scope

package
v3.2.8 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	store.Store
	// contains filtered or unexported fields
}

Scope extends the store, applying a prefix to each request

func NewScope

func NewScope(s store.Store, prefix string) Scope

NewScope returns an initialised scope

func (*Scope) Delete

func (s *Scope) Delete(ctx context.Context, key string, opts ...store.DeleteOption) error

func (*Scope) List

func (s *Scope) List(ctx context.Context, opts ...store.ListOption) ([]string, error)

func (*Scope) Options

func (s *Scope) Options() store.Options

func (*Scope) Read

func (s *Scope) Read(ctx context.Context, key string, val interface{}, opts ...store.ReadOption) error

func (*Scope) Write

func (s *Scope) Write(ctx context.Context, key string, val interface{}, opts ...store.WriteOption) error

Jump to

Keyboard shortcuts

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