---
title: Store
summary: Store represents a Fastly KV store
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/kvstore/struct.Store/
---

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

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

Store represents a Fastly KV store

## Methods

### Delete

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/kvstore/kvstore.go#L207

```go
func (s *Store) Delete(key string) error
```

Delete removes a key from the associated KV store.

**Parameters**

- `key`: `string`

**Returns**

`error`

### Insert

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/kvstore/kvstore.go#L140

```go
func (s *Store) Insert(key string, value io.Reader) error
```

Insert adds a key to the associated KV store.

**Parameters**

- `key`: `string`
- `value`: `io.Reader`

**Returns**

`error`

### InsertWithConfig

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/kvstore/kvstore.go#L162

```go
func (s *Store) InsertWithConfig(key string, value io.Reader, config *InsertConfig) error
```

Insert adds a key to the associated KV store.

**Parameters**

- `key`: `string`
- `value`: `io.Reader`
- `config`: `*InsertConfig`

**Returns**

`error`

### List

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/kvstore/kvstore.go#L358

```go
func (s *Store) List(config *ListConfig) *ListIter
```

List returns an iterator over pages of keys matching

**Parameters**

- `config`: `*ListConfig`

**Returns**

`*ListIter`

### Lookup

**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/kvstore/kvstore.go#L125

```go
func (s *Store) Lookup(key string) (*Entry, error)
```

Lookup fetches a key from the associated KV store.  If the key does not
exist, Lookup returns the sentinel error [ErrKeyNotFound].

**Parameters**

- `key`: `string`

**Returns**

`(*Entry, error)`
