multipart

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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 Metadata

type Metadata map[string]string

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

func NewTracker(store kv.Store) Tracker

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      `` /* 157-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

Jump to

Keyboard shortcuts

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