provider

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobStatusWaiting = iota
	JobStatusQueued
	JobStatusSkipped
	JobStatusFailed
	JobStatusDone
)
View Source
const (
	EmptyPath = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler added in v1.5.0

type Handler struct {
	Stats *Stats
	// contains filtered or unexported fields
}

func NewHandler added in v1.5.0

func NewHandler(app *conf.AppConfig, operFn OperGenFunc, objFn ObjectGenFunc) (*Handler, error)

func (*Handler) Init added in v1.5.0

func (h *Handler) Init() error

type Job added in v1.5.0

type Job struct {
	App *conf.AppConfig

	Object     Object
	Metadata   *objectify.FileObj
	Key        string
	SearchRoot string

	AppTags map[string]string
	// contains filtered or unexported fields
}

type Object

type Object interface {
	Destroy() error
	Generate() error
	Post() error
	Pre() error
}

type ObjectGenFunc added in v1.5.0

type ObjectGenFunc func(job *Job) Object

type ObjectKey added in v1.5.0

type ObjectKey struct {
	// contains filtered or unexported fields
}

func (*ObjectKey) String added in v1.5.0

func (k *ObjectKey) String(method conf.Naming, omit bool) string

type OperGenFunc added in v1.5.0

type OperGenFunc func(app *conf.AppConfig) (oper Operator, err error)

type Operator

type Operator interface {
	BucketCreate() error
	BucketExists() (bool, error)
	BucketDelete() error

	ObjectDelete(key string) error
	ObjectExists(obj Object) (bool, error)
	ObjectUpload(obj Object) error
	GetObjectTags(key string) (map[string]string, error)

	Support() *Supports
}

type Stats added in v1.5.0

type Stats struct {
	Objects      int
	ObjectsBytes int64
	Failed       int
	Skipped      int
	SkippedBytes int64
}

func (*Stats) IncFailed added in v1.5.0

func (s *Stats) IncFailed(n int, b int64)

func (*Stats) IncObjects added in v1.5.0

func (s *Stats) IncObjects(n int, b int64)

func (*Stats) IncSkipped added in v1.5.0

func (s *Stats) IncSkipped(n int, b int64)

func (*Stats) Merge added in v1.5.0

func (s *Stats) Merge(other *Stats)

func (*Stats) ReadableString added in v1.5.0

func (s *Stats) ReadableString() map[int64]string

func (*Stats) String added in v1.5.0

func (s *Stats) String() string

type Supports added in v1.5.0

type Supports struct {
	BucketCreate  bool
	BucketDelete  bool
	ObjectDelete  bool
	GetObjectTags bool
}

func NewSupports added in v1.5.0

func NewSupports(bucketCreate, bucketDelete, objectDelete, getObjectTags bool) *Supports

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL