rekivik

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 4 Imported by: 0

README

rekivik

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Protocol string
	Host     string
	Username string
	Password string
}

type Query

type Query struct {
	Selector map[string]interface{} `json:"selector"`
}

type ReKivik

type ReKivik struct {
	*kivik.Client
}

func NewCouchDB

func NewCouchDB(config Config) (*ReKivik, error)

func (*ReKivik) AllDocs

func (rk *ReKivik) AllDocs(dbName string, dest interface{}) error

func (*ReKivik) CreateDoc

func (rk *ReKivik) CreateDoc(dbName string, doc interface{}) (docID string, rev string, err error)

func (*ReKivik) Delete

func (rk *ReKivik) Delete(dbName string, docID string, rev string) (newRev string, err error)

func (*ReKivik) Find

func (rk *ReKivik) Find(dbName string, dest interface{}, findBy Query) error

func (*ReKivik) Put

func (rk *ReKivik) Put(dbName string, docID string, doc interface{}) (rev string, err error)

Jump to

Keyboard shortcuts

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