Documentation
¶
Index ¶
- Constants
- func GetProviderFactoryType() []string
- func RegisterProvider(factory ProviderFactory)
- type BackupStore
- type DynamicOptions
- type FilesystemStore
- func (fs *FilesystemStore) Create() (BackupStore, error)
- func (fs *FilesystemStore) Delete(ctx context.Context, fileName string) (err error)
- func (fs *FilesystemStore) Download(ctx context.Context, fileName string, w io.Writer) (err error)
- func (fs *FilesystemStore) Save(ctx context.Context, r io.Reader, fileName string) (err error)
- func (fs *FilesystemStore) Type() string
- type ObjectStore
- func (receiver *ObjectStore) Create() (BackupStore, error)
- func (receiver *ObjectStore) Delete(ctx context.Context, fileName string) (err error)
- func (receiver *ObjectStore) Download(ctx context.Context, fileName string, w io.Writer) (err error)
- func (receiver *ObjectStore) Save(ctx context.Context, r io.Reader, fileName string) (err error)
- func (receiver *ObjectStore) Type() string
- type Options
- type ProviderFactory
- type StoreType
Constants ¶
View Source
const ( FSStorage = "fs" S3Storage = "s3" )
Variables ¶
This section is empty.
Functions ¶
func GetProviderFactoryType ¶
func GetProviderFactoryType() []string
func RegisterProvider ¶
func RegisterProvider(factory ProviderFactory)
Types ¶
type BackupStore ¶
type DynamicOptions ¶
type DynamicOptions map[string]interface{}
func (DynamicOptions) MarshalJSON ¶
func (o DynamicOptions) MarshalJSON() ([]byte, error)
type FilesystemStore ¶
type FilesystemStore struct {
RootDir string `json:"rootDir,omitempty" yaml:"rootDir,omitempty"` // root directory for storing backup files
}
func (*FilesystemStore) Create ¶
func (fs *FilesystemStore) Create() (BackupStore, error)
func (*FilesystemStore) Delete ¶
func (fs *FilesystemStore) Delete(ctx context.Context, fileName string) (err error)
func (*FilesystemStore) Type ¶
func (fs *FilesystemStore) Type() string
type ObjectStore ¶
type ObjectStore struct { Bucket string `json:"bucket" yaml:"bucket"` Endpoint string `json:"endpoint" yaml:"endpoint"` AccessKeyID string `json:"accessKeyID" yaml:"accessKeyID"` AccessKeySecret string `json:"accessKeySecret" yaml:"accessKeySecret"` Region string `json:"region" yaml:"region"` SSL bool `json:"ssl" yaml:"ssl"` Client *minio.Client }
func (*ObjectStore) Create ¶
func (receiver *ObjectStore) Create() (BackupStore, error)
func (*ObjectStore) Delete ¶
func (receiver *ObjectStore) Delete(ctx context.Context, fileName string) (err error)
func (*ObjectStore) Type ¶
func (receiver *ObjectStore) Type() string
type Options ¶
type Options struct { Type string `json:"type" yaml:"type"` Provider DynamicOptions `json:"provider" yaml:"provider"` }
func NewOptions ¶
func NewOptions() *Options
type ProviderFactory ¶
type ProviderFactory interface { Type() string Create() (BackupStore, error) }
Click to show internal directories.
Click to hide internal directories.