Documentation ¶
Index ¶
- Variables
- type DesignDocument
- type Engine
- func (e *Engine) DropDesignDocument(name string) error
- func (e *Engine) Execute(opts ExecuteOptions) (int, *ExecuteResults, error)
- func (e *Engine) GetAllDesignDocuments() []*DesignDocument
- func (e *Engine) GetDesignDocument(name string) (*DesignDocument, error)
- func (e *Engine) UpsertDesignDocument(name string, opts UpsertDesignDocumentOptions) error
- type ExecuteOptions
- type ExecuteResults
- type Index
- type InvalidParametersError
- type UpsertDesignDocumentOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New(`{"error":"not_found","reason":"missing"}`) ErrInvalidParameters = errors.New("invalid parameters") )
This is a list of errors we support
Functions ¶
This section is empty.
Types ¶
type DesignDocument ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine represents the mock map reduce engine.
func (*Engine) DropDesignDocument ¶
DropDesignDocument removes a design document.
func (*Engine) Execute ¶
func (e *Engine) Execute(opts ExecuteOptions) (int, *ExecuteResults, error)
Execute executes a query.
func (*Engine) GetAllDesignDocuments ¶
func (e *Engine) GetAllDesignDocuments() []*DesignDocument
GetAllDesignDocuments retrieves all design documents.
func (*Engine) GetDesignDocument ¶
func (e *Engine) GetDesignDocument(name string) (*DesignDocument, error)
GetDesignDocument retrieves a single design document.
func (*Engine) UpsertDesignDocument ¶
func (e *Engine) UpsertDesignDocument(name string, opts UpsertDesignDocumentOptions) error
UpsertDesignDocument creates or updates a design document.
type ExecuteOptions ¶
type ExecuteOptions struct { Data []*mockdb.Document DesignDoc string View string Skip int StartKey string StartKeyDocID string EndKey string EndKeyDocID string InclusiveEnd bool Key string Keys []string Descending bool Reduce bool Group bool GroupLevel int Limit int }
ExecuteOptions provides options when executing an query.
type ExecuteResults ¶
type ExecuteResults struct {
Rows []outputItem
}
ExecuteResults provides the results from an executed query.
type InvalidParametersError ¶
type InvalidParametersError struct {
Message string
}
func (*InvalidParametersError) Error ¶
func (ipe *InvalidParametersError) Error() string
func (*InvalidParametersError) Unwrap ¶
func (ipe *InvalidParametersError) Unwrap() error
type UpsertDesignDocumentOptions ¶
type UpsertDesignDocumentOptions struct {
Indexes []*Index
}
Click to show internal directories.
Click to hide internal directories.