Documentation ¶
Index ¶
- Constants
- Variables
- func GetHash(pass string) string
- type Article
- type BaseEvent
- type BaseTask
- func (B *BaseTask) AppendDescription(txt string)
- func (B *BaseTask) Cancel()
- func (B *BaseTask) Continue(task ITask)
- func (B *BaseTask) CurrentStep() IStep
- func (this *BaseTask) Daemon()
- func (this *BaseTask) DeleteMsg(MessageID int)
- func (B *BaseTask) GetCallBack() map[string]func()
- func (B *BaseTask) GetChatID() int64
- func (B *BaseTask) GetDescription() (result string)
- func (B *BaseTask) GetHook() func(*tgbotapi.Update) bool
- func (B *BaseTask) GetKey() string
- func (B *BaseTask) GetMessage() *tgbotapi.Message
- func (B *BaseTask) GetName() string
- func (B *BaseTask) GetState() int
- func (B *BaseTask) GetUUID() *uuid.UUID
- func (B *BaseTask) InfoWrapper(task ITask)
- func (B *BaseTask) Initialise(bot *tgbotapi.BotAPI, update *tgbotapi.Update, finish func())
- func (B *BaseTask) IsExclusively() bool
- func (B *BaseTask) JsonUnmarshal(JSON string, v interface{}) error
- func (B *BaseTask) Lock(busy func())
- func (B *BaseTask) RestHook()
- func (B *BaseTask) SetName(name string)
- func (B *BaseTask) SetState(newState int)
- func (B *BaseTask) SetUUID(UUID *uuid.UUID)
- func (B *BaseTask) Unlock()
- type Bases
- type BuilAndUploadCf
- type BuilAndUploadCfe
- type BuildCf
- func (B *BuildCf) GetCallBack() map[string]func()
- func (B *BuildCf) GetCfConf() *cf.ConfCommonData
- func (B *BuildCf) InfoWrapper(task ITask)
- func (B *BuildCf) Initialise(bot *tgbotapi.BotAPI, update *tgbotapi.Update, finish func()) ITask
- func (B *BuildCf) Invoke()
- func (B *BuildCf) ProcessChose(ChoseData string)
- func (B *BuildCf) Start()
- type BuildCfe
- func (B *BuildCfe) ChoseAll()
- func (B *BuildCfe) ChoseBranch(Branch string)
- func (B *BuildCfe) ChoseExt(choseData string)
- func (B *BuildCfe) InfoWrapper(task ITask)
- func (B *BuildCfe) Initialise(bot *tgbotapi.BotAPI, update *tgbotapi.Update, finish func()) ITask
- func (B *BuildCfe) Invoke()
- func (B *BuildCfe) Start()
- type Charts
- type DeployExtension
- func (this *DeployExtension) CommitAndPush(filePath, branchName string) (err error)
- func (this *DeployExtension) GetBaseSM() (result *Bases, err error)
- func (B *DeployExtension) InfoWrapper(task ITask)
- func (this *DeployExtension) Initialise(bot *tgbotapi.BotAPI, update *tgbotapi.Update, finish func()) ITask
- func (this *DeployExtension) InvokeJobJenkins(status *string, exclusive bool) (err error)
- func (this *DeployExtension) Start()
- type DisableZabbixMonitoring
- type EventBuilAndUploadCfe
- type EventBuildCf
- type EventBuildCfe
- type EventDeployExtension
- type EventWorkRep
- type GetListUpdateState
- func (B *GetListUpdateState) Cancel(key string)
- func (B *GetListUpdateState) ChoseAgent(ChoseData string)
- func (B *GetListUpdateState) DecDate()
- func (B *GetListUpdateState) IncDate()
- func (B *GetListUpdateState) InfoWrapper(task ITask)
- func (B *GetListUpdateState) Initialise(bot *tgbotapi.BotAPI, update *tgbotapi.Update, finish func()) ITask
- func (B *GetListUpdateState) MonitoringState(UUIDs []string, key string)
- func (B *GetListUpdateState) Start()
- type Group
- type IChart
- type IStep
- type ITask
- type IvokeUpdate
- type IvokeUpdateActualCFE
- func (this *IvokeUpdateActualCFE) ChoseExt(extentions []*conf.Extension, Base []*Bases)
- func (this *IvokeUpdateActualCFE) ChoseMC(ChoseData string)
- func (B *IvokeUpdateActualCFE) InfoWrapper(task ITask)
- func (this *IvokeUpdateActualCFE) Initialise(bot *tgbotapi.BotAPI, update *tgbotapi.Update, finish func()) ITask
- func (this *IvokeUpdateActualCFE) Start()
- type MonitoringData
- type QueueMessageData
- type Repository
- type RepositoryInfo
- type RequestDTO
- type SUI
- type SendMsg
- type SetPlanUpdate
- func (B *SetPlanUpdate) AllUpdates(UUIDBase string)
- func (this *SetPlanUpdate) BuildButtonsByBase(JSON_Base string, step IStep, ChoseBD func(Bases *Bases), all bool) (result string)
- func (B *SetPlanUpdate) ChoseBD(BD *Bases)
- func (this *SetPlanUpdate) ChoseMC(ChoseData string)
- func (B *SetPlanUpdate) ChoseManyDB(Bases []*Bases)
- func (B *SetPlanUpdate) ChoseUpdate(ChoseData, name, UUIDBase string)
- func (B *SetPlanUpdate) ForceUpdate(UUIDUpdate, name, UUIDBase string)
- func (B *SetPlanUpdate) InfoWrapper(task ITask)
- func (this *SetPlanUpdate) Initialise(bot *tgbotapi.BotAPI, update *tgbotapi.Update, finish func()) ITask
- func (B *SetPlanUpdate) Start()
- type TaskFactory
- func (this *TaskFactory) BuilAndUploadCf() ITask
- func (this *TaskFactory) BuilAndUploadCfe() ITask
- func (this *TaskFactory) BuildCf() ITask
- func (this *TaskFactory) BuildCfe() ITask
- func (this *TaskFactory) Charts() ITask
- func (this *TaskFactory) DeployExtension(mu *sync.Mutex) ITask
- func (this *TaskFactory) DisableZabbixMonitoring() ITask
- func (this *TaskFactory) GetListUpdateState() ITask
- func (this *TaskFactory) GetRepositoryReport() ITask
- func (this *TaskFactory) Group() ITask
- func (this *TaskFactory) InvokeUpdateActualCFE() ITask
- func (this *TaskFactory) IvokeUpdate() ITask
- func (this *TaskFactory) SUI() ITask
- func (this *TaskFactory) SendMsg() ITask
- func (this *TaskFactory) SetPlanUpdate() ITask
- type Tasks
- func (B *Tasks) Append(t ITask, UserID int) error
- func (B *Tasks) AppendTask(task ITask, UserID int) ITask
- func (B *Tasks) CheckPass(User *tgbotapi.User, pass string) bool
- func (B *Tasks) CheckSession(User *tgbotapi.User, pass string) bool
- func (B *Tasks) Delete(UserID int)
- func (B *Tasks) ExecuteHook(update *tgbotapi.Update) bool
- func (B *Tasks) GetPss() string
- func (B *Tasks) GetTasks(UserID int) []ITask
- func (B *Tasks) Initialise() *Tasks
- func (B *Tasks) ReadSettings() (err error)
- func (B *Tasks) Reset(fromID int, bot *tgbotapi.BotAPI, update *tgbotapi.Update, clear bool)
- func (B *Tasks) Reuse(command string, UserID int) ITask
- func (B *Tasks) SetPass(pass string) error
- type Ticket
- type TicketInfo
- type UpdateData
- type Updates
- type WorkRep
- func (W *WorkRep) GetCallBack() map[string]func()
- func (W *WorkRep) GetRepositoryReport()
- func (W *WorkRep) InfoWrapper(task ITask)
- func (W *WorkRep) Initialise(bot *tgbotapi.BotAPI, update *tgbotapi.Update, finish func()) ITask
- func (W *WorkRep) ProcessChose(ChoseData string)
- func (W *WorkRep) Start()
Constants ¶
View Source
const ( StateNew int = iota StateWork StateDone ButtonNext = 1 << iota ButtonBack ButtonCancel )
Variables ¶
View Source
var (
Confs *conf.CommonConf
)
View Source
var IsRun int32
Functions ¶
Types ¶
type BaseTask ¶
type BaseTask struct { BaseEvent UUID *uuid.UUID ChatID int64 // contains filtered or unexported fields }
func (*BaseTask) AppendDescription ¶
func (*BaseTask) CurrentStep ¶
func (*BaseTask) GetCallBack ¶
func (*BaseTask) GetDescription ¶
func (*BaseTask) GetMessage ¶
func (*BaseTask) InfoWrapper ¶
func (*BaseTask) Initialise ¶
func (*BaseTask) IsExclusively ¶
func (*BaseTask) JsonUnmarshal ¶
type Bases ¶
type Bases struct { Caption string `json:"Caption"` Name string `json:"Name"` UUID string `json:"UUID"` UserName string `json:"UserName"` UserPass string `json:"UserPass"` Cluster *struct { MainServer string `json:"MainServer"` RASServer string `json:"RASServer"` RASPort int `json:"RASPort"` } `json:"Cluster"` URL string `json:"URL"` Conf string `json:"Conf"` PlatformVersion string `json:"PlatformVersion"` }
type BuilAndUploadCf ¶
type BuilAndUploadCf struct { BuildCf // contains filtered or unexported fields }
func (*BuilAndUploadCf) ChoseMC ¶
func (B *BuilAndUploadCf) ChoseMC(ChoseData string)
func (*BuilAndUploadCf) InfoWrapper ¶
func (B *BuilAndUploadCf) InfoWrapper(task ITask)
func (*BuilAndUploadCf) Initialise ¶
func (*BuilAndUploadCf) Start ¶
func (B *BuilAndUploadCf) Start()
type BuilAndUploadCfe ¶
type BuilAndUploadCfe struct { BuildCfe EventBuilAndUploadCfe OverriteChoseMC func(ChoseData string) // для того что бы можно было переопределить действия после выбора МС при вызове из потомка // contains filtered or unexported fields }
func (*BuilAndUploadCfe) ChoseMC ¶
func (B *BuilAndUploadCfe) ChoseMC(ChoseData string)
func (*BuilAndUploadCfe) InfoWrapper ¶
func (B *BuilAndUploadCfe) InfoWrapper(task ITask)
func (*BuilAndUploadCfe) Initialise ¶
func (*BuilAndUploadCfe) Start ¶
func (B *BuilAndUploadCfe) Start()
type BuildCf ¶
type BuildCf struct { BaseTask EventBuildCf //repName string ChoseRep *cf.Repository ReadVersion bool // contains filtered or unexported fields }
func (*BuildCf) GetCallBack ¶
func (*BuildCf) GetCfConf ¶
func (B *BuildCf) GetCfConf() *cf.ConfCommonData
func (*BuildCf) InfoWrapper ¶
func (*BuildCf) Initialise ¶
func (*BuildCf) ProcessChose ¶
type BuildCfe ¶
type BuildCfe struct { BaseTask EventBuildCfe ChoseExtName []string //HideAllButtun bool Ext *cf.ConfCommonData ChosedBranch string // contains filtered or unexported fields }
func (*BuildCfe) ChoseBranch ¶
func (*BuildCfe) InfoWrapper ¶
func (*BuildCfe) Initialise ¶
type Charts ¶
type Charts struct {
BaseTask
}
func (*Charts) InfoWrapper ¶
func (*Charts) Initialise ¶
type DeployExtension ¶
type DeployExtension struct { BuilAndUploadCfe EventDeployExtension // contains filtered or unexported fields }
func (*DeployExtension) CommitAndPush ¶
func (this *DeployExtension) CommitAndPush(filePath, branchName string) (err error)
GIT
func (*DeployExtension) GetBaseSM ¶
func (this *DeployExtension) GetBaseSM() (result *Bases, err error)
func (*DeployExtension) InfoWrapper ¶
func (B *DeployExtension) InfoWrapper(task ITask)
func (*DeployExtension) Initialise ¶
func (*DeployExtension) InvokeJobJenkins ¶
func (this *DeployExtension) InvokeJobJenkins(status *string, exclusive bool) (err error)
Jenkins
func (*DeployExtension) Start ¶
func (this *DeployExtension) Start()
type DisableZabbixMonitoring ¶
type DisableZabbixMonitoring struct { BaseTask // contains filtered or unexported fields }
func (*DisableZabbixMonitoring) InfoWrapper ¶
func (this *DisableZabbixMonitoring) InfoWrapper(task ITask)
func (*DisableZabbixMonitoring) Initialise ¶
func (*DisableZabbixMonitoring) Start ¶
func (this *DisableZabbixMonitoring) Start()
type EventBuilAndUploadCfe ¶
type EventBuilAndUploadCfe struct { BeforeUploadFresh []func(cf.IConfiguration) AfterUploadFresh []func(cf.IConfiguration, string) AfterAllUploadFresh []func() }
type EventBuildCf ¶
type EventBuildCf struct { BeforeBuild []func() AfterBuild []func() }
type EventBuildCfe ¶
type EventBuildCfe struct { // События которые вызываются после сборки одного расширения BeforeBuild []func(cf.IConfiguration) // События которые вызываются до сборки расширений AfterBuild []func(ext cf.IConfiguration) // События которые вызываются после сборки всех расширений AfterAllBuild []func() // Событие которое вызывается при сборе всех расширений }
type EventDeployExtension ¶
type EventDeployExtension struct { }
type EventWorkRep ¶
type EventWorkRep struct { BeforeBuild []func() AfterBuild []func() }
type GetListUpdateState ¶
type GetListUpdateState struct { BaseTask // contains filtered or unexported fields }
func (*GetListUpdateState) Cancel ¶
func (B *GetListUpdateState) Cancel(key string)
func (*GetListUpdateState) ChoseAgent ¶
func (B *GetListUpdateState) ChoseAgent(ChoseData string)
func (*GetListUpdateState) DecDate ¶
func (B *GetListUpdateState) DecDate()
func (*GetListUpdateState) IncDate ¶
func (B *GetListUpdateState) IncDate()
func (*GetListUpdateState) InfoWrapper ¶
func (B *GetListUpdateState) InfoWrapper(task ITask)
func (*GetListUpdateState) Initialise ¶
func (*GetListUpdateState) MonitoringState ¶
func (B *GetListUpdateState) MonitoringState(UUIDs []string, key string)
func (*GetListUpdateState) Start ¶
func (B *GetListUpdateState) Start()
type ITask ¶
type ITask interface { Initialise(*tgbotapi.BotAPI, *tgbotapi.Update, func()) ITask Start() InfoWrapper(ITask) GetCallBack() map[string]func() GetHook() func(*tgbotapi.Update) bool RestHook() GetName() string GetState() int SetState(int) GetChatID() int64 GetUUID() *uuid.UUID SetUUID(*uuid.UUID) SetName(string) GetDescription() string GetMessage() *tgbotapi.Message IsExclusively() bool Lock(func()) Unlock() CurrentStep() IStep // Метод который запускается один раз при старте бота. Запус происходит в горутине Daemon() // contains filtered or unexported methods }
type IvokeUpdate ¶
type IvokeUpdate struct {
SetPlanUpdate
}
func (*IvokeUpdate) InfoWrapper ¶
func (B *IvokeUpdate) InfoWrapper(task ITask)
func (*IvokeUpdate) Initialise ¶
func (*IvokeUpdate) Start ¶
func (this *IvokeUpdate) Start()
type IvokeUpdateActualCFE ¶
type IvokeUpdateActualCFE struct { SetPlanUpdate // из-за BuildButtonsByBase DeployExtension // из-за InvokeJobJenkins // contains filtered or unexported fields }
func (*IvokeUpdateActualCFE) ChoseExt ¶
func (this *IvokeUpdateActualCFE) ChoseExt(extentions []*conf.Extension, Base []*Bases)
func (*IvokeUpdateActualCFE) ChoseMC ¶
func (this *IvokeUpdateActualCFE) ChoseMC(ChoseData string)
func (*IvokeUpdateActualCFE) InfoWrapper ¶
func (B *IvokeUpdateActualCFE) InfoWrapper(task ITask)
func (*IvokeUpdateActualCFE) Initialise ¶
func (*IvokeUpdateActualCFE) Start ¶
func (this *IvokeUpdateActualCFE) Start()
type MonitoringData ¶
type QueueMessageData ¶
type QueueMessageData struct { Count int `json:"count"` Data []*QueueMessageData `json:"data"` Direction string `json:"direction"` Base string `json:"base"` }
type Repository ¶
type Repository struct {
BinPath string
}
type RepositoryInfo ¶
type RequestDTO ¶
type SUI ¶
type SUI struct { BaseTask GetListUpdateState // contains filtered or unexported fields }
func (*SUI) InfoWrapper ¶
func (*SUI) Initialise ¶
type SendMsg ¶
type SendMsg struct { BaseTask // contains filtered or unexported fields }
func (*SendMsg) InfoWrapper ¶
func (*SendMsg) Initialise ¶
type SetPlanUpdate ¶
type SetPlanUpdate struct { BaseTask MinuteShift int InvokeChoseDB func(BD *Bases) MessagesID []int // contains filtered or unexported fields }
func (*SetPlanUpdate) AllUpdates ¶
func (B *SetPlanUpdate) AllUpdates(UUIDBase string)
func (*SetPlanUpdate) BuildButtonsByBase ¶
func (*SetPlanUpdate) ChoseBD ¶
func (B *SetPlanUpdate) ChoseBD(BD *Bases)
func (*SetPlanUpdate) ChoseMC ¶
func (this *SetPlanUpdate) ChoseMC(ChoseData string)
func (*SetPlanUpdate) ChoseManyDB ¶
func (B *SetPlanUpdate) ChoseManyDB(Bases []*Bases)
func (*SetPlanUpdate) ChoseUpdate ¶
func (B *SetPlanUpdate) ChoseUpdate(ChoseData, name, UUIDBase string)
func (*SetPlanUpdate) ForceUpdate ¶
func (B *SetPlanUpdate) ForceUpdate(UUIDUpdate, name, UUIDBase string)
func (*SetPlanUpdate) InfoWrapper ¶
func (B *SetPlanUpdate) InfoWrapper(task ITask)
func (*SetPlanUpdate) Initialise ¶
func (*SetPlanUpdate) Start ¶
func (B *SetPlanUpdate) Start()
type TaskFactory ¶
type TaskFactory struct { }
func (*TaskFactory) BuilAndUploadCf ¶
func (this *TaskFactory) BuilAndUploadCf() ITask
func (*TaskFactory) BuilAndUploadCfe ¶
func (this *TaskFactory) BuilAndUploadCfe() ITask
func (*TaskFactory) BuildCf ¶
func (this *TaskFactory) BuildCf() ITask
func (*TaskFactory) BuildCfe ¶
func (this *TaskFactory) BuildCfe() ITask
func (*TaskFactory) Charts ¶
func (this *TaskFactory) Charts() ITask
func (*TaskFactory) DeployExtension ¶
func (this *TaskFactory) DeployExtension(mu *sync.Mutex) ITask
func (*TaskFactory) DisableZabbixMonitoring ¶
func (this *TaskFactory) DisableZabbixMonitoring() ITask
func (*TaskFactory) GetListUpdateState ¶
func (this *TaskFactory) GetListUpdateState() ITask
func (*TaskFactory) GetRepositoryReport ¶
func (this *TaskFactory) GetRepositoryReport() ITask
func (*TaskFactory) Group ¶
func (this *TaskFactory) Group() ITask
func (*TaskFactory) InvokeUpdateActualCFE ¶
func (this *TaskFactory) InvokeUpdateActualCFE() ITask
func (*TaskFactory) IvokeUpdate ¶
func (this *TaskFactory) IvokeUpdate() ITask
func (*TaskFactory) SUI ¶
func (this *TaskFactory) SUI() ITask
func (*TaskFactory) SendMsg ¶
func (this *TaskFactory) SendMsg() ITask
func (*TaskFactory) SetPlanUpdate ¶
func (this *TaskFactory) SetPlanUpdate() ITask
type Tasks ¶
type Tasks struct { SessManager *settings.SessionManager // contains filtered or unexported fields }
func (*Tasks) CheckSession ¶
функция возвращает первый bool когда текущая сессия активна
func (*Tasks) Initialise ¶
func (*Tasks) ReadSettings ¶
type TicketInfo ¶
type UpdateData ¶
type UpdateData struct { Task string `json:"Task"` Error bool `json:"Error"` State string `json:"State"` UUID string `json:"UUID"` LastAction string `json:"LastAction"` End bool `json:"End"` Base string `json:"Base"` ToVersion string `json:"ToVersion"` Conf string `json:"Conf"` }
func (*UpdateData) Hash ¶
func (d *UpdateData) Hash() string
type WorkRep ¶
type WorkRep struct { BaseTask EventWorkRep //repName string ChoseRep *cf.Repository // contains filtered or unexported fields }
func (*WorkRep) GetCallBack ¶
func (*WorkRep) GetRepositoryReport ¶
func (W *WorkRep) GetRepositoryReport()
func (*WorkRep) InfoWrapper ¶
func (*WorkRep) Initialise ¶
func (*WorkRep) ProcessChose ¶
Source Files ¶
- BuilAndUploadCf.go
- BuilAndUploadCfe.go
- BuildCf.go
- BuildCfe.go
- DeployExtension.go
- DisableZabbixMonitoring.go
- GetListUpdateState.go
- GetRepositoryReport.go
- IvokeUpdate.go
- IvokeUpdateActualCFE.go
- SUI.go
- SendMsg.go
- SetPlanUpdate.go
- chartNotUpdatedNode.go
- chartQueueMessage.go
- groupchat.go
- mainChart.go
- tmain.go
Click to show internal directories.
Click to hide internal directories.