backend

package
v0.0.0-...-cfcd82a Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// TODO: Hopefully, we can pass `Layer` struct in, thus to be able to cook both
	// file handle and file path.
	Upload(blobID string, blobPath string) error
	Check(blobID string) (bool, error)
}

func NewBackend

func NewBackend(backendType, backendConfig string) (Backend, error)

type OSSBackend

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

func (*OSSBackend) Check

func (b *OSSBackend) Check(blobID string) (bool, error)

func (*OSSBackend) Upload

func (b *OSSBackend) Upload(blobID string, blobPath string) error

Upload blob as image layer to oss backend. Depending on blob's size, upload it by multiparts method or the normal method

Jump to

Keyboard shortcuts

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