multiparts

package
v0.70.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 21 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")
	ErrInvalidMetadataSrcFormat = errors.New("invalid metadata source format")
)
View Source
var File_multipart_proto protoreflect.FileDescriptor

Functions

func Migrate added in v0.66.0

func Migrate(ctx context.Context, d *pgxpool.Pool, writer io.Writer) error

Types

type Metadata added in v0.53.0

type Metadata map[string]string

func (Metadata) Get added in v0.53.0

func (m Metadata) Get(k string) string

func (*Metadata) Scan added in v0.53.0

func (m *Metadata) Scan(src interface{}) error

func (Metadata) Set added in v0.53.0

func (m Metadata) Set(k, v string)

func (Metadata) Value added in v0.53.0

func (m Metadata) Value() (driver.Value, error)

type MultipartUpload

type MultipartUpload 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 MultipartUploadData added in v0.65.0

type MultipartUploadData 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 multiparts.MultipartUpload struct

func (*MultipartUploadData) Descriptor deprecated added in v0.65.0

func (*MultipartUploadData) Descriptor() ([]byte, []int)

Deprecated: Use MultipartUploadData.ProtoReflect.Descriptor instead.

func (*MultipartUploadData) GetContentType added in v0.65.0

func (x *MultipartUploadData) GetContentType() string

func (*MultipartUploadData) GetCreationDate added in v0.65.0

func (x *MultipartUploadData) GetCreationDate() *timestamppb.Timestamp

func (*MultipartUploadData) GetMetadata added in v0.65.0

func (x *MultipartUploadData) GetMetadata() map[string]string

func (*MultipartUploadData) GetPath added in v0.65.0

func (x *MultipartUploadData) GetPath() string

func (*MultipartUploadData) GetPhysicalAddress added in v0.65.0

func (x *MultipartUploadData) GetPhysicalAddress() string

func (*MultipartUploadData) GetUploadId added in v0.65.0

func (x *MultipartUploadData) GetUploadId() string

func (*MultipartUploadData) ProtoMessage added in v0.65.0

func (*MultipartUploadData) ProtoMessage()

func (*MultipartUploadData) ProtoReflect added in v0.65.0

func (x *MultipartUploadData) ProtoReflect() protoreflect.Message

func (*MultipartUploadData) Reset added in v0.65.0

func (x *MultipartUploadData) Reset()

func (*MultipartUploadData) String added in v0.65.0

func (x *MultipartUploadData) String() string

type Tracker

type Tracker interface {
	Create(ctx context.Context, multipart MultipartUpload) error
	Get(ctx context.Context, uploadID string) (*MultipartUpload, error)
	Delete(ctx context.Context, uploadID string) error
}

func NewDBTracker added in v0.65.0

func NewDBTracker(adb db.Database) Tracker

func NewTracker

func NewTracker(ms kv.StoreMessage) Tracker

Jump to

Keyboard shortcuts

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