Documentation ¶
Index ¶
- Constants
- Variables
- func CleanseCommand(command string) string
- type BoltDB
- func (b *BoltDB) CheckDupeCmds(command string, count int) (countReached bool)
- func (b *BoltDB) Close() error
- func (b *BoltDB) DeleteScript(alias []byte) error
- func (b *BoltDB) GetRecent(tty, username string, count int) ([]models.HistoryRecord, error)
- func (b *BoltDB) GetScript(alias []byte) (command *models.DocumentedScript)
- func (b *BoltDB) IgnoreCommand(command, username string) (err error)
- func (b *BoltDB) IgnoreWord(word, username string) (err error)
- func (b *BoltDB) Init() error
- func (b *BoltDB) PruneHistory(max int) error
- func (b *BoltDB) QueryHistory(regex *regexp.Regexp, username string, all bool) ([]models.HistoryRecord, error)
- func (b *BoltDB) QueryScripts(tags ...string) ([]models.DocumentedScript, error)
- func (b *BoltDB) Save(id []byte, instance interface{}, overwrite bool) (err error)
- func (b *BoltDB) SaveBatch(toSave <-chan HasID, bucket []byte) <-chan error
- func (b *BoltDB) ShouldIgnoreCommand(command, username string) (yes bool)
- func (b *BoltDB) ShouldIgnoreWord(word, username string) (yes bool)
- func (b *BoltDB) UnignoreCommand(command, username string) (err error)
- func (b *BoltDB) UnignoreWord(word, username string) (err error)
- type HasID
Constants ¶
View Source
const ( Wildcard = "?" TrashTag = "coach.trash.983476" // just something arbitrary that is unlikely to be used by anything else FilePerms = 0660 )
Variables ¶
Functions ¶
func CleanseCommand ¶
CleanseCommand converts a command to what it would look like in the database
Types ¶
type BoltDB ¶
type BoltDB struct {
// contains filtered or unexported fields
}
func (*BoltDB) CheckDupeCmds ¶
func (*BoltDB) DeleteScript ¶
func (*BoltDB) GetRecent ¶
GetRecent retrieves the last count (arg) lines of history from specified tty (arg).
func (*BoltDB) GetScript ¶
func (b *BoltDB) GetScript(alias []byte) (command *models.DocumentedScript)
func (*BoltDB) IgnoreCommand ¶
func (*BoltDB) IgnoreWord ¶ added in v1.2.0
func (*BoltDB) PruneHistory ¶
func (*BoltDB) QueryHistory ¶ added in v1.3.0
func (*BoltDB) QueryScripts ¶
func (b *BoltDB) QueryScripts(tags ...string) ([]models.DocumentedScript, error)
func (*BoltDB) ShouldIgnoreCommand ¶ added in v1.2.0
func (*BoltDB) ShouldIgnoreWord ¶ added in v1.2.0
func (*BoltDB) UnignoreCommand ¶
func (*BoltDB) UnignoreWord ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.