storage

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ProjectEntityName is the storage entity name for project resources.
	ProjectEntityName = "Project"
	// ApiEntityName is the storage entity name for API resources.
	ApiEntityName = "Api"
	// VersionEntityName is the storage entity name for API version resources.
	VersionEntityName = "Version"
	// SpecEntityName is the storage entity name for API spec resources.
	SpecEntityName = "Spec"
	// SpecRevisionTagEntityName is the storage entity name for API spec revision tag resources.
	SpecRevisionTagEntityName = "SpecRevisionTag"
	// ArtifactEntityName is the storage entity name for artifact resources.
	ArtifactEntityName = "Artifact"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Close()

	Get(ctx context.Context, k Key, v interface{}) error
	Put(ctx context.Context, k Key, v interface{}) (Key, error)
	Delete(ctx context.Context, k Key) error
	Run(ctx context.Context, q Query) Iterator

	IsNotFound(err error) bool

	NewKey(kind, name string) Key
	NewQuery(query string) Query

	DeleteChildrenOfProject(ctx context.Context, project names.Project) error
	DeleteChildrenOfApi(ctx context.Context, api names.Api) error
	DeleteChildrenOfVersion(ctx context.Context, version names.Version) error
	DeleteAllMatches(ctx context.Context, q Query) error
	DeleteChildrenOfSpec(ctx context.Context, spec names.Spec) error

	GetRecentSpecRevisions(ctx context.Context, offset int32, projectID, apiID, versionID string) Iterator
}

type Iterator

type Iterator interface {
	Next(interface{}) (Key, error)
}

type Key

type Key interface {
	String() string
}

type Query

type Query interface {
	Require(name string, value interface{}) Query
	Descending(field string) Query
	ApplyOffset(int32) Query
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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