Documentation
¶
Index ¶
- Constants
- type CliDisplay
- type CliDisplayImpl
- func (d *CliDisplayImpl) Display(output string, withPager bool) error
- func (d *CliDisplayImpl) IndexBuild(res domain.BuildOperationResult) string
- func (d *CliDisplayImpl) IndexClean(res domain.CleanOperationResult) string
- func (d *CliDisplayImpl) Search(res domain.SearchResult) string
- func (d *CliDisplayImpl) ShowFile(file domain.IndexedFile) string
- func (d *CliDisplayImpl) StartServer(serviceUrl string) string
- type CliHandlers
- type CliHandlersImpl
- type CliParserImpl
Constants ¶
View Source
const ( FlagNumberOfResult = "number-of-results" FlagQuery = "query" FlagNoPager = "no-pager" FlagHash = "hash" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CliDisplay ¶
type CliDisplay interface {
IndexBuild(res domain.BuildOperationResult) string
IndexClean(res domain.CleanOperationResult) string
Search(res domain.SearchResult) string
ShowFile(file domain.IndexedFile) string
StartServer(serviceUrl string) string
Display(output string, withPager bool) error
}
func NewCliDisplay ¶
func NewCliDisplay(config config.Config) CliDisplay
type CliDisplayImpl ¶
type CliDisplayImpl struct {
// contains filtered or unexported fields
}
func (*CliDisplayImpl) Display ¶
func (d *CliDisplayImpl) Display(output string, withPager bool) error
func (*CliDisplayImpl) IndexBuild ¶
func (d *CliDisplayImpl) IndexBuild(res domain.BuildOperationResult) string
func (*CliDisplayImpl) IndexClean ¶
func (d *CliDisplayImpl) IndexClean(res domain.CleanOperationResult) string
func (*CliDisplayImpl) Search ¶
func (d *CliDisplayImpl) Search(res domain.SearchResult) string
func (*CliDisplayImpl) ShowFile ¶
func (d *CliDisplayImpl) ShowFile(file domain.IndexedFile) string
func (*CliDisplayImpl) StartServer ¶
func (d *CliDisplayImpl) StartServer(serviceUrl string) string
type CliHandlers ¶
type CliHandlers interface {
UpdateIndex() error
CleanIndex() error
Search(query string, numberOfResults int, usePager bool) error
ShowFile(hash string, usePager bool) error
StartServer() error
}
func NewCliHandlers ¶
func NewCliHandlers(gsConfig config.Config, gsIndex index.Index, server http.HttpServer) CliHandlers
type CliHandlersImpl ¶
type CliHandlersImpl struct {
// contains filtered or unexported fields
}
func (*CliHandlersImpl) CleanIndex ¶
func (s *CliHandlersImpl) CleanIndex() error
func (*CliHandlersImpl) Search ¶
func (s *CliHandlersImpl) Search(query string, numberOfResults int, usePager bool) error
func (*CliHandlersImpl) ShowFile ¶
func (s *CliHandlersImpl) ShowFile(hash string, usePager bool) error
TODO: show files by path too
func (*CliHandlersImpl) StartServer ¶
func (s *CliHandlersImpl) StartServer() error
func (*CliHandlersImpl) UpdateIndex ¶
func (s *CliHandlersImpl) UpdateIndex() error
type CliParserImpl ¶
type CliParserImpl struct {
// contains filtered or unexported fields
}
func NewCliParser ¶
func NewCliParser(config config.Config, index index.Index, server http.HttpServer) CliParserImpl
func (*CliParserImpl) ApplyCommand ¶
func (s *CliParserImpl) ApplyCommand(args []string) error
Click to show internal directories.
Click to hide internal directories.