store

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TypeS3     = "s3"
	TypeFile   = "file"
	TypeMemory = "memory"
)

Variables

View Source
var (
	ErrPackageNotFound = fmt.Errorf("package not found")
)

Functions

func ObjectKey

func ObjectKey(id *ccpackage.PackageID) string

func ParseObjectKey

func ParseObjectKey(s string) (
	name string,
	version string,
	fabricVersion ccpackage.FabricVersion,
	ok bool,
)

Types

type Storage

type Storage interface {
	// Put saves chaincode package into storage.
	Put(context.Context, *ccpackage.PutPackageRequest) error
	// Get gets chaincode package info from storage.
	Get(context.Context, *ccpackage.PackageID) (*ccpackage.Package, error)
	// List gets stored chaincode packages' infos.
	List(context.Context) ([]*ccpackage.Package, error)
	// Fetch fetches chaincode package.
	Fetch(context.Context, *ccpackage.PackageID) (io.ReadCloser, error)
	// Close closes storage
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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