Documentation ¶
Index ¶
- Variables
- func Deliver(ctx context.Context, path string, s Source, d Destination) (string, error)
- func RegisterAllSourcesAndDestinations(ctx context.Context, appConfig appconfig.AppConfig) (err error)
- func RegisterDestination(name string, d Destination)
- func RegisterSource(name string, s Source)
- type AzureDestination
- type AzureSource
- type Destination
- type FileDestination
- type FileSource
- type PathInfo
- type S3Destination
- type S3Source
- type Source
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadTarget = fmt.Errorf("bad delivery target")
View Source
var ErrSrcFileNotExist = fmt.Errorf("source file does not exist")
Functions ¶
func RegisterAllSourcesAndDestinations ¶
func RegisterAllSourcesAndDestinations(ctx context.Context, appConfig appconfig.AppConfig) (err error)
Eventually, this can take a more generic list of deliverer configuration object
func RegisterDestination ¶
func RegisterDestination(name string, d Destination)
func RegisterSource ¶
Types ¶
type AzureDestination ¶
func NewAzureDestination ¶
func NewAzureDestination(ctx context.Context, target string) (*AzureDestination, error)
func (*AzureDestination) Health ¶
func (ad *AzureDestination) Health(ctx context.Context) (rsp models.ServiceHealthResp)
type AzureSource ¶
func (*AzureSource) GetMetadata ¶
type Destination ¶
type Destination interface {
Upload(context.Context, string, io.Reader, map[string]string) (string, error)
}
func GetDestination ¶
func GetDestination(name string) (Destination, bool)
type FileDestination ¶
type FileDestination struct { appconfig.LocalStorageConfig Target string }
func NewFileDestination ¶
func (*FileDestination) Health ¶
func (fd *FileDestination) Health(_ context.Context) (rsp models.ServiceHealthResp)
type FileSource ¶
func (*FileSource) GetMetadata ¶
type S3Destination ¶
func NewS3Destination ¶
func NewS3Destination(ctx context.Context, target string, conn *appconfig.S3StorageConfig) (*S3Destination, error)
func (*S3Destination) Health ¶
func (sd *S3Destination) Health(ctx context.Context) (rsp models.ServiceHealthResp)
type S3Source ¶
func (*S3Source) GetMetadata ¶
Click to show internal directories.
Click to hide internal directories.