Documentation
¶
Index ¶
- Variables
- type Metadata
- type Tracker
- type Upload
- type UploadData
- func (*UploadData) Descriptor() ([]byte, []int)deprecated
- func (x *UploadData) GetContentType() string
- func (x *UploadData) GetCreationDate() *timestamppb.Timestamp
- func (x *UploadData) GetMetadata() map[string]string
- func (x *UploadData) GetPath() string
- func (x *UploadData) GetPhysicalAddress() string
- func (x *UploadData) GetUploadId() string
- func (*UploadData) ProtoMessage()
- func (x *UploadData) ProtoReflect() protoreflect.Message
- func (x *UploadData) Reset()
- func (x *UploadData) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMultipartUploadNotFound = errors.New("multipart upload not found") ErrInvalidUploadID = errors.New("invalid upload id") )
View Source
var File_gateway_multipart_multipart_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Tracker ¶
type Tracker interface {
Create(ctx context.Context, multipart Upload) error
Get(ctx context.Context, uploadID string) (*Upload, error)
Delete(ctx context.Context, uploadID string) error
}
func NewTracker ¶
type Upload ¶
type Upload struct {
// UploadID A unique identifier for the uploaded part
UploadID string `db:"upload_id"`
// Path Multipart path in repository
Path string `db:"path"`
// CreationDate Creation date of the part
CreationDate time.Time `db:"creation_date"`
// PhysicalAddress Physical address of the part in the storage
PhysicalAddress string `db:"physical_address"`
// Metadata Additional metadata as required (by storage vendor etc.)
Metadata Metadata `db:"metadata"`
// ContentType Original file's content-type
ContentType string `db:"content_type"`
}
type UploadData ¶
type UploadData struct {
UploadId string `protobuf:"bytes,1,opt,name=upload_id,json=uploadId,proto3" json:"upload_id,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
CreationDate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=creation_date,json=creationDate,proto3" json:"creation_date,omitempty"`
PhysicalAddress string `protobuf:"bytes,4,opt,name=physical_address,json=physicalAddress,proto3" json:"physical_address,omitempty"`
Metadata map[string]string `` /* 143-byte string literal not displayed */
ContentType string `protobuf:"bytes,6,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
// contains filtered or unexported fields
}
message data model for multipart.Upload struct
func (*UploadData) Descriptor
deprecated
func (*UploadData) Descriptor() ([]byte, []int)
Deprecated: Use UploadData.ProtoReflect.Descriptor instead.
func (*UploadData) GetContentType ¶
func (x *UploadData) GetContentType() string
func (*UploadData) GetCreationDate ¶
func (x *UploadData) GetCreationDate() *timestamppb.Timestamp
func (*UploadData) GetMetadata ¶
func (x *UploadData) GetMetadata() map[string]string
func (*UploadData) GetPath ¶
func (x *UploadData) GetPath() string
func (*UploadData) GetPhysicalAddress ¶
func (x *UploadData) GetPhysicalAddress() string
func (*UploadData) GetUploadId ¶
func (x *UploadData) GetUploadId() string
func (*UploadData) ProtoMessage ¶
func (*UploadData) ProtoMessage()
func (*UploadData) ProtoReflect ¶
func (x *UploadData) ProtoReflect() protoreflect.Message
func (*UploadData) Reset ¶
func (x *UploadData) Reset()
func (*UploadData) String ¶
func (x *UploadData) String() string
Click to show internal directories.
Click to hide internal directories.