storage

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	Path string
}

Store manages storage of items

func New

func New(path string) *Store

New Store saving thing in a path

func (*Store) Assets

func (s *Store) Assets(context, resourceType string) ([]string, error)

Assets in a particular context and resourceType

func (*Store) Load

func (s *Store) Load(context, resourceType, asset, snapshot string) ([]byte, error)

Load item in a particular snapshot

func (*Store) RemoveSnapshot

func (s *Store) RemoveSnapshot(context, resourceType, asset, snapshot string) error

Remove a snapshot

func (*Store) RenameSnapshot

func (s *Store) RenameSnapshot(context, resourceType, asset, oldSnapshot, newSnapshot string) error

Rename a snapshot

func (*Store) Save

func (s *Store) Save(context, resourceType, asset string, r io.Reader) (string, error)

Save creating a new Snapshot

func (*Store) SaveSnapshot

func (s *Store) SaveSnapshot(context, resourceType, asset, snapshot string, r io.Reader) error

Save a snapshot

func (*Store) Serve

func (s *Store) Serve() http.Handler

func (*Store) Snapshots

func (s *Store) Snapshots(context, resourceType, asset string) ([]string, error)

Snapshots of a particular asset

Jump to

Keyboard shortcuts

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