Documentation ¶
Index ¶
- func ConnStringFromCertFiles(dbName, dbUser, dbHost, certFile, keyFile, caCertFile string) (string, error)
- func ConnStringFromCredentials(dbName, dbUser, dbHost string, creds Credentials) (string, error)
- func ConnStringFromId(dbName, dbUser, dbHost, dbPassword string) (string, error)
- type Backend
- func (b Backend) AddRecordsTags(ctx context.Context, ids []string, tags geocube.Metadata) (int64, error)
- func (b Backend) ChangeDatasetsStatus(ctx context.Context, lockedByJobID string, fromStatus geocube.DatasetStatus, ...) error
- func (b Backend) ComputeValidShapeFromCell(ctx context.Context, datasetIDS []string, cell *grid.Cell) (*proj.Shape, error)
- func (b Backend) CreateAOI(ctx context.Context, aoi *geocube.AOI) error
- func (b Backend) CreateConsolidationParams(ctx context.Context, id string, cp geocube.ConsolidationParams) error
- func (b Backend) CreateContainer(ctx context.Context, container *geocube.Container) error
- func (b Backend) CreateDatasets(ctx context.Context, datasets []*geocube.Dataset) error
- func (b Backend) CreateGrid(ctx context.Context, grid *geocube.Grid) (err error)
- func (b Backend) CreateInstance(ctx context.Context, variableID string, instance *geocube.VariableInstance) error
- func (b Backend) CreateJob(ctx context.Context, job *geocube.Job) error
- func (b Backend) CreateLayout(ctx context.Context, layout *geocube.Layout) error
- func (b Backend) CreatePalette(ctx context.Context, palette *geocube.Palette) error
- func (b Backend) CreateRecords(ctx context.Context, records []*geocube.Record) (err error)
- func (b Backend) CreateTasks(ctx context.Context, jobID string, tasks []*geocube.Task) error
- func (b Backend) CreateVariable(ctx context.Context, variable *geocube.Variable) error
- func (b Backend) DeleteConsolidationParams(ctx context.Context, id string) error
- func (b Backend) DeleteContainer(ctx context.Context, container *geocube.Container) error
- func (b Backend) DeleteContainerLayout(ctx context.Context, containerURI string) error
- func (b Backend) DeleteDatasets(ctx context.Context, datasetsID []string) error
- func (b Backend) DeleteGrid(ctx context.Context, gridName string) error
- func (b Backend) DeleteInstance(ctx context.Context, instanceID string) error
- func (b Backend) DeleteJob(ctx context.Context, jobID string) error
- func (b Backend) DeleteLayout(ctx context.Context, name string) error
- func (b Backend) DeletePalette(ctx context.Context, name string) error
- func (b Backend) DeletePendingAOIs(ctx context.Context) (int64, error)
- func (b Backend) DeletePendingConsolidationParams(ctx context.Context) (int64, error)
- func (b Backend) DeletePendingContainers(ctx context.Context) (int64, error)
- func (b Backend) DeletePendingInstances(ctx context.Context) (int64, error)
- func (b Backend) DeletePendingRecords(ctx context.Context) (int64, error)
- func (b Backend) DeletePendingVariables(ctx context.Context) (int64, error)
- func (b Backend) DeleteRecords(ctx context.Context, ids []string) (int64, error)
- func (b Backend) DeleteTask(ctx context.Context, taskID string) error
- func (b Backend) DeleteVariable(ctx context.Context, variableID string) error
- func (b Backend) FindCells(ctx context.Context, gridName string, aoi *geocube.AOI) ([]geocube.Cell, []geom.MultiPolygon, error)
- func (b Backend) FindContainerLayouts(ctx context.Context, instanceId string, geomAOI *geocube.AOI, ...) ([]string, [][]string, error)
- func (b Backend) FindDatasets(ctx context.Context, status geocube.DatasetStatus, ...) (datasets []*geocube.Dataset, err error)
- func (b Backend) FindGrids(ctx context.Context, nameLike string) ([]*geocube.Grid, error)
- func (b Backend) FindJobs(ctx context.Context, nameLike string) ([]*geocube.Job, error)
- func (b Backend) FindLayouts(ctx context.Context, nameLike string) ([]*geocube.Layout, error)
- func (b Backend) FindRecords(ctx context.Context, namelike string, tags geocube.Metadata, ...) (records []*geocube.Record, err error)
- func (b Backend) FindVariables(ctx context.Context, namelike string, page, limit int) ([]*geocube.Variable, error)
- func (b Backend) GetDatasetsGeometryUnion(ctx context.Context, lockedByJobID string) (*geom.MultiPolygon, error)
- func (b Backend) GetUnionAOI(ctx context.Context, recordsID []string) (*geom.MultiPolygon, error)
- func (b Backend) ListActiveDatasetsID(ctx context.Context, instanceID string, recordsID []string, ...) ([]string, error)
- func (b Backend) ListJobsID(ctx context.Context, nameLike string, states []geocube.JobState) ([]string, error)
- func (b Backend) LockDatasets(ctx context.Context, lockedByJobID string, datasetsID []string, flag int) (err error)
- func (b Backend) PersistLogs(ctx context.Context, jobID string, logs geocube.JobLogs) error
- func (b Backend) ReadAOI(ctx context.Context, aoiID string) (*geocube.AOI, error)
- func (b Backend) ReadConsolidationParams(ctx context.Context, id string) (*geocube.ConsolidationParams, error)
- func (b Backend) ReadContainers(ctx context.Context, containersURI []string) (containers []*geocube.Container, err error)
- func (b Backend) ReadGrid(ctx context.Context, name string) (*geocube.Grid, error)
- func (b Backend) ReadJob(ctx context.Context, jobID string, opts ...database.ReadJobOptions) (*geocube.Job, error)
- func (b Backend) ReadJobWithTask(ctx context.Context, jobID string, taskID string) (*geocube.Job, error)
- func (b Backend) ReadLayout(ctx context.Context, name string) (*geocube.Layout, error)
- func (b Backend) ReadPalette(ctx context.Context, name string) (*geocube.Palette, error)
- func (b Backend) ReadRecords(ctx context.Context, ids []string) (records []*geocube.Record, err error)
- func (b Backend) ReadTasks(ctx context.Context, jobID string, states []geocube.TaskState) (tasks []*geocube.Task, err error)
- func (b Backend) ReadVariable(ctx context.Context, variableID string) (*geocube.Variable, error)
- func (b Backend) ReadVariableFromInstanceID(ctx context.Context, instanceID string) (*geocube.Variable, error)
- func (b Backend) ReadVariableFromName(ctx context.Context, variableName string) (*geocube.Variable, error)
- func (b Backend) ReleaseDatasets(ctx context.Context, lockedByJobID string, flag int) error
- func (b Backend) RemoveRecordsTags(ctx context.Context, ids []string, tagsKey []string) (int64, error)
- func (b Backend) SaveContainerLayout(ctx context.Context, containerURI string, layoutName string) error
- func (b Backend) UpdateContainer(ctx context.Context, container *geocube.Container) error
- func (b Backend) UpdateDatasets(ctx context.Context, instanceID string, recordIds []string, ...) (map[string]int64, error)
- func (b Backend) UpdateInstance(ctx context.Context, instance *geocube.VariableInstance) error
- func (b Backend) UpdateJob(ctx context.Context, job *geocube.Job) error
- func (b Backend) UpdatePalette(ctx context.Context, palette *geocube.Palette) error
- func (b Backend) UpdateTask(ctx context.Context, task *geocube.Task) error
- func (b Backend) UpdateVariable(ctx context.Context, variable *geocube.Variable) error
- type BackendDB
- type BackendTx
- type Credentials
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnStringFromCertFiles ¶
func ConnStringFromCredentials ¶
func ConnStringFromCredentials(dbName, dbUser, dbHost string, creds Credentials) (string, error)
func ConnStringFromId ¶
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend implements GeocubeBackend
func (Backend) AddRecordsTags ¶
func (b Backend) AddRecordsTags(ctx context.Context, ids []string, tags geocube.Metadata) (int64, error)
AddRecordsTags add or update existing tags on list of records
func (Backend) ChangeDatasetsStatus ¶
func (b Backend) ChangeDatasetsStatus(ctx context.Context, lockedByJobID string, fromStatus geocube.DatasetStatus, toStatus geocube.DatasetStatus) error
ChangeDatasetsStatus implements GeocubeBackend
func (Backend) ComputeValidShapeFromCell ¶ added in v0.3.0
func (Backend) CreateConsolidationParams ¶
func (b Backend) CreateConsolidationParams(ctx context.Context, id string, cp geocube.ConsolidationParams) error
CreateConsolidationParams implements GeocubeBackend
func (Backend) CreateContainer ¶
CreateContainer implements GeocubeBackend
func (Backend) CreateDatasets ¶
CreateDatasets implements GeocubeBackend
func (Backend) CreateGrid ¶ added in v0.3.0
CreateGrid implements GeocubeBackend
func (Backend) CreateInstance ¶
func (b Backend) CreateInstance(ctx context.Context, variableID string, instance *geocube.VariableInstance) error
CreateInstance implements GeocubeBackend
func (Backend) CreateLayout ¶
CreateLayout implements GeocubeBackend
func (Backend) CreatePalette ¶
CreatePalette implements GeocubeBackend
func (Backend) CreateRecords ¶
CreateRecords implements GeocubeBackend
func (Backend) CreateTasks ¶
CreateTasks implements GeocubeBackend
func (Backend) CreateVariable ¶
CreateVariable implements GeocubeBackend
func (Backend) DeleteConsolidationParams ¶
DeleteConsolidationParams implements geocubeBackend
func (Backend) DeleteContainer ¶
DeleteContainer implements GeocubeBackend
func (Backend) DeleteContainerLayout ¶ added in v0.4.1
DeleteContainerLayout implements GeocubeBackend
func (Backend) DeleteDatasets ¶
DeleteDatasets implements GeocubeBackend
func (Backend) DeleteGrid ¶ added in v0.3.0
DeleteGrid implements GeocubeBackend
func (Backend) DeleteInstance ¶
DeleteInstance implements GeocubeBackend
func (Backend) DeleteLayout ¶
DeleteLayout implements GeocubeBackend
func (Backend) DeletePalette ¶
DeletePalette implements GeocubeBackend
func (Backend) DeletePendingAOIs ¶
DeletePendingAOIs implements GeocubeBackend
func (Backend) DeletePendingConsolidationParams ¶
DeletePendingConsolidationParams implements GeocubeBackend
func (Backend) DeletePendingContainers ¶
DeletePendingContainers implements GeocubeBackend
func (Backend) DeletePendingInstances ¶
DeletePendingInstances implements GeocubeBackend
func (Backend) DeletePendingRecords ¶
DeletePendingRecords implements GeocubeBackend
func (Backend) DeletePendingVariables ¶
DeletePendingVariables implements GeocubeBackend
func (Backend) DeleteRecords ¶
DeleteRecords implements GeocubeBackend
func (Backend) DeleteTask ¶
DeleteTask implements GeocubeBackend
func (Backend) DeleteVariable ¶
DeleteVariable implements GeocubeBackend
func (Backend) FindCells ¶ added in v0.3.0
func (b Backend) FindCells(ctx context.Context, gridName string, aoi *geocube.AOI) ([]geocube.Cell, []geom.MultiPolygon, error)
FindCells implements GeocubeBackend Returns the cells and the intersection with the AOI
func (Backend) FindContainerLayouts ¶ added in v0.5.1
func (b Backend) FindContainerLayouts(ctx context.Context, instanceId string, geomAOI *geocube.AOI, recordIds []string, recordTags map[string]string, fromTime, toTime time.Time) ([]string, [][]string, error)
FindContainerLayouts implements GeocubeBackend
func (Backend) FindDatasets ¶
func (b Backend) FindDatasets(ctx context.Context, status geocube.DatasetStatus, containerURIPatterns []string, lockedByJobID string, instancesID, recordsID []string, recordTags geocube.Metadata, fromTime, toTime time.Time, geog *proj.GeographicRing, refined *proj.Ring, page, limit int, order bool) (datasets []*geocube.Dataset, err error)
FindDatasets implements GeocubeBackend
func (Backend) FindLayouts ¶
FindLayouts implements GeocubeBackend
func (Backend) FindRecords ¶
func (b Backend) FindRecords(ctx context.Context, namelike string, tags geocube.Metadata, fromTime, toTime time.Time, jobID string, aoi *geocube.AOI, page, limit int, order, loadAOI bool) (records []*geocube.Record, err error)
FindRecords implements GeocubeBackend
func (Backend) FindVariables ¶
func (b Backend) FindVariables(ctx context.Context, namelike string, page, limit int) ([]*geocube.Variable, error)
FindVariables implements GeocubeBackend
func (Backend) GetDatasetsGeometryUnion ¶ added in v0.3.0
func (b Backend) GetDatasetsGeometryUnion(ctx context.Context, lockedByJobID string) (*geom.MultiPolygon, error)
GetDatasetsGeometryUnion implements GeocubeBackend
func (Backend) GetUnionAOI ¶
GetUnionAOI implements GeocubeBackend
func (Backend) ListActiveDatasetsID ¶
func (b Backend) ListActiveDatasetsID(ctx context.Context, instanceID string, recordsID []string, recordTags geocube.Metadata, fromTime, toTime time.Time) ([]string, error)
ListActiveDatasetsID implements GeocubeBackend ListActiveDatasetsID retrieves all the datasets from the list of records representing the given variable
func (Backend) ListJobsID ¶
func (b Backend) ListJobsID(ctx context.Context, nameLike string, states []geocube.JobState) ([]string, error)
ListJobsID implements GeocubeBackend
func (Backend) LockDatasets ¶
func (b Backend) LockDatasets(ctx context.Context, lockedByJobID string, datasetsID []string, flag int) (err error)
LockDatasets implements GeocubeBackend
func (Backend) PersistLogs ¶ added in v0.6.0
func (Backend) ReadConsolidationParams ¶
func (b Backend) ReadConsolidationParams(ctx context.Context, id string) (*geocube.ConsolidationParams, error)
ReadConsolidationParams implements geocubeBackend
func (Backend) ReadContainers ¶
func (b Backend) ReadContainers(ctx context.Context, containersURI []string) (containers []*geocube.Container, err error)
ReadContainers implements GeocubeBackend
func (Backend) ReadJob ¶
func (b Backend) ReadJob(ctx context.Context, jobID string, opts ...database.ReadJobOptions) (*geocube.Job, error)
ReadJob implements GeocubeBackend
func (Backend) ReadJobWithTask ¶
func (b Backend) ReadJobWithTask(ctx context.Context, jobID string, taskID string) (*geocube.Job, error)
ReadJobWithTask implements GeocubeBackend
func (Backend) ReadLayout ¶
ReadLayout implements GeocubeBackend
func (Backend) ReadPalette ¶
ReadPalette implements GeocubeBackend
func (Backend) ReadRecords ¶
func (b Backend) ReadRecords(ctx context.Context, ids []string) (records []*geocube.Record, err error)
ReadRecords implements GeocubeBackend
func (Backend) ReadTasks ¶
func (b Backend) ReadTasks(ctx context.Context, jobID string, states []geocube.TaskState) (tasks []*geocube.Task, err error)
ReadTasks implements GeocubeBackend
func (Backend) ReadVariable ¶
ReadVariable implements GeocubeBackend
func (Backend) ReadVariableFromInstanceID ¶
func (b Backend) ReadVariableFromInstanceID(ctx context.Context, instanceID string) (*geocube.Variable, error)
ReadVariableFromInstanceID implements GeocubeBackend
func (Backend) ReadVariableFromName ¶
func (b Backend) ReadVariableFromName(ctx context.Context, variableName string) (*geocube.Variable, error)
ReadVariableFromName implements GeocubeBackend
func (Backend) ReleaseDatasets ¶
ReleaseDatasets implements GeocubeBackend
func (Backend) RemoveRecordsTags ¶
func (b Backend) RemoveRecordsTags(ctx context.Context, ids []string, tagsKey []string) (int64, error)
RemoveRecordsTags remove tags on list of records
func (Backend) SaveContainerLayout ¶ added in v0.3.0
func (b Backend) SaveContainerLayout(ctx context.Context, containerURI string, layoutName string) error
SaveContainerLayout implements GeocubeBackend
func (Backend) UpdateContainer ¶
UpdateContainer implements GeocubeBackend
func (Backend) UpdateDatasets ¶
func (b Backend) UpdateDatasets(ctx context.Context, instanceID string, recordIds []string, dmapping geocube.DataMapping) (map[string]int64, error)
UpdateDatasets implements GeocubeBackend
func (Backend) UpdateInstance ¶
UpdateInstance updates the name and the metadata of the instance in the database
func (Backend) UpdatePalette ¶
UpdatePalette implements GeocubeBackend
func (Backend) UpdateTask ¶
UpdateTask implements GeocubeBackend
type BackendDB ¶
BackendDB implements GeocubeDBBackend
func (BackendDB) StartTransaction ¶
StartTransaction implements GeocubeDBBackend