mocks

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeocubeBackend

type GeocubeBackend struct {
	mock.Mock
}

func (*GeocubeBackend) AddRecordsTags

func (_m *GeocubeBackend) AddRecordsTags(ctx context.Context, ids []string, tags geocube.Metadata) (int64, error)

func (*GeocubeBackend) ChangeDatasetsStatus

func (_m *GeocubeBackend) ChangeDatasetsStatus(ctx context.Context, lockedByJobID string, fromStatus geocube.DatasetStatus, toStatus geocube.DatasetStatus) error

func (*GeocubeBackend) ComputeValidShapeFromCell

func (_m *GeocubeBackend) ComputeValidShapeFromCell(ctx context.Context, datasetIDS []string, cell *grid.Cell) (*proj.Shape, error)

func (*GeocubeBackend) CreateAOI

func (_m *GeocubeBackend) CreateAOI(ctx context.Context, aoi *geocube.AOI) error

func (*GeocubeBackend) CreateConsolidationParams

func (_m *GeocubeBackend) CreateConsolidationParams(ctx context.Context, id string, consolidationParams geocube.ConsolidationParams) error

func (*GeocubeBackend) CreateContainer

func (_m *GeocubeBackend) CreateContainer(ctx context.Context, container *geocube.Container) error

func (*GeocubeBackend) CreateDatasets

func (_m *GeocubeBackend) CreateDatasets(ctx context.Context, datasets []*geocube.Dataset) error

func (*GeocubeBackend) CreateGrid

func (_m *GeocubeBackend) CreateGrid(ctx context.Context, grid *geocube.Grid) error

func (*GeocubeBackend) CreateInstance

func (_m *GeocubeBackend) CreateInstance(ctx context.Context, variableID string, instance *geocube.VariableInstance) (err error)

func (*GeocubeBackend) CreateJob

func (_m *GeocubeBackend) CreateJob(ctx context.Context, job *geocube.Job) error

func (*GeocubeBackend) CreateLayout

func (_m *GeocubeBackend) CreateLayout(ctx context.Context, layout *geocube.Layout) error

func (*GeocubeBackend) CreatePalette

func (_m *GeocubeBackend) CreatePalette(ctx context.Context, palette *geocube.Palette) error

func (*GeocubeBackend) CreateRecords

func (_m *GeocubeBackend) CreateRecords(ctx context.Context, records []*geocube.Record) error

func (*GeocubeBackend) CreateTasks

func (_m *GeocubeBackend) CreateTasks(ctx context.Context, jobID string, tasks []*geocube.Task) error

func (*GeocubeBackend) CreateVariable

func (_m *GeocubeBackend) CreateVariable(ctx context.Context, variable *geocube.Variable) error

func (*GeocubeBackend) DeleteConsolidationParams

func (_m *GeocubeBackend) DeleteConsolidationParams(ctx context.Context, id string) error

func (*GeocubeBackend) DeleteContainer

func (_m *GeocubeBackend) DeleteContainer(ctx context.Context, container *geocube.Container) error

func (*GeocubeBackend) DeleteContainerLayout added in v0.4.1

func (_m *GeocubeBackend) DeleteContainerLayout(ctx context.Context, containerURI string) error

func (*GeocubeBackend) DeleteDatasets

func (_m *GeocubeBackend) DeleteDatasets(ctx context.Context, datasetsID []string) error

func (*GeocubeBackend) DeleteGrid

func (_m *GeocubeBackend) DeleteGrid(ctx context.Context, gridName string) error

func (*GeocubeBackend) DeleteInstance

func (_m *GeocubeBackend) DeleteInstance(ctx context.Context, instanceID string) error

func (*GeocubeBackend) DeleteJob

func (_m *GeocubeBackend) DeleteJob(ctx context.Context, jobID string) error

func (*GeocubeBackend) DeleteLayout

func (_m *GeocubeBackend) DeleteLayout(ctx context.Context, name string) error

func (*GeocubeBackend) DeletePalette

func (_m *GeocubeBackend) DeletePalette(ctx context.Context, name string) error

func (*GeocubeBackend) DeletePendingAOIs

func (_m *GeocubeBackend) DeletePendingAOIs(ctx context.Context) (int64, error)

func (*GeocubeBackend) DeletePendingConsolidationParams

func (_m *GeocubeBackend) DeletePendingConsolidationParams(ctx context.Context) (int64, error)

func (*GeocubeBackend) DeletePendingContainers

func (_m *GeocubeBackend) DeletePendingContainers(ctx context.Context) (int64, error)

func (*GeocubeBackend) DeletePendingInstances

func (_m *GeocubeBackend) DeletePendingInstances(ctx context.Context) (int64, error)

func (*GeocubeBackend) DeletePendingRecords

func (_m *GeocubeBackend) DeletePendingRecords(ctx context.Context) (int64, error)

func (*GeocubeBackend) DeletePendingVariables

func (_m *GeocubeBackend) DeletePendingVariables(ctx context.Context) (int64, error)

func (*GeocubeBackend) DeleteRecords

func (_m *GeocubeBackend) DeleteRecords(ctx context.Context, ids []string) (int64, error)

func (*GeocubeBackend) DeleteTask

func (_m *GeocubeBackend) DeleteTask(ctx context.Context, taskID string) error

func (*GeocubeBackend) DeleteVariable

func (_m *GeocubeBackend) DeleteVariable(ctx context.Context, variableID string) error

func (*GeocubeBackend) FindCells

func (_m *GeocubeBackend) FindCells(ctx context.Context, gridName string, aoi *geocube.AOI) ([]geocube.Cell, []geom.MultiPolygon, error)

func (*GeocubeBackend) FindContainerLayouts added in v0.5.1

func (_m *GeocubeBackend) FindContainerLayouts(ctx context.Context, instanceId string, geomAOI *geocube.AOI, recordIds []string, recordTags map[string]string, fromTime, toTime time.Time) ([]string, [][]string, error)

func (*GeocubeBackend) FindDatasets

func (_m *GeocubeBackend) FindDatasets(ctx context.Context, status geocube.DatasetStatus, containerURIs []string, lockedByJobID string, instanceIDs, recordIDs []string, recordTags geocube.Metadata, fromTime, toTime time.Time, geog *proj.GeographicRing, refined *proj.Ring, page, limit int, order bool) ([]*geocube.Dataset, error)

func (*GeocubeBackend) FindGrids

func (_m *GeocubeBackend) FindGrids(ctx context.Context, nameLike string) ([]*geocube.Grid, error)

func (*GeocubeBackend) FindJobs

func (_m *GeocubeBackend) FindJobs(ctx context.Context, nameLike string) ([]*geocube.Job, error)

func (*GeocubeBackend) FindLayouts

func (_m *GeocubeBackend) FindLayouts(ctx context.Context, nameLike string) ([]*geocube.Layout, error)

func (*GeocubeBackend) FindRecords

func (_m *GeocubeBackend) FindRecords(ctx context.Context, namelike string, tags geocube.Metadata, fromTime, toTime time.Time, jobID string, aoi *geocube.AOI, page, limit int, order, loadAOI bool) ([]*geocube.Record, error)

func (*GeocubeBackend) FindVariables

func (_m *GeocubeBackend) FindVariables(ctx context.Context, namelike string, page, limit int) ([]*geocube.Variable, error)

func (*GeocubeBackend) GetDatasetsGeometryUnion

func (_m *GeocubeBackend) GetDatasetsGeometryUnion(ctx context.Context, lockedByJobID string) (*geom.MultiPolygon, error)

func (*GeocubeBackend) ListActiveDatasetsID

func (_m *GeocubeBackend) ListActiveDatasetsID(ctx context.Context, instanceID string, recordsID []string, recordTags geocube.Metadata, fromTime, toTime time.Time) ([]string, error)

func (*GeocubeBackend) ListJobsID

func (_m *GeocubeBackend) ListJobsID(ctx context.Context, nameLike string, states []geocube.JobState) ([]string, error)

func (*GeocubeBackend) LockDatasets

func (_m *GeocubeBackend) LockDatasets(ctx context.Context, jobID string, datasetsID []string, flag int) error

func (*GeocubeBackend) PersistLogs added in v0.6.0

func (_m *GeocubeBackend) PersistLogs(ctx context.Context, jobID string, logs geocube.JobLogs) error

func (*GeocubeBackend) ReadAOI

func (_m *GeocubeBackend) ReadAOI(ctx context.Context, aoiID string) (*geocube.AOI, error)

func (*GeocubeBackend) ReadConsolidationParams

func (_m *GeocubeBackend) ReadConsolidationParams(ctx context.Context, id string) (*geocube.ConsolidationParams, error)

func (*GeocubeBackend) ReadContainers

func (_m *GeocubeBackend) ReadContainers(ctx context.Context, containersURI []string) ([]*geocube.Container, error)

func (*GeocubeBackend) ReadGrid

func (_m *GeocubeBackend) ReadGrid(ctx context.Context, name string) (*geocube.Grid, error)

func (*GeocubeBackend) ReadJob

func (_m *GeocubeBackend) ReadJob(ctx context.Context, jobID string, opts ...database.ReadJobOptions) (*geocube.Job, error)

func (*GeocubeBackend) ReadJobWithTask

func (_m *GeocubeBackend) ReadJobWithTask(ctx context.Context, jobID string, taskID string) (*geocube.Job, error)

func (*GeocubeBackend) ReadLayout

func (_m *GeocubeBackend) ReadLayout(ctx context.Context, layoutID string) (*geocube.Layout, error)

func (*GeocubeBackend) ReadPalette

func (_m *GeocubeBackend) ReadPalette(ctx context.Context, name string) (*geocube.Palette, error)

func (*GeocubeBackend) ReadRecords

func (_m *GeocubeBackend) ReadRecords(ctx context.Context, ids []string) ([]*geocube.Record, error)

func (*GeocubeBackend) ReadTasks

func (_m *GeocubeBackend) ReadTasks(ctx context.Context, jobID string, states []geocube.TaskState) ([]*geocube.Task, error)

func (*GeocubeBackend) ReadVariable

func (_m *GeocubeBackend) ReadVariable(ctx context.Context, variableID string) (*geocube.Variable, error)

func (*GeocubeBackend) ReadVariableFromInstanceID

func (_m *GeocubeBackend) ReadVariableFromInstanceID(ctx context.Context, instanceID string) (*geocube.Variable, error)

func (*GeocubeBackend) ReadVariableFromName

func (_m *GeocubeBackend) ReadVariableFromName(ctx context.Context, variableName string) (*geocube.Variable, error)

func (*GeocubeBackend) ReleaseDatasets

func (_m *GeocubeBackend) ReleaseDatasets(ctx context.Context, jobID string, flag int) error

func (*GeocubeBackend) RemoveRecordsTags

func (_m *GeocubeBackend) RemoveRecordsTags(ctx context.Context, ids []string, tagsKey []string) (int64, error)

func (*GeocubeBackend) SaveContainerLayout

func (_m *GeocubeBackend) SaveContainerLayout(ctx context.Context, containerURI string, layoutName string) error

func (*GeocubeBackend) StartTransaction

func (_m *GeocubeBackend) StartTransaction(ctx context.Context) (database.GeocubeTxBackend, error)

func (*GeocubeBackend) UpdateContainer

func (_m *GeocubeBackend) UpdateContainer(ctx context.Context, container *geocube.Container) error

func (*GeocubeBackend) UpdateDatasets

func (_m *GeocubeBackend) UpdateDatasets(ctx context.Context, instanceID string, recordIds []string, dmapping geocube.DataMapping) (map[string]int64, error)

func (*GeocubeBackend) UpdateInstance

func (_m *GeocubeBackend) UpdateInstance(ctx context.Context, instance *geocube.VariableInstance) error

func (*GeocubeBackend) UpdateJob

func (_m *GeocubeBackend) UpdateJob(ctx context.Context, job *geocube.Job) error

func (*GeocubeBackend) UpdatePalette

func (_m *GeocubeBackend) UpdatePalette(ctx context.Context, palette *geocube.Palette) error

func (*GeocubeBackend) UpdateTask

func (_m *GeocubeBackend) UpdateTask(ctx context.Context, task *geocube.Task) error

func (*GeocubeBackend) UpdateVariable

func (_m *GeocubeBackend) UpdateVariable(ctx context.Context, variable *geocube.Variable) error

type GeocubeTxBackend

type GeocubeTxBackend struct {
	mock.Mock
	GeocubeBackend
}

func (*GeocubeTxBackend) Commit

func (_m *GeocubeTxBackend) Commit() error

func (*GeocubeTxBackend) CreateConsolidationParams

func (_m *GeocubeTxBackend) CreateConsolidationParams(ctx context.Context, id string, consolidationParams geocube.ConsolidationParams) error

func (*GeocubeTxBackend) CreateJob

func (_m *GeocubeTxBackend) CreateJob(ctx context.Context, job *geocube.Job) error

func (*GeocubeTxBackend) FindDatasets

func (_m *GeocubeTxBackend) FindDatasets(ctx context.Context, status geocube.DatasetStatus, containerURIs []string, lockedByJobID string, instanceIDs, recordIDs []string, recordTags geocube.Metadata, fromTime, toTime time.Time, geog *proj.GeographicRing, refined *proj.Ring, page, limit int, order bool) ([]*geocube.Dataset, error)

func (*GeocubeTxBackend) FindRecords

func (_m *GeocubeTxBackend) FindRecords(ctx context.Context, namelike string, tags geocube.Metadata, fromTime, toTime time.Time, jobID string, aoi *geocube.AOI, page, limit int, order, loadAOI bool) ([]*geocube.Record, error)

func (*GeocubeTxBackend) GetDatasetsGeometryUnion

func (_m *GeocubeTxBackend) GetDatasetsGeometryUnion(ctx context.Context, lockedByJobID string) (*geom.MultiPolygon, error)

func (*GeocubeTxBackend) LockDatasets

func (_m *GeocubeTxBackend) LockDatasets(ctx context.Context, jobID string, datasetsID []string, flag int) error

func (*GeocubeTxBackend) PersistLogs added in v0.6.0

func (_m *GeocubeTxBackend) PersistLogs(ctx context.Context, jobID string, logs geocube.JobLogs) error

func (*GeocubeTxBackend) ReadConsolidationParams

func (_m *GeocubeTxBackend) ReadConsolidationParams(ctx context.Context, id string) (*geocube.ConsolidationParams, error)

func (*GeocubeTxBackend) ReadLayout

func (_m *GeocubeTxBackend) ReadLayout(ctx context.Context, layoutID string) (*geocube.Layout, error)

func (*GeocubeTxBackend) ReadVariableFromInstanceID

func (_m *GeocubeTxBackend) ReadVariableFromInstanceID(ctx context.Context, instanceID string) (*geocube.Variable, error)

func (*GeocubeTxBackend) ReleaseDatasets

func (_m *GeocubeTxBackend) ReleaseDatasets(ctx context.Context, jobID string, flag int) error

func (*GeocubeTxBackend) Rollback

func (_m *GeocubeTxBackend) Rollback() error

func (*GeocubeTxBackend) UpdateJob

func (_m *GeocubeTxBackend) UpdateJob(ctx context.Context, job *geocube.Job) error

func (*GeocubeTxBackend) UpdateTask added in v0.6.0

func (_m *GeocubeTxBackend) UpdateTask(ctx context.Context, task *geocube.Task) error

Jump to

Keyboard shortcuts

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