db

package
v0.0.0-...-6401950 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clap

type Clap struct {
	URL   string `fauna:"url"`
	Count int64  `fauna:"count"`
}

Clap data document structure

type KV

type KV interface {
	Add(string, []byte, time.Duration) error
	Set(string, []byte, time.Duration) error
	Delete(string) error
	Get(string) ([]byte, error)
	Incr(string) error
	IncrBy(string, int64) error
	WithContext(context.Context) KV
}

KV key value db interface

func NewFaunaDB

func NewFaunaDB(secret, collection, idx string) (kv KV, err error)

NewFaunaDB create faunadb client

func NewRedisDB

func NewRedisDB(address, password string) (kv KV, err error)

NewRedisDB create redis client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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