blob

package
v0.0.0-...-839106f Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: MIT Imports: 14 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 {
	ListDirRecursive(prefix string) (map[util.RelPathType]MetaEntry, error)
	GetMeta(name util.RelPathType) (*MetaEntry, error)
	Delete(name util.RelPathType) error
	Get(name util.RelPathType) (*FullEntry, error)
	// Reader will be closed by Put
	// If acls is not empty, these acls will be used to write
	// for the newly created / updated blob
	Put(name util.RelPathType, reader io.ReadCloser, acls []gcs.ACLRule) error
}

func NewBackend

func NewBackend(baseURL url.URL, _ string) Backend

type FullEntry

type FullEntry struct {
	*MetaEntry
	// Who ever holds this should close the reader
	Content io.ReadCloser
}

type GcpBackend

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

func (*GcpBackend) Delete

func (g *GcpBackend) Delete(name util.RelPathType) error

func (*GcpBackend) Get

func (g *GcpBackend) Get(name util.RelPathType) (*FullEntry, error)

func (*GcpBackend) GetMeta

func (g *GcpBackend) GetMeta(name util.RelPathType) (*MetaEntry, error)

func (GcpBackend) Init

func (g GcpBackend) Init(bucket string, basePrefix string) *GcpBackend

func (*GcpBackend) ListDirRecursive

func (g *GcpBackend) ListDirRecursive(prefix string) (map[util.RelPathType]MetaEntry, error)

func (*GcpBackend) Put

func (g *GcpBackend) Put(name util.RelPathType, reader io.ReadCloser, acls []gcs.ACLRule) error

type MetaEntry

type MetaEntry struct {
	BasePath           string
	RelPath            util.RelPathType
	Md5                string // hex string of md5
	ModTime            time.Time
	BlobWriterClientId *string
	ACLs               []gcs.ACLRule
}

Jump to

Keyboard shortcuts

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