couchdb

package
v0.0.0-...-ebc0203 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package couchdb represents the CouchDB implementation of the user data persistence layer

Index

Constants

View Source
const (
	DDOC    string = "_design/serviceConfigDesignDoc"
	VIEW_ID string = "_view/serviceConfigByID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type UserDataCouchdb

type UserDataCouchdb struct {
	DB *kivik.DB
}

func (*UserDataCouchdb) EnableTx

func (udc *UserDataCouchdb) EnableTx(txFunc func() error) error

EnableTx is created to satisfied the txdataservice.TxDataInterface, but it will never be used because NoSQL won't support transaction

func (*UserDataCouchdb) Find

func (udc *UserDataCouchdb) Find(id int) (*model.User, error)

func (*UserDataCouchdb) FindAll

func (udc *UserDataCouchdb) FindAll() ([]model.User, error)

func (*UserDataCouchdb) FindByName

func (udc *UserDataCouchdb) FindByName(name string) (*model.User, error)

func (*UserDataCouchdb) Insert

func (udc *UserDataCouchdb) Insert(user *model.User) (*model.User, error)

func (*UserDataCouchdb) Remove

func (udc *UserDataCouchdb) Remove(username string) (int64, error)

func (*UserDataCouchdb) Update

func (udc *UserDataCouchdb) Update(user *model.User) (int64, error)

Jump to

Keyboard shortcuts

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