storage

package
v0.0.0-...-8f55651 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

type FS struct {
	Storage
	// contains filtered or unexported fields
}

func (*FS) Config

func (s *FS) Config() map[string]string

func (*FS) Del

func (s *FS) Del(name string) error

func (*FS) Find

func (s *FS) Find(filters ...string) ([][]byte, error)

func (*FS) Get

func (s *FS) Get(name string) ([]byte, []byte, error)

func (FS) ID

func (s FS) ID() string

func (*FS) Put

func (s *FS) Put(name string, crtData, keyData []byte) error

func (*FS) Tune

func (s *FS) Tune(options map[string]interface{}) error

type S3

type S3 struct {
	Storage
	// contains filtered or unexported fields
}

func (*S3) Config

func (s *S3) Config() map[string]string

func (*S3) Del

func (s *S3) Del(name string) error

func (*S3) Find

func (s *S3) Find(filters ...string) ([][]byte, error)

func (*S3) Get

func (s *S3) Get(name string) ([]byte, []byte, error)

func (S3) ID

func (s S3) ID() string

func (*S3) Put

func (s *S3) Put(name string, crtData, keyData []byte) error

func (*S3) Tune

func (s *S3) Tune(options map[string]interface{}) error

type Storage

type Storage interface {
	ID() string
	Tune(options map[string]interface{}) error
	Put(name string, crtData, keyData []byte) error
	Get(name string) ([]byte, []byte, error)
	Del(name string) error
	Find(filters ...string) ([][]byte, error)
	Config() map[string]string
}

func Get

func Get(id string, options map[string]interface{}) (*Storage, error)

Jump to

Keyboard shortcuts

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