Documentation
¶
Index ¶
- Constants
- type BackupWindow
- func (b *BackupWindow) GetStartingDateOfPreviousScheduledRun(current time.Time) (time.Time, error)
- func (b *BackupWindow) IsInPreviousWindowTimeSlot(now time.Time, latestVersionCreation time.Time) (bool, error)
- func (b *BackupWindow) IsInWindowNow(current time.Time) (bool, error)
- func (b *BackupWindow) UnmarshalJSON(in []byte) error
- type BackupWindows
- type Collection
- func (c *Collection) CanDownloadFromMe(user security.Actor) bool
- func (c *Collection) CanListMyVersions(user security.Actor) bool
- func (c *Collection) CanUploadToMe(user security.Actor) bool
- func (c *Collection) GenerateNextVersionFilename(version int) string
- func (c *Collection) GetAccessControlList() *security.AccessControlList
- func (c *Collection) GetCollectionMaxSize() (int64, error)
- func (c *Collection) GetEstimatedCollectionExtraSpace() (int64, error)
- func (c *Collection) GetGlobalIdentifier() string
- func (c *Collection) GetId() string
- func (c *Collection) GetMaxOneVersionSizeInBytes() (int64, error)
- func (c *Collection) GetTypeName() string
- func (c *Collection) IsHealthCheckSecretValid(secret string) bool
- type Service
- type Spec
- type StrategySpec
Constants ¶
View Source
const KindCollection = "backupcollections"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupWindow ¶
type BackupWindow struct { From string `json:"from"` Duration string `json:"duration"` // contains filtered or unexported fields }
func NewBackupWindow ¶
func NewBackupWindow(from string, duration string) (BackupWindow, error)
NewBackupWindow is a factory method
func (*BackupWindow) GetStartingDateOfPreviousScheduledRun ¶
func (*BackupWindow) IsInPreviousWindowTimeSlot ¶
func (*BackupWindow) IsInWindowNow ¶
func (b *BackupWindow) IsInWindowNow(current time.Time) (bool, error)
IsInWindowNow checks if given time is between BackupWindow time slot (<-start--O--end->)
func (*BackupWindow) UnmarshalJSON ¶
func (b *BackupWindow) UnmarshalJSON(in []byte) error
UnmarshalJSON performs a validation when decoding a JSON
type BackupWindows ¶
type BackupWindows []BackupWindow
type Collection ¶
type Collection struct { Metadata config.ObjectMetadata `json:"metadata"` Spec Spec `json:"spec"` SecretFromSecret string }
func (*Collection) CanDownloadFromMe ¶
func (c *Collection) CanDownloadFromMe(user security.Actor) bool
CanDownloadFromMe answers if user can download versions to this collection
func (*Collection) CanListMyVersions ¶
func (c *Collection) CanListMyVersions(user security.Actor) bool
CanListMyVersions answers if user can list versions
func (*Collection) CanUploadToMe ¶
func (c *Collection) CanUploadToMe(user security.Actor) bool
CanUploadToMe answers if user can add new versions to the collection
func (*Collection) GenerateNextVersionFilename ¶
func (c *Collection) GenerateNextVersionFilename(version int) string
func (*Collection) GetAccessControlList ¶
func (c *Collection) GetAccessControlList() *security.AccessControlList
func (*Collection) GetCollectionMaxSize ¶
func (c *Collection) GetCollectionMaxSize() (int64, error)
func (*Collection) GetEstimatedCollectionExtraSpace ¶
func (c *Collection) GetEstimatedCollectionExtraSpace() (int64, error)
GetEstimatedCollectionExtraSpace returns total space that can be extra allocated in case, when a single version exceeds its limit. Returned value is estimated, does not include real state.
func (*Collection) GetGlobalIdentifier ¶
func (c *Collection) GetGlobalIdentifier() string
func (*Collection) GetId ¶
func (c *Collection) GetId() string
func (*Collection) GetMaxOneVersionSizeInBytes ¶
func (c *Collection) GetMaxOneVersionSizeInBytes() (int64, error)
func (*Collection) GetTypeName ¶
func (c *Collection) GetTypeName() string
func (*Collection) IsHealthCheckSecretValid ¶
func (c *Collection) IsHealthCheckSecretValid(secret string) bool
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(config config.ConfigurationProvider) Service
func (*Service) GetCollectionById ¶
func (s *Service) GetCollectionById(id string) (*Collection, error)
func (*Service) ValidateIsBackupWindowAllowingToUpload ¶
func (s *Service) ValidateIsBackupWindowAllowingToUpload(collection *Collection, contextTime time.Time) bool
type Spec ¶
type Spec struct { Description string `json:"description"` FilenameTemplate string `json:"filenameTemplate"` MaxBackupsCount int `json:"maxBackupsCount"` MaxOneVersionSize string `json:"maxOneVersionSize"` MaxCollectionSize string `json:"maxCollectionSize"` Windows BackupWindows `json:"windows"` StrategyName string `json:"strategyName"` StrategySpec StrategySpec `json:"strategySpec"` AccessControl security.AccessControlList `json:"accessControl"` HealthSecretRef security.PasswordFromSecretRef `json:"healthSecretRef"` }
type StrategySpec ¶
Click to show internal directories.
Click to hide internal directories.