Documentation
¶
Index ¶
- Variables
- func LoadAllHandlers(manager *entryManager.EntryManager)
- type BackupScheduleContainer
- func (c *BackupScheduleContainer) GetBackupType() string
- func (c *BackupScheduleContainer) GetName() string
- func (c *BackupScheduleContainer) GetStrUniqueId() string
- func (m *BackupScheduleContainer) IsWithin(d time.Duration) bool
- func (c *BackupScheduleContainer) NeedsImmediateBackup() bool
- func (c *BackupScheduleContainer) ParseAsMd() wotoStyle.WStyle
- func (m *BackupScheduleContainer) RemainingTime() time.Duration
- func (m *BackupScheduleContainer) RemainingTimeStr() string
- func (c *BackupScheduleContainer) RunBackup()
- func (m *BackupScheduleContainer) UploadFileToChats(filename string, opts *em.UploadDocumentToChatsOptions) error
- type BackupScheduleManager
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoPathOrUrlSet = errors.New("the section doesn't have any path or url set")
)
Functions ¶
func LoadAllHandlers ¶
func LoadAllHandlers(manager *entryManager.EntryManager)
Types ¶
type BackupScheduleContainer ¶
type BackupScheduleContainer struct { // DatabaseConfig is the config section of the target db belonging to // this container. DatabaseConfig *wotoConfig.ValueSection // LastBackupDate is the date of the last time we got backup from this db. LastBackupDate time.Time // BackupInterval is the interval that we will get backup. BackupInterval time.Duration // ChatIDs field specifies the global log channels that we have // to send the backup to. ChatIDs []int64 // contains filtered or unexported fields }
func GetContainerByName ¶
func GetContainerByName(name string) *BackupScheduleContainer
func (*BackupScheduleContainer) GetBackupType ¶
func (c *BackupScheduleContainer) GetBackupType() string
func (*BackupScheduleContainer) GetName ¶
func (c *BackupScheduleContainer) GetName() string
func (*BackupScheduleContainer) GetStrUniqueId ¶
func (c *BackupScheduleContainer) GetStrUniqueId() string
func (*BackupScheduleContainer) IsWithin ¶
func (m *BackupScheduleContainer) IsWithin(d time.Duration) bool
func (*BackupScheduleContainer) NeedsImmediateBackup ¶
func (c *BackupScheduleContainer) NeedsImmediateBackup() bool
func (*BackupScheduleContainer) ParseAsMd ¶
func (c *BackupScheduleContainer) ParseAsMd() wotoStyle.WStyle
func (*BackupScheduleContainer) RemainingTime ¶
func (m *BackupScheduleContainer) RemainingTime() time.Duration
func (*BackupScheduleContainer) RemainingTimeStr ¶
func (m *BackupScheduleContainer) RemainingTimeStr() string
func (*BackupScheduleContainer) RunBackup ¶
func (c *BackupScheduleContainer) RunBackup()
func (*BackupScheduleContainer) UploadFileToChats ¶
func (m *BackupScheduleContainer) UploadFileToChats(filename string, opts *em.UploadDocumentToChatsOptions) error
type BackupScheduleManager ¶
type BackupScheduleManager struct { // ChatIDs field specifies the global log channels that we have // to send the backup to. ChatIDs []int64 // contains filtered or unexported fields }
func (*BackupScheduleManager) FormatInterval ¶
func (m *BackupScheduleManager) FormatInterval() string
FormatInterval method will convert the time interval with this format: "1 day, 2 hours, 3 minutes, 4 seconds" (it will omit the smaller units if they are 0)
func (*BackupScheduleManager) GetContainerByName ¶
func (m *BackupScheduleManager) GetContainerByName(name string) *BackupScheduleContainer
func (*BackupScheduleManager) PrepareBackupInfo ¶
func (m *BackupScheduleManager) PrepareBackupInfo(currentContainers []*BackupScheduleContainer)
func (*BackupScheduleManager) RunChecking ¶
func (m *BackupScheduleManager) RunChecking()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.