Documentation ¶
Index ¶
- Constants
- func NewExportedModelStorage(modelIndex string, initialize bool, clientCtor es.ClientCtor) model.ExportedModelStorageCtor
- func NewMetadataStorage(datasetIndex string, initialize bool, clientCtor es.ClientCtor) model.MetadataStorageCtor
- type Storage
- func (s *Storage) AddGroupedVariable(dataset string, varName string, varDisplayName string, varType string, ...) error
- func (s *Storage) AddVariable(dataset string, key 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) DeleteModel(fittedSolutionID string) error
- func (s *Storage) DeleteVariable(dataset string, key 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) FetchModel(modelName string) (*api.ExportedModel, error)
- func (s *Storage) FetchModelByID(fittedSolutionID string) (*api.ExportedModel, error)
- func (s *Storage) FetchModels(includeDeleted bool) ([]*api.ExportedModel, 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, varKeys []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) InitializeMetadataStorage(overwrite bool) error
- func (s *Storage) InitializeModelStorage(overwrite bool) error
- func (s *Storage) PersistExportedModel(model *api.ExportedModel) 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) SearchModels(terms string, includeDeleted bool) ([]*api.ExportedModel, error)
- func (s *Storage) SetDataType(dataset string, varName string, varType string) error
- func (s *Storage) SetExtrema(dataset string, key string, extrema *api.Extrema) error
- func (s *Storage) UpdateDataset(dataset *api.Dataset) error
- func (s *Storage) UpdateVariable(dataset string, varName string, variableValues *model.Variable) error
Constants ¶
const (
// Provenance for elastic
Provenance = "elastic"
)
Variables ¶
This section is empty.
Functions ¶
func NewExportedModelStorage ¶
func NewExportedModelStorage(modelIndex string, initialize bool, clientCtor es.ClientCtor) model.ExportedModelStorageCtor
NewExportedModelStorage returns a constructor for an exported model storage.
func NewMetadataStorage ¶
func NewMetadataStorage(datasetIndex string, initialize bool, clientCtor es.ClientCtor) 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 ES 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 grouping to the metadata.
func (*Storage) AddVariable ¶
func (s *Storage) AddVariable(dataset string, key string, varDisplayName string, varType string, varRole []string) error
AddVariable adds a new variable to the dataset. If the varDisplayName is left blank it will be set to the key value.
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 in ES.
func (*Storage) DeleteDataset ¶
DeleteDataset deletes a dataset from ES.
func (*Storage) DeleteModel ¶
DeleteModel deletes a model from ES.
func (*Storage) DeleteVariable ¶
DeleteVariable flags a variable as deleted.
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) FetchModel ¶
func (s *Storage) FetchModel(modelName string) (*api.ExportedModel, error)
FetchModel returns a model in the provided index. Model name is the named assigend to the model by the user.
func (*Storage) FetchModelByID ¶
func (s *Storage) FetchModelByID(fittedSolutionID string) (*api.ExportedModel, error)
FetchModelByID returns a model in the provided index using the model's fitted solution ID.
func (*Storage) FetchModels ¶
func (s *Storage) FetchModels(includeDeleted bool) ([]*api.ExportedModel, error)
FetchModels returns all exported models 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, varKeys []string, includeIndex bool, includeMeta bool, includeSystemData bool) ([]*model.Variable, error)
FetchVariablesByName returns all the caller supplied variables.
func (*Storage) FetchVariablesDisplay ¶
FetchVariablesDisplay returns all the display variables for the provided index and dataset.
func (*Storage) ImportDataset ¶
ImportDataset is not supported (ES datasets are already ingested).
func (*Storage) IngestDataset ¶
IngestDataset adds a document consisting of the metadata to ES.
func (*Storage) InitializeMetadataStorage ¶
InitializeMetadataStorage creates a new ElasticSearch index with our target mappings. An ngram analyze is defined and applied to the variable names to allow for substring searching.
func (*Storage) InitializeModelStorage ¶
InitializeModelStorage creates a new ElasticSearch index for the models.
func (*Storage) PersistExportedModel ¶
func (s *Storage) PersistExportedModel(model *api.ExportedModel) error
PersistExportedModel writes an exported model to ES storage.
func (*Storage) RemoveGroupedVariable ¶
func (s *Storage) RemoveGroupedVariable(datasetName string, grouping model.BaseGrouping) error
RemoveGroupedVariable removes a grouping to the metadata.
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) SearchModels ¶
SearchModels returns the models that match the search criteria in the provided index.
func (*Storage) SetDataType ¶
SetDataType updates the data type of the field in ES.
func (*Storage) SetExtrema ¶
SetExtrema updates the min & max values of a field in ES.
func (*Storage) UpdateDataset ¶
UpdateDataset updates a dataset already stored in ES.