cloudflare

package
v1.18.1-focal Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

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

func Account(id string) options.Option

Account sets the cloudflare account id

func Namespace

func Namespace(ns string) options.Option

Namespace sets the KV namespace

func NewStore

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

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