dictionary

package
v0.0.0-...-a8ed2b5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrTooManyItems signals the Fastly maximum items has been reached
	ErrTooManyItems = errors.New("too many items")
)

Functions

func Manager

func Manager(client remoteDictionaryMutator, options ...option) *manager

Manager returns a way of syncing a local dictionary with a remote one

func WithLocalReader

func WithLocalReader(reader localReader) option

WithLocalReader allows specifying the local dictionary provider

func WithRemoteDictionary

func WithRemoteDictionary(serviceID, dictionaryID string) option

WithRemoteDictionary allows specifying the Fastly service and dictionary to use NOTE : this that function requires IDs and NOT the name's of the entities

Types

type ErrDuplicateKey

type ErrDuplicateKey struct {
	Key string
}

ErrDuplicateKey captures the offending key that exists more then once locally

func (*ErrDuplicateKey) Error

func (d *ErrDuplicateKey) Error() string

type ErrKeyTooLong

type ErrKeyTooLong struct {
	Key string
}

ErrKeyTooLong signals the Key is too long to be stored

func (*ErrKeyTooLong) Error

func (k *ErrKeyTooLong) Error() string

type ErrValueTooLong

type ErrValueTooLong struct {
	Key   string
	Value string
}

ErrValueTooLong signals the Value is too long to be stored

func (*ErrValueTooLong) Error

func (v *ErrValueTooLong) Error() string

Jump to

Keyboard shortcuts

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