store

package
v0.0.0-...-8045d3c Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package store and its sub-packages provide real-world randomizer.Store implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FactoryFromEnv

func FactoryFromEnv(ctx context.Context) (func(string) randomizer.Store, error)

FactoryFromEnv constructs and returns a Factory based on available environment variables. If a known DynamoDB environment variable is set, it will return a DynamoDB store. Otherwise, it will return a bbolt store.

Types

type Factory

type Factory func(partition string) randomizer.Store

Factory represents a type for functions that produce a store for the randomizer to use for a given "partition" (e.g. Slack channel).

A Factory may panic if it requires a non-empty partition and no partition is given.

Directories

Path Synopsis
Package bbolt supports randomizer storage in a local bbolt database file.
Package bbolt supports randomizer storage in a local bbolt database file.
Package dynamodb supports randomizer storage in an Amazon DynamoDB table.
Package dynamodb supports randomizer storage in an Amazon DynamoDB table.
Package firestore supports randomizer storage in Google Cloud Firestore.
Package firestore supports randomizer storage in Google Cloud Firestore.

Jump to

Keyboard shortcuts

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