Documentation ¶
Index ¶
- type CsldDataset
- type CubeInfo
- type CubeSlice
- type Service
- func (svc *Service) AddRecordsTags(ctx context.Context, ids []string, tags geocube.Metadata) (int64, error)
- func (svc *Service) CancelJob(ctx context.Context, jobID string) error
- func (svc *Service) CleanJobs(ctx context.Context, nameLike string, state *geocube.JobState) (int, error)
- func (svc *Service) ConfigConsolidation(ctx context.Context, variableID string, params geocube.ConsolidationParams) error
- func (svc *Service) ConsolidateFromFilters(ctx context.Context, jobName, instanceID, layoutID string, ...) (string, error)
- func (svc *Service) ConsolidateFromRecords(ctx context.Context, jobName, instanceID, layoutID string, recordsID []string) (string, error)
- func (svc *Service) CreateAOI(ctx context.Context, aoi *geocube.AOI) error
- func (svc *Service) CreateLayout(ctx context.Context, layout *geocube.Layout) error
- func (svc *Service) CreatePalette(ctx context.Context, palette *geocube.Palette, replaceIfExists bool) error
- func (svc *Service) CreateRecords(ctx context.Context, records []*geocube.Record) error
- func (svc *Service) CreateVariable(ctx context.Context, variable *geocube.Variable) error
- func (svc *Service) DeleteDatasets(ctx context.Context, simulate bool, instancesID []string, recordsID []string) ([]string, error)
- func (svc *Service) DeleteInstance(ctx context.Context, id string) error
- func (svc *Service) DeleteRecords(ctx context.Context, ids []string) (int64, error)
- func (svc *Service) DeleteVariable(ctx context.Context, id string) error
- func (svc *Service) GetAOI(ctx context.Context, aoiID string) (*geocube.AOI, error)
- func (svc *Service) GetConsolidationParams(ctx context.Context, ID string) (*geocube.ConsolidationParams, error)
- func (svc *Service) GetCubeFromFilters(ctx context.Context, recordTags geocube.Metadata, fromTime, toTime time.Time, ...) (CubeInfo, <-chan CubeSlice, error)
- func (svc *Service) GetCubeFromRecords(ctx context.Context, grecordsID [][]string, instancesID []string, ...) (CubeInfo, <-chan CubeSlice, error)
- func (svc *Service) GetJob(ctx context.Context, jobID string) (*geocube.Job, error)
- func (svc *Service) GetVariable(ctx context.Context, variableID, instanceID, variableName string) (*geocube.Variable, error)
- func (svc *Service) GetXYZTile(ctx context.Context, recordsID []string, instanceID string, a, b, z int) ([]byte, error)
- func (svc *Service) HandleEvent(ctx context.Context, evt geocube.Event) error
- func (svc *Service) IndexExternalDatasets(ctx context.Context, newcontainer *geocube.Container, ...) error
- func (svc *Service) InstantiateVariable(ctx context.Context, variableID string, instance *geocube.VariableInstance) error
- func (svc *Service) ListJobs(ctx context.Context, nameLike string) ([]*geocube.Job, error)
- func (svc *Service) ListLayouts(ctx context.Context, nameLike string) ([]*geocube.Layout, error)
- func (svc *Service) ListRecords(ctx context.Context, name string, tags geocube.Metadata, ...) ([]*geocube.Record, error)
- func (svc *Service) ListVariables(ctx context.Context, namelike string, page, limit int) ([]*geocube.Variable, error)
- func (svc *Service) RemoveRecordsTags(ctx context.Context, ids []string, tagsKey []string) (int64, error)
- func (svc *Service) RetryJob(ctx context.Context, jobID string, forceAnyState bool) error
- func (svc *Service) TidyPending(ctx context.Context, ...) ([]int64, error)
- func (svc *Service) TileAOI(ctx context.Context, aoi *geocube.AOI, crsS string, resolution float32, ...) ([]*grid.Cell, error)
- func (svc *Service) UpdateDatasets(ctx context.Context, simulate bool, instanceID string, ...) (map[string]int64, error)
- func (svc *Service) UpdateInstance(ctx context.Context, id string, name *string, newMetadata map[string]string, ...) error
- func (svc *Service) UpdateVariable(ctx context.Context, variableID string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CsldDataset ¶
type CsldDataset struct { ID string Event geocube.ConsolidationDataset Consolidation bool RecordID string }
type CubeSlice ¶
type CubeSlice struct { Image *geocube.Bitmap Err error Records []*geocube.Record Metadata map[string]string }
CubeSlice is a slice of a cube, an image corresponding to a group of record
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements GeocubeService
func New ¶
func New(ctx context.Context, db database.GeocubeDBBackend, eventPublisher messaging.Publisher, consolidationPublisher messaging.Publisher, ingestionStoragePath string, catalogWorkers int) (*Service, error)
New returns a new business service
func (*Service) AddRecordsTags ¶
func (svc *Service) AddRecordsTags(ctx context.Context, ids []string, tags geocube.Metadata) (int64, error)
AddRecordsTags add tags on list of records
func (*Service) CleanJobs ¶
func (svc *Service) CleanJobs(ctx context.Context, nameLike string, state *geocube.JobState) (int, error)
CleanJobs implements GeocubeService
func (*Service) ConfigConsolidation ¶
func (svc *Service) ConfigConsolidation(ctx context.Context, variableID string, params geocube.ConsolidationParams) error
ConfigConsolidation implements GeocubeService
func (*Service) ConsolidateFromFilters ¶
func (svc *Service) ConsolidateFromFilters(ctx context.Context, jobName, instanceID, layoutID string, tags map[string]string, fromTime, toTime time.Time) (string, error)
ConsolidateFromFilters implements GeocubeService
func (*Service) ConsolidateFromRecords ¶
func (svc *Service) ConsolidateFromRecords(ctx context.Context, jobName, instanceID, layoutID string, recordsID []string) (string, error)
ConsolidateFromRecords implements GeocubeService
func (*Service) CreateLayout ¶
CreateLayout implements GeocubeService
func (*Service) CreatePalette ¶
func (svc *Service) CreatePalette(ctx context.Context, palette *geocube.Palette, replaceIfExists bool) error
CreatePalette implements GeocubeService
func (*Service) CreateRecords ¶
CreateRecords implements GeocubeService
func (*Service) CreateVariable ¶
CreateVariable implements GeocubeService
func (*Service) DeleteDatasets ¶
func (svc *Service) DeleteDatasets(ctx context.Context, simulate bool, instancesID []string, recordsID []string) ([]string, error)
DeleteDatasets implements ServiceAdmin
func (*Service) DeleteInstance ¶
DeleteInstance implements GeocubeService
func (*Service) DeleteRecords ¶
DeleteRecords implements GeocubeService
func (*Service) DeleteVariable ¶
DeleteVariable implements GeocubeService
func (*Service) GetConsolidationParams ¶
func (svc *Service) GetConsolidationParams(ctx context.Context, ID string) (*geocube.ConsolidationParams, error)
GetConsolidationParams implements GeocubeService
func (*Service) GetCubeFromFilters ¶
func (svc *Service) GetCubeFromFilters(ctx context.Context, recordTags geocube.Metadata, fromTime, toTime time.Time, instancesID []string, crs *godal.SpatialRef, pixToCRS *affine.Affine, width, height int, format string, headersOnly bool) (CubeInfo, <-chan CubeSlice, error)
GetCubeFromFilters implements GeocubeService panics if instancesID is empty
func (*Service) GetCubeFromRecords ¶
func (svc *Service) GetCubeFromRecords(ctx context.Context, grecordsID [][]string, instancesID []string, crs *godal.SpatialRef, pixToCRS *affine.Affine, width, height int, format string, headersOnly bool) (CubeInfo, <-chan CubeSlice, error)
GetCubeFromRecords implements GeocubeService panics if instancesID is empty
func (*Service) GetJob ¶
GetJob implements GeocubeService GetJob retrieves only the Job but not the tasks
func (*Service) GetVariable ¶
func (svc *Service) GetVariable(ctx context.Context, variableID, instanceID, variableName string) (*geocube.Variable, error)
GetVariable implements GeocubeService Retrieves variable with the first not-empty parameter
func (*Service) GetXYZTile ¶
func (svc *Service) GetXYZTile(ctx context.Context, recordsID []string, instanceID string, a, b, z int) ([]byte, error)
GetXYZTile implements GeocubeService
func (*Service) HandleEvent ¶
HandleEvent handles TaskEvent and JobEvent for a job
func (*Service) IndexExternalDatasets ¶
func (svc *Service) IndexExternalDatasets(ctx context.Context, newcontainer *geocube.Container, datasets []*geocube.Dataset) error
IndexExternalDatasets implements GeocubeService Index datasets that are not fully known. Checks that the container is reachable and get some missing informations.
func (*Service) InstantiateVariable ¶
func (svc *Service) InstantiateVariable(ctx context.Context, variableID string, instance *geocube.VariableInstance) error
InstantiateVariable implements GeocubeService
func (*Service) ListJobs ¶
ListJobs implements GeocubeService ListJobs retrieves only the Job but not the tasks
func (*Service) ListLayouts ¶
ListLayouts implements GeocubeService
func (*Service) ListRecords ¶
func (svc *Service) ListRecords(ctx context.Context, name string, tags geocube.Metadata, fromTime, toTime time.Time, aoi *geocube.AOI, page, limit int, loadAOI bool) ([]*geocube.Record, error)
ListRecords implements GeocubeService
func (*Service) ListVariables ¶
func (svc *Service) ListVariables(ctx context.Context, namelike string, page, limit int) ([]*geocube.Variable, error)
ListVariables implements GeocubeService
func (*Service) RemoveRecordsTags ¶
func (svc *Service) RemoveRecordsTags(ctx context.Context, ids []string, tagsKey []string) (int64, error)
RemoveRecordsTags remove tags on list of records
func (*Service) TidyPending ¶
func (svc *Service) TidyPending(ctx context.Context, aois, records, variables, instances, containers, params bool, simulate bool) ([]int64, error)
TidyPending implements ServiceAdmin
func (*Service) TileAOI ¶
func (svc *Service) TileAOI(ctx context.Context, aoi *geocube.AOI, crsS string, resolution float32, width, height int32) ([]*grid.Cell, error)
TileAOI implements GeocubeService
func (*Service) UpdateDatasets ¶
func (svc *Service) UpdateDatasets(ctx context.Context, simulate bool, instanceID string, dmapping geocube.DataMapping) (map[string]int64, error)
UpdateDatasets implements ServiceAdmin
func (*Service) UpdateInstance ¶
func (svc *Service) UpdateInstance(ctx context.Context, id string, name *string, newMetadata map[string]string, delMetadataKeys []string) error
UpdateInstance implements GeocubeService
func (*Service) UpdateVariable ¶
func (svc *Service) UpdateVariable(ctx context.Context, variableID string, name, unit, description, palette *string, resampling *geocube.Resampling) error
UpdateVariable implements GeocubeService