Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
ExecuteWith(uow UnitOfWork) error
}
Command represents a command that can be executed.
type IndexDocCommand ¶
type IndexDocCommand struct { Doc string // The document to index. Index string // The name of the index or data stream to index the document in. }
IndexDocCommand represents a command to index a document in Elasticsearch.
func (IndexDocCommand) ExecuteWith ¶
func (c IndexDocCommand) ExecuteWith(uow UnitOfWork) error
ExecuteWith executes the command with the given unit of work.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner is a command runner.
type UnitOfWork ¶
type UnitOfWork struct {
Client *elasticsearch.Client
}
UnitOfWork is contains the dependencies needed to execute commands.
type VersionCommand ¶
type VersionCommand struct{}
func (VersionCommand) ExecuteWith ¶
func (c VersionCommand) ExecuteWith(uow UnitOfWork) error
type VersionResult ¶
type VersionResult struct { Version string `json:"version"` Commit string `json:"commit"` Date string `json:"date"` BuiltBy string `json:"built_by"` }
func (VersionResult) Data ¶
func (r VersionResult) Data() interface{}
func (VersionResult) String ¶
func (r VersionResult) String() string
Click to show internal directories.
Click to hide internal directories.