storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ctx context.Context, cfg config.Storage, s *Storer) error

Types

type Storer

type Storer interface {
	// Read reads records for the given module from the database.
	Read(context.Context, string) ([]model.Data, error)
	// Write writes the data to the database.
	Write(context.Context, model.Data) error
	// View returns the data for the given module in the format that is suitable for the web view.
	View(context.Context, string) (map[string]map[string]string, error)
}

Storer is an interface that describes the methods that a storage backend must implement.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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