edgedict

package
Version: v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package edgedict provides a read-only interface to edge dictionaries. Refer to https://developer.fastly.com/reference/api/dictionaries/ for more information.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDictionaryNotFound indicates the named dictionary doesn't exist.
	ErrDictionaryNotFound = errors.New("dictionary not found")

	// ErrDictionaryNameEmpty indicates the given dictionary name
	// was empty.
	ErrDictionaryNameEmpty = errors.New("dictionary name was empty")

	// ErrDictionaryNameInvalid indicates the given dictionary name
	// was invalid.
	ErrDictionaryNameInvalid = errors.New("dictionary name contained invalid characters")

	// ErrDictionaryNameTooLong indicates the given dictionary name
	// was too long.
	ErrDictionaryNameTooLong = errors.New("dictionary name too long")

	// ErrKeyNotFound indicates a key isn't in a dictionary.
	ErrKeyNotFound = errors.New("key not found")
)

Functions

This section is empty.

Types

type Dictionary

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

Dictionary is a read-only representation of an edge dictionary.

func Open

func Open(name string) (*Dictionary, error)

Open returns an edge dictionary with the given name. Names are case sensitive.

func (*Dictionary) Get

func (d *Dictionary) Get(key string) (string, error)

Get returns the item in the dictionary with the given key.

Jump to

Keyboard shortcuts

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