---
title: Dictionary
summary: Dictionary is a read-only representation of an edge dictionary.
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/edgedict/struct.Dictionary/
---

**Kind:** Struct  
**Module:** [edgedict](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/edgedict/)  
**Package:** compute-sdk-go v1.11.0  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/edgedict/dictionary.go#L38

> **DEPRECATED:** Deprecated: Use the configstore package instead.

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

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

Deprecated: Use the configstore package instead.

## Methods

### Get

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/edgedict/dictionary.go#L90

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

Get returns the value in the dictionary with the given key, if it exists.

**Parameters**

- `key`: `string`

**Returns**

`(string, error)`

### GetBytes

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/edgedict/dictionary.go#L67

```go
func (d *Dictionary) GetBytes(key string) ([]byte, error)
```

GetBytes returns the value in the dictionary for the given key, if it exists, as a byte slice.

**Parameters**

- `key`: `string`

**Returns**

`([]byte, error)`

### Has

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/edgedict/dictionary.go#L100

```go
func (d *Dictionary) Has(key string) (bool, error)
```

Has returns true if the key exists in the dictionary, without allocating
space to read a value.

**Parameters**

- `key`: `string`

**Returns**

`(bool, error)`
