Documentation ¶
Index ¶
- type Folder
- type ObjectToMinIOAdapter
- type TaskMinIO
- func (a *TaskMinIO) FirstInFile() (*common.S3Address, error)
- func (a *TaskMinIO) FirstObject(path ...Folder) (*common.S3Address, error)
- func (a *TaskMinIO) FirstOutFile() (*common.S3Address, error)
- func (a *TaskMinIO) FirstResultFile() (*common.S3Address, error)
- func (a *TaskMinIO) FirstTmpFile() (*common.S3Address, error)
- func (a *TaskMinIO) GetBucket() string
- func (a *TaskMinIO) GetInFile(file string, base bool) string
- func (a *TaskMinIO) GetInFileAddress(file string, base bool) *common.S3Address
- func (a *TaskMinIO) GetInPath() string
- func (a *TaskMinIO) GetInPathAddress() *common.S3Address
- func (a *TaskMinIO) GetInPrefix() string
- func (a *TaskMinIO) GetObjectAddress(object string, base bool, path ...Folder) *common.S3Address
- func (a *TaskMinIO) GetObjectPath(object string, base bool, path ...Folder) string
- func (a *TaskMinIO) GetOutFile(file string, base bool) string
- func (a *TaskMinIO) GetOutFileAddress(file string, base bool) *common.S3Address
- func (a *TaskMinIO) GetOutPath() string
- func (a *TaskMinIO) GetOutPathAddress() *common.S3Address
- func (a *TaskMinIO) GetOutPrefix() string
- func (a *TaskMinIO) GetPath(path ...Folder) string
- func (a *TaskMinIO) GetPathAddress(path ...Folder) *common.S3Address
- func (a *TaskMinIO) GetPrefix(path ...Folder) string
- func (a *TaskMinIO) GetResultFile(file string, base bool) string
- func (a *TaskMinIO) GetResultFileAddress(file string, base bool) *common.S3Address
- func (a *TaskMinIO) GetResultPath() string
- func (a *TaskMinIO) GetResultPathAddress() *common.S3Address
- func (a *TaskMinIO) GetResultPrefix() string
- func (a *TaskMinIO) GetTaskPath() string
- func (a *TaskMinIO) GetTmpFile(file string, base bool) string
- func (a *TaskMinIO) GetTmpFileAddress(file string, base bool) *common.S3Address
- func (a *TaskMinIO) GetTmpPath() string
- func (a *TaskMinIO) GetTmpPathAddress() *common.S3Address
- func (a *TaskMinIO) GetTmpPrefix() string
- func (a *TaskMinIO) WalkInFiles(f func(int, *minio.MinIO, *minioGo.ObjectInfo, *common.S3Address) bool) error
- func (a *TaskMinIO) WalkObjects(f func(int, *minio.MinIO, *minioGo.ObjectInfo, *common.S3Address) bool, ...) error
- func (a *TaskMinIO) WalkOutFiles(f func(int, *minio.MinIO, *minioGo.ObjectInfo, *common.S3Address) bool) error
- func (a *TaskMinIO) WalkResultFiles(f func(int, *minio.MinIO, *minioGo.ObjectInfo, *common.S3Address) bool) error
- func (a *TaskMinIO) WalkTmpFiles(f func(int, *minio.MinIO, *minioGo.ObjectInfo, *common.S3Address) bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Folder ¶
type Folder string
Folder specifies folders of the adapter. Base functions operate with any folder, thus custom folders can be used as well
type ObjectToMinIOAdapter ¶
type ObjectToMinIOAdapter interface { // GetBucket returns bucket within the storage GetBucket() string // GetPath returns specified task-related path within the storage. // Path does not end with / and thus can't be used as prefix for uploading objects. GetPath(path ...Folder) string // GetPrefix returns specified task-related prefix within storage. // Prefix ends with / and thus can be used as prefix for uploading objects. GetPrefix(path ...Folder) string // GetObjectPath returns specified task-related full path to an object (file) within the storage. // Filename is included into the result. Can be used to upload/download an object by its full path. // In case `base` specified, object is trimmed to base - maning filename used w/o prefix. GetObjectPath(object string, base bool, path ...Folder) string // GetObjectAddress the same idea as GetObjectPath, but returns ready-to-use S3Address GetObjectAddress(object string, base bool, path ...Folder) *common.S3Address // FirstObject returns specified task-related full path to the first object (file) (filename included) within storage. // Can be used to upload/download the object by full path. // Is the same as GetObjectPath with the difference that it makes GetObjectPath() of the first object in the path FirstObject(path ...Folder) (*common.S3Address, error) // WalkObjects walks files with function. WalkObjects(f func(int, *minio.MinIO, *minio_go.ObjectInfo, *common.S3Address) bool, path ...Folder) error }
ObjectToMinIOAdapter is an interface of an entity which can adapt an object to MinIO storage
type TaskMinIO ¶
type TaskMinIO struct { Config sections.MinIOConfigurator Task *common.Task }
TaskMinIO specifies task to MinIO adapter
func NewTaskMinIOAdapter ¶
func NewTaskMinIOAdapter(config sections.MinIOConfigurator, task *common.Task) *TaskMinIO
NewTaskMinIOAdapter creates new Task to MinIO adapter
func (*TaskMinIO) FirstInFile ¶
FirstInFile gets first `in` file S3Address
func (*TaskMinIO) FirstObject ¶
FirstObject is an ObjectToMinIOAdapter interface function
func (*TaskMinIO) FirstOutFile ¶
FirstOutFile gets first `out` file S3Address
func (*TaskMinIO) FirstResultFile ¶
FirstResultFile gets first `result` file S3Address
func (*TaskMinIO) FirstTmpFile ¶
FirstTmpFile gets first `tmp` file S3Address
func (*TaskMinIO) GetInFileAddress ¶
GetInFileAddress gets `in` file S3Address
func (*TaskMinIO) GetInPathAddress ¶
GetInPathAddress gets `in` path as S3Address
func (*TaskMinIO) GetInPrefix ¶
GetInPrefix gets `in` prefix
func (*TaskMinIO) GetObjectAddress ¶
GetObjectAddress is an ObjectToMinIOAdapter interface function
func (*TaskMinIO) GetObjectPath ¶
GetObjectPath is an ObjectToMinIOAdapter interface function
func (*TaskMinIO) GetOutFile ¶
GetOutFile gets `out` full file path
func (*TaskMinIO) GetOutFileAddress ¶
GetOutFileAddress gets `out` file S3Address
func (*TaskMinIO) GetOutPathAddress ¶
GetOutPathAddress gets `out` path as S3Address
func (*TaskMinIO) GetOutPrefix ¶
GetOutPrefix gets `out` prefix
func (*TaskMinIO) GetPathAddress ¶
GetPathAddress is a wrapper over GetPath to get Path as an S3Address
func (*TaskMinIO) GetResultFile ¶
GetResultFile gets `result` file path
func (*TaskMinIO) GetResultFileAddress ¶
GetResultFileAddress gets `result` file S3Address
func (*TaskMinIO) GetResultPath ¶
GetResultPath gets `result` path
func (*TaskMinIO) GetResultPathAddress ¶
GetResultPathAddress gets `result` path as S3Address
func (*TaskMinIO) GetResultPrefix ¶
GetResultPrefix gets `result` prefix
func (*TaskMinIO) GetTaskPath ¶
GetTaskPath gets path of the whole task
func (*TaskMinIO) GetTmpFile ¶
GetTmpFile gets `tmp` file path
func (*TaskMinIO) GetTmpFileAddress ¶
GetTmpFileAddress gets `tmp` files S3Address
func (*TaskMinIO) GetTmpPathAddress ¶
GetTmpPathAddress gets `tmp` path as S3Address
func (*TaskMinIO) GetTmpPrefix ¶
GetTmpPrefix gets `tmp` prefix
func (*TaskMinIO) WalkInFiles ¶
func (a *TaskMinIO) WalkInFiles(f func(int, *minio.MinIO, *minioGo.ObjectInfo, *common.S3Address) bool) error
WalkInFiles walks `in` files
func (*TaskMinIO) WalkObjects ¶
func (a *TaskMinIO) WalkObjects(f func(int, *minio.MinIO, *minioGo.ObjectInfo, *common.S3Address) bool, path ...Folder) error
WalkObjects is an ObjectToMinIOAdapter interface function
func (*TaskMinIO) WalkOutFiles ¶
func (a *TaskMinIO) WalkOutFiles(f func(int, *minio.MinIO, *minioGo.ObjectInfo, *common.S3Address) bool) error
WalkOutFiles walks `out` files