Documentation ¶
Index ¶
- Constants
- func NewMetadataStorage(folder string) model.MetadataStorageCtor
- type Storage
- func (s *Storage) AddGroupedVariable(dataset string, varName string, varDisplayName string, varType string, ...) error
- func (s *Storage) AddVariable(dataset string, varName string, varDisplayName string, varType string, ...) error
- func (s *Storage) CloneDataset(dataset string, datasetNew string, storageNameNew string, folderNew string) error
- func (s *Storage) DatasetExists(dataset string) (bool, error)
- func (s *Storage) DeleteDataset(dataset string, softDelete bool) error
- func (s *Storage) DeleteVariable(dataset string, varName string) error
- func (s *Storage) DoesVariableExist(dataset string, varName string) (bool, error)
- func (s *Storage) FetchDataset(datasetName string, includeIndex bool, includeMeta bool, ...) (*api.Dataset, error)
- func (s *Storage) FetchDatasets(includeIndex bool, includeMeta bool, includeSystemData bool) ([]*api.Dataset, error)
- func (s *Storage) FetchVariable(dataset string, varName string) (*model.Variable, error)
- func (s *Storage) FetchVariableDisplay(dataset string, varName string) (*model.Variable, error)
- func (s *Storage) FetchVariables(dataset string, includeIndex bool, includeMeta bool, includeSystemData bool) ([]*model.Variable, error)
- func (s *Storage) FetchVariablesByName(dataset string, variables []string, includeIndex bool, includeMeta bool, ...) ([]*model.Variable, error)
- func (s *Storage) FetchVariablesDisplay(dataset string) ([]*model.Variable, error)
- func (s *Storage) ImportDataset(id string, uri string) (string, error)
- func (s *Storage) IngestDataset(datasetSource metadata.DatasetSource, meta *model.Metadata) error
- func (s *Storage) RemoveGroupedVariable(datasetName string, grouping model.BaseGrouping) error
- func (s *Storage) SearchDatasets(terms string, baseDataset *api.Dataset, includeIndex bool, includeMeta bool, ...) ([]*api.Dataset, error)
- func (s *Storage) SetDataType(dataset string, varName string, varType string) error
- func (s *Storage) SetExtrema(dataset string, varName string, extrema *api.Extrema) error
- func (s *Storage) UpdateDataset(dataset *api.Dataset) error
- func (s *Storage) UpdateVariable(dataset string, varName string, variableValue *model.Variable) error
Constants ¶
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 ¶
DatasetExists returns true if a dataset exists.
func (*Storage) DeleteDataset ¶
DeleteDataset deletes a dataset from the file system.
func (*Storage) DeleteVariable ¶
DeleteVariable is not supported by the datamart.
func (*Storage) DoesVariableExist ¶
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 ¶
FetchVariable returns the variable for the provided index, dataset, and variable.
func (*Storage) FetchVariableDisplay ¶
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 ¶
FetchVariablesDisplay returns all the display variables for the provided index and dataset.
func (*Storage) ImportDataset ¶
ImportDataset makes the dataset available for ingest and returns the URI to use for ingest.
func (*Storage) IngestDataset ¶
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 ¶
SetDataType is not supported by the datamart.
func (*Storage) SetExtrema ¶
SetExtrema is not supported by the datamart.
func (*Storage) UpdateDataset ¶
UpdateDataset updates a document consisting of the metadata to the file system.