cloudflare

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: Apache-2.0 Imports: 16 Imported by: 10

Documentation

Overview

Package cloudflare is a store implementation backed by cloudflare workers kv Note that the cloudflare workers KV API is eventually consistent.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Account added in v1.14.0

func Account(id string) options.Option

Account sets the cloudflare account id

func Namespace added in v1.14.0

func Namespace(ns string) options.Option

Namespace sets the KV namespace

func NewStore added in v1.14.0

func NewStore(opts ...options.Option) store.Store

New returns a cloudflare Store implementation. Account ID, Token and Namespace must either be passed as options or environment variables. If set as env vars we expect the following; CF_API_TOKEN to a cloudflare API token scoped to Workers KV. CF_ACCOUNT_ID to contain a string with your cloudflare account ID. KV_NAMESPACE_ID to contain the namespace UUID for your KV storage.

func Token added in v1.14.0

func Token(t string) options.Option

Token sets the cloudflare api token

Types

This section is empty.

Jump to

Keyboard shortcuts

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