package main

import (
	"fmt"

	_ "github.com/go-kivik/couchdb/v3"
	kivik "github.com/go-kivik/kivik/v3"
)

func getDBClient() (*kivik.Client, error) {
	config := getConfig()

	client, err := kivik.New("couch", fmt.Sprintf("%s://%s:%s@%s", config.CouchDBProto, config.CouchDBUsername, config.CouchDBPassword, config.CouchDBHost))
	return client, err
}
