Structin kvstorecompute-sdk-go v1.11.0View source
type Store struct {
// contains filtered or unexported fields
}

Store represents a Fastly KV store

Methods

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

Delete removes a key from the associated KV store.

Parameters

key: string

Returns

error
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

View source
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
func (s *Store) List(config *ListConfig) *ListIter

List returns an iterator over pages of keys matching

Parameters

config: *ListConfig

Returns

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)