Documentation
¶
Index ¶
- type BucketSource
- type Controller
- func (c *Controller) Close() error
- func (c *Controller) Get(ctx context.Context, bucket, key string) ([]byte, error)
- func (c *Controller) SaveDir(ctx context.Context, dir, bucketName string) error
- func (c *Controller) SyncJob(ctx context.Context) error
- func (c *Controller) SyncSource(ctx context.Context, s BucketSource) error
- type DirSource
- type GitSource
- type OptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketSource ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(db *storage.KVStore, bucketSources map[string]config.Bucket, options ...OptionFunc) (*Controller, error)
func (*Controller) Close ¶
func (c *Controller) Close() error
func (*Controller) SaveDir ¶
func (c *Controller) SaveDir(ctx context.Context, dir, bucketName string) error
func (*Controller) SyncSource ¶
func (c *Controller) SyncSource(ctx context.Context, s BucketSource) error
type GitSource ¶
type GitSource struct {
BucketName string
LocalDir string
GitRepo string
GitRelativePath string
GitUsername string
GitPasswordEnv string
// contains filtered or unexported fields
}
func (*GitSource) WithLogger ¶
type OptionFunc ¶
type OptionFunc func(c *Controller)
func WithLogger ¶
func WithLogger(l *zap.Logger) OptionFunc
Click to show internal directories.
Click to hide internal directories.