go_couchdb_helper

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 7 Imported by: 0

README

go-couchdb-helper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDB

func CheckDB(con CouchDB, create bool) (bool, error)

func CleanDeleted added in v1.0.1

func CleanDeleted(db *kivik.DB) (bool, error)

func CreateClientDB

func CreateClientDB(con CouchDB) (*kivik.DB, error)

func CreateConnection

func CreateConnection(con CouchDB) (*kivik.Client, error)

func CreateDBIndex

func CreateDBIndex(con CouchDB, indexName string) (bool, error)

func CreateDBManyIndex

func CreateDBManyIndex(con CouchDB, indexString []string) (bool, error)

func FindGetRow

func FindGetRow(db *kivik.DB, queryFields map[string]interface{}) ([]interface{}, int, string, error)

func FindRow

func FindRow(db *kivik.DB, queryFields map[string]string, bookmark string, fields []string, limit int) ([]interface{}, int, string, error)

func GenerateAddress

func GenerateAddress(con CouchDB) string

func GetRowDB

func GetRowDB(db *kivik.DB, id string) *kivik.Row

func GetStats

func GetStats(con CouchDB) (*kivik.DBStats, error)

func PutRowDB

func PutRowDB(db *kivik.DB, id string, row interface{}) (rev string, err error)

Types

type CouchDB

type CouchDB struct {
	Schema      string   `json:"schema" yaml:"schema"`
	Server      string   `json:"server" yaml:"server"`
	Port        string   `json:"port" yaml:"port"`
	Username    string   `json:"username" yaml:"username"`
	Password    string   `json:"-" yaml:"password" json:"-"`
	Name        string   `json:"name" yaml:"name"`
	IndexFields []string `json:"indexFields" yaml:"indexFields"`
}

Jump to

Keyboard shortcuts

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