storage

package
v0.9.0-rc.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

type Bucket interface {
	// Object - Get an object reference for in this bucket
	File(key string) File
}

type File

type File interface {
	// Read - Read this object
	Read() ([]byte, error)
	// Write - Write this object
	Write([]byte) error
	// Delete - Delete this object
	Delete() error
	// SignUrl - Creates a signed Url for this file reference
	SignUrl(PresignUrlOptions) (string, error)
}

File - A file reference for a bucket

type Mode added in v0.8.0

type Mode int
const (
	ModeRead Mode = iota
	ModeWrite
)

type PresignUrlOptions added in v0.8.0

type PresignUrlOptions struct {
	Mode   Mode
	Expiry int
}

type Storage

type Storage interface {
	// Bucket - Get a bucket reference for the provided name
	Bucket(name string) Bucket
}

Storage - Nitric storage API client

func New

func New() (Storage, error)

New - Create a new Storage client with default options

Jump to

Keyboard shortcuts

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