Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeleteObjectInput ¶
type DeleteObjectInput struct { // BucketName is bucket name. BucketName string // ObjectKey is object key. ObjectKey string }
DeleteObjectInput is used to construct request of deleting object.
func (*DeleteObjectInput) Validate ¶
func (i *DeleteObjectInput) Validate() error
Validate validates DeleteObjectInput fields.
type Dfstore ¶
type Dfstore interface { // GetObjectRequestWithContext returns *http.Request of getting object. GetObjectRequestWithContext(ctx context.Context, input *GetObjectInput) (*http.Request, error) // GetObject returns data of object. GetObject(ctx context.Context, input *GetObjectInput) (io.ReadCloser, error) // PutObjectRequestWithContext returns *http.Request of putting object. PutObjectRequestWithContext(ctx context.Context, input *PutOjectInput) (*http.Request, error) // PutObject puts data of object. PutObject(ctx context.Context, input *PutOjectInput) error // DeleteObjectRequestWithContext returns *http.Request of deleting object. DeleteObjectRequestWithContext(ctx context.Context, input *DeleteObjectInput) (*http.Request, error) // DeleteObject deletes data of object. DeleteObject(ctx context.Context, input *DeleteObjectInput) error // IsObjectExistRequestWithContext returns *http.Request of heading object. IsObjectExistRequestWithContext(ctx context.Context, input *IsObjectExistInput) (*http.Request, error) // IsObjectExist returns whether the object exists. IsObjectExist(ctx context.Context, input *IsObjectExistInput) (bool, error) }
Dfstore is the interface used for object storage.
type GetObjectInput ¶
type GetObjectInput struct { // BucketName is bucket name. BucketName string // ObjectKey is object key. ObjectKey string // Filter is used to generate a unique Task ID by // filtering unnecessary query params in the URL, // it is separated by & character. Filter string // Range is the HTTP range header. Range string }
GetObjectInput is used to construct request of getting object.
func (*GetObjectInput) Validate ¶
func (i *GetObjectInput) Validate() error
Validate validates GetObjectInput fields.
type IsObjectExistInput ¶
type IsObjectExistInput struct { // BucketName is bucket name. BucketName string // ObjectKey is object key. ObjectKey string }
IsObjectExistInput is used to construct request of heading object.
func (*IsObjectExistInput) Validate ¶
func (i *IsObjectExistInput) Validate() error
Validate validates IsObjectExistInput fields.
type Option ¶
type Option func(ds *dfstore)
Option is a functional option for configuring the dfstore.
func WithHTTPClient ¶
WithHTTPClient set http client for dfstore.
type PutOjectInput ¶
type PutOjectInput struct { // BucketName is bucket name. BucketName string // ObjectKey is object key. ObjectKey string // Filter is used to generate a unique Task ID by // filtering unnecessary query params in the URL, // it is separated by & character. Filter string // Mode is the mode in which the backend is written, // including WriteBack and AsyncWriteBack. Mode int // MaxReplicas is the maximum number of // replicas of an object cache in seed peers. MaxReplicas int // Reader is reader of object. Reader io.Reader }
PutOjectInput is used to construct request of putting object.
func (*PutOjectInput) Validate ¶
func (i *PutOjectInput) Validate() error
Validate validates PutOjectInput fields.
Click to show internal directories.
Click to hide internal directories.