Documentation ¶
Index ¶
- Variables
- type Config
- type DB
- func (db *DB) Count(ctx context.Context, docType string, val interface{}) error
- func (db *DB) Create(ctx context.Context, key string, val interface{}) error
- func (db *DB) Delete(ctx context.Context, key string) error
- func (db *DB) Get(ctx context.Context, key string, model interface{}) error
- func (db *DB) Lookup(ctx context.Context, key string, path string, val interface{}) error
- func (db *DB) Query(ctx context.Context, statement string, args map[string]interface{}) (*gocb.QueryResult, error)
- func (db *DB) Update(ctx context.Context, key string, path string, val interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrDocumentNotFound is returned when the doc does not exist in the DB. ErrDocumentNotFound = errors.New("document not found") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // the data source name (DSN) for connecting to the database. Server string `mapstructure:"server"` // Username used to access the db. Username string `mapstructure:"username"` // Password used to access the db. Password string `mapstructure:"password"` // Name of the couchbase bucket. BucketName string `mapstructure:"bucket_name"` }
Config represents the database config.
type DB ¶
DB represents the database connection.
Click to show internal directories.
Click to hide internal directories.