repository

package
v0.0.0-...-7450142 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileRepository

func NewFileRepository(path string) (*fileRepository, error)

NewFileRepository creates a new file repository under the given path.

func NewInMemoryRepository

func NewInMemoryRepository() *inMemoryRepository

NewInMemoryRepository creates a new in-memory repository.

Types

type Repository

type Repository interface {
	// AddModule adds the given module.
	AddModule(module *spec.Module) error
	// DeleteNamespace deletes a whole module namespace with all modules.
	DeleteNamespace(namespace string) error
	// DeleteModule deletes a specific module.
	DeleteModule(namespace string, name string) error
	// DeleteModuleType deletes a specific module type.
	DeleteModuleType(namespace string, name string, type_ string) error
	// DeleteModuleVersion deletes a specific module version.
	DeleteModuleVersion(namespace string, name string, type_ string, version string) error
	// GetModule gets a specific module.
	GetModule(namespace string, name string, type_ string, version string) (*spec.Module, error)
	// ListModuleNamespaces list all module namespaces.
	ListModuleNamespaces() ([]string, error)
	// ListModuleNames list all module names within a namespace.
	ListModuleNames(namespace string) ([]string, error)
	// ListModuleTypes list all module types of a module.
	ListModuleTypes(namespace string, name string) ([]string, error)
	// ListModuleVersions list all module versions of a module.
	ListModuleVersions(namespace string, name string, type_ string) ([]string, error)
}

Repository provides access to modules stored in a backend.

Jump to

Keyboard shortcuts

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