github.com/hungdoo/bot@v0.0.0-20240325145135-dd1f386f7b81/src/packages/command/common/ICommand.go (about) 1 package command 2 3 import ( 4 "time" 5 6 "github.com/hungdoo/bot/src/common" 7 "github.com/shopspring/decimal" 8 ) 9 10 type ICommand interface { 11 SetPrev(newValue decimal.Decimal) 12 SetData(newValue []string) error 13 SetExecutedTime(newValue time.Time) 14 SetIdleTime(newValue time.Duration) 15 SetEnabled(newValue bool) 16 SetError(err string) 17 SetDisplayMsg(msg string) 18 19 GetPrev() decimal.Decimal 20 GetDisplayMsg() string 21 GetName() string 22 GetType() CommandType 23 GetError() string 24 GetOverview() string 25 GetData() []string 26 GetUnderlying() interface{} 27 IsEnabled() bool 28 IsIdle() bool 29 30 Validate(data []string) error 31 Execute(mustReport bool, cmd string) (string, *common.ErrorWithSeverity) 32 }