---
title: secretstore
summary: Package secretstore provides a read-only interface to Fastly Compute Secret Stores.
url: https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/secretstore/
---

**Kind:** Module  
**Package:** compute-sdk-go v1.11.0  
**Path:** `github.com/fastly/compute-sdk-go/secretstore`

Package secretstore provides a read-only interface to Fastly
Compute Secret Stores.

Secret stores are persistent, globally distributed stores for
secrets.  Secrets are decrypted as-needed at the edge.

See the [Fastly Secret Store documentation](https://developer.fastly.com/learning/concepts/dynamic-config/#secret-stores) for details.

## Structs

| Name | Summary |
| --- | --- |
| [Secret](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/secretstore/struct.Secret/) | Secret represents a secret in a store |
| [Store](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/secretstore/struct.Store/) | Store represents a Fastly Secret Store |

## Functions

| Name | Summary |
| --- | --- |
| [Open](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/secretstore/fn.Open/) | Open returns a handle to the named secret store, if it exists.  It will return [ErrSecretStoreNotFound] if it doesn't exist. |
| [Plaintext](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/secretstore/fn.Plaintext/) | Plaintext decrypts and returns the secret value as a byte slice for the given secret store and secret name. |
| [SecretFromBytes](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/secretstore/fn.SecretFromBytes/) | FromBytes creates an instance of the [Secret](https://www.fastly.com/documentation/reference/compute/sdks/go/compute-sdk-go/secretstore/struct.Secret/) type for use with APIs that require it from the provided byte slice. |

## Variables

### ErrInvalidSecretName

**Type:** `error`  
**Default:** `errors.New("invalid secret name")`  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/secretstore/secretstore.go#L34

ErrInvalidSecretName indicates that the given secret name is
invalid.

### ErrInvalidSecretStoreName

**Type:** `error`  
**Default:** `errors.New("invalid secret store name")`  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/secretstore/secretstore.go#L26

ErrInvalidSecretStoreName indicates that the given secret store
name is invalid.

### ErrSecretNotFound

**Type:** `error`  
**Default:** `errors.New("secret not found")`  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/secretstore/secretstore.go#L30

ErrSecretNotFound indicates that the named secret doesn't exist
within this store.

### ErrSecretStoreNotFound

**Type:** `error`  
**Default:** `errors.New("secret store not found")`  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/secretstore/secretstore.go#L22

ErrSecretStoreNotFound indicates that the named secret store
doesn't exist.

### ErrUnexpected

**Type:** `error`  
**Default:** `errors.New("unexpected error")`  
**Source:** https://github.com/fastly/compute-sdk-go/blob/d6bf71b04516ed72d6018cab6fff701a865f86e5/secretstore/secretstore.go#L37

ErrUnexpected indicates than an unexpected error occurred.
