catalog

package
v0.0.0-...-8b3bc45 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(path string, fn func(db *sql.DB) error) error

Extract is a convenience for testing. It opens a given catalog database, ensures it built without errors, invokes the provided callback, and then closes the database.

func LoadAllCaptures

func LoadAllCaptures(db *sql.DB) ([]*pf.CaptureSpec, error)

LoadAllCaptures loads all captures.

func LoadAllCollections

func LoadAllCollections(db *sql.DB) ([]*pf.CollectionSpec, error)

LoadAllCollections loads all collections.

func LoadAllDerivations

func LoadAllDerivations(db *sql.DB) ([]*pf.DerivationSpec, error)

LoadAllDerivations loads all derivations.

func LoadAllMaterializations

func LoadAllMaterializations(db *sql.DB) ([]*pf.MaterializationSpec, error)

LoadAllMaterializations loads all materializations.

func LoadAllTests

func LoadAllTests(db *sql.DB) ([]*pf.TestSpec, error)

LoadAllTests loads all tests.

func LoadBuildConfig

func LoadBuildConfig(db *sql.DB) (pf.BuildAPI_Config, error)

LoadBuildConfig loads the Config under which this catalog was built.

func LoadCapture

func LoadCapture(db *sql.DB, name string) (*pf.CaptureSpec, error)

LoadCapture by its name.

func LoadCollection

func LoadCollection(db *sql.DB, name string) (*pf.CollectionSpec, error)

LoadCollection by its name.

func LoadDerivation

func LoadDerivation(db *sql.DB, name string) (*pf.DerivationSpec, error)

LoadDerivation by its name.

func LoadMaterialization

func LoadMaterialization(db *sql.DB, name string) (*pf.MaterializationSpec, error)

LoadMaterialization by its name.

func LoadNPMPackage

func LoadNPMPackage(db *sql.DB) ([]byte, error)

LoadNPMPackage loads the NPM package of the catalog.

func LoadSchemaBundle

func LoadSchemaBundle(db *sql.DB) (pf.SchemaBundle, error)

LoadSchemaBundle loads the bundle of schema documents.

Types

type Error

type Error struct {
	// Scope is the resource URL and JSON fragment pointer at which the error occurred.
	Scope string
	// Error is a user-facing description of the build error.
	Error string
}

Error is a recorded error encountered during the catalog build.

func LoadAllErrors

func LoadAllErrors(db *sql.DB) ([]Error, error)

LoadAllErrors loads all errors.

type SchemaLocation

type SchemaLocation struct {
	// URL of the schema which is inferred, inclusive of any fragment pointer.
	Schema string
	// A location within a document verified by this schema,
	// relative to the schema root.
	Location string
	// Inference at this schema location.
	Spec pf.Inference
}

SchemaLocation is static inference of a location within a schema document.

func LoadAllInferences

func LoadAllInferences(db *sql.DB) ([]SchemaLocation, error)

LoadAllInferences loads all inferences.

Jump to

Keyboard shortcuts

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