storage

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	// NewObject returns the details for object creation.
	NewObject(obj *object.Object) (*object.Object, error)
	// GetObject returns the details of one object.
	GetObject(obj *object.Object) (*object.Object, error)
	// ListObjects returns the details of all objects.
	ListObjects() ([]*object.Object, error)
	// ExistsObject implements object.KeyAvailabilityChecker.
	ExistsObject(obj *object.Object) (bool, error)
	// DeleteObject deletes an object.
	DeleteObject(obj *object.Object) error
	// Settings returns the provider-agnostic storage settings.
	Settings() *Settings
}

Provider defines the contract any storage provider must comply with.

type Settings

type Settings struct {
	// TTL is the time-to-live of objects in storage.
	TTL *time.Duration
}

Settings holds the provider-agnostic storage settings.

func (*Settings) Defaults added in v0.0.12

func (settings *Settings) Defaults()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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