file

package
v0.0.0-...-0d40728 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Provenance for file
	Provenance = "file"
)

Variables

This section is empty.

Functions

func NewMetadataStorage

func NewMetadataStorage(folder string) model.MetadataStorageCtor

NewMetadataStorage returns a constructor for a metadata storage.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage accesses the underlying datamart instance.

func (*Storage) AddGroupedVariable

func (s *Storage) AddGroupedVariable(dataset string, varName string, varDisplayName string, varType string, varRole []string, grouping model.BaseGrouping) error

AddGroupedVariable adds a variable grouping.

func (*Storage) AddVariable

func (s *Storage) AddVariable(dataset string, varName string, varDisplayName string, varType string, varRole []string) error

AddVariable is not supported by the datamart.

func (*Storage) CloneDataset

func (s *Storage) CloneDataset(dataset string, datasetNew string, storageNameNew string, folderNew string) error

CloneDataset is not supported (ES datasets are already ingested).

func (*Storage) DatasetExists

func (s *Storage) DatasetExists(dataset string) (bool, error)

DatasetExists returns true if a dataset exists.

func (*Storage) DeleteDataset

func (s *Storage) DeleteDataset(dataset string, softDelete bool) error

DeleteDataset deletes a dataset from the file system.

func (*Storage) DeleteVariable

func (s *Storage) DeleteVariable(dataset string, varName string) error

DeleteVariable is not supported by the datamart.

func (*Storage) DoesVariableExist

func (s *Storage) DoesVariableExist(dataset string, varName string) (bool, error)

DoesVariableExist returns whether or not a variable exists.

func (*Storage) FetchDataset

func (s *Storage) FetchDataset(datasetName string, includeIndex bool, includeMeta bool, includeSystemData bool) (*api.Dataset, error)

FetchDataset returns a dataset in the provided index.

func (*Storage) FetchDatasets

func (s *Storage) FetchDatasets(includeIndex bool, includeMeta bool, includeSystemData bool) ([]*api.Dataset, error)

FetchDatasets returns all datasets in the provided index.

func (*Storage) FetchVariable

func (s *Storage) FetchVariable(dataset string, varName string) (*model.Variable, error)

FetchVariable returns the variable for the provided index, dataset, and variable.

func (*Storage) FetchVariableDisplay

func (s *Storage) FetchVariableDisplay(dataset string, varName string) (*model.Variable, error)

FetchVariableDisplay returns the display variable for the provided index, dataset, and variable.

func (*Storage) FetchVariables

func (s *Storage) FetchVariables(dataset string, includeIndex bool, includeMeta bool, includeSystemData bool) ([]*model.Variable, error)

FetchVariables returns all the variables for the provided index and dataset.

func (*Storage) FetchVariablesByName

func (s *Storage) FetchVariablesByName(dataset string, variables []string, includeIndex bool, includeMeta bool, includeSystemData bool) ([]*model.Variable, error)

FetchVariablesByName returns all the variables for the provided dataset and names.

func (*Storage) FetchVariablesDisplay

func (s *Storage) FetchVariablesDisplay(dataset string) ([]*model.Variable, error)

FetchVariablesDisplay returns all the display variables for the provided index and dataset.

func (*Storage) ImportDataset

func (s *Storage) ImportDataset(id string, uri string) (string, error)

ImportDataset makes the dataset available for ingest and returns the URI to use for ingest.

func (*Storage) IngestDataset

func (s *Storage) IngestDataset(datasetSource metadata.DatasetSource, meta *model.Metadata) error

IngestDataset adds a document consisting of the metadata to the file system.

func (*Storage) RemoveGroupedVariable

func (s *Storage) RemoveGroupedVariable(datasetName string, grouping model.BaseGrouping) error

RemoveGroupedVariable removes a variable grouping.

func (*Storage) SearchDatasets

func (s *Storage) SearchDatasets(terms string, baseDataset *api.Dataset, includeIndex bool, includeMeta bool, includeSystemData bool) ([]*api.Dataset, error)

SearchDatasets returns the datasets that match the search criteria in the provided index.

func (*Storage) SetDataType

func (s *Storage) SetDataType(dataset string, varName string, varType string) error

SetDataType is not supported by the datamart.

func (*Storage) SetExtrema

func (s *Storage) SetExtrema(dataset string, varName string, extrema *api.Extrema) error

SetExtrema is not supported by the datamart.

func (*Storage) UpdateDataset

func (s *Storage) UpdateDataset(dataset *api.Dataset) error

UpdateDataset updates a document consisting of the metadata to the file system.

func (*Storage) UpdateVariable

func (s *Storage) UpdateVariable(dataset string, varName string, variableValue *model.Variable) error

UpdateVariable updates the values of a variable

Jump to

Keyboard shortcuts

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