database

package
v0.0.0-...-280633d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidID is returned when the given string is ID.
	ErrInvalidID = errors.New("invalid id")

	// ErrNotFound is returned when the requested resource cannot be found.
	ErrNotFound = errors.New("resource not found")
)

Functions

This section is empty.

Types

type Database

type Database interface {
	Dial(ctx context.Context) error
	Close(ctx context.Context) error

	CreateProject(ctx context.Context, name string) (*types.ProjectInfo, error)
	FindProject(ctx context.Context, id types.ID) (*types.ProjectInfo, error)
	ListProjects(ctx context.Context) ([]*types.ProjectInfo, error)
	UpdateProject(ctx context.Context, id types.ID, name string) error
	DeleteProject(ctx context.Context, id types.ID) error

	CreateTemplate(ctx context.Context, name, contents string) (*types.TemplateInfo, error)
	FindTemplate(ctx context.Context, id types.ID) (*types.TemplateInfo, error)
}

Database represents database which reads or saves Metis data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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