mocks

package
v0.0.0-...-b206e69 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Copyright 2019 Northern.tech AS

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStore

type DataStore struct {
	mock.Mock
}

DataStore is an autogenerated mock type for the DataStore type

func (*DataStore) AbortDeviceDeployments

func (_m *DataStore) AbortDeviceDeployments(ctx context.Context, deploymentID string) error

AbortDeviceDeployments provides a mock function with given fields: ctx, deploymentID

func (*DataStore) AggregateDeviceDeploymentByStatus

func (_m *DataStore) AggregateDeviceDeploymentByStatus(ctx context.Context, id string) (model.Stats, error)

AggregateDeviceDeploymentByStatus provides a mock function with given fields: ctx, id

func (*DataStore) AssignArtifact

func (_m *DataStore) AssignArtifact(ctx context.Context, deviceID string, deploymentID string, artifact *model.SoftwareImage) error

AssignArtifact provides a mock function with given fields: ctx, deviceID, deploymentID, artifact

func (*DataStore) DecommissionDeviceDeployments

func (_m *DataStore) DecommissionDeviceDeployments(ctx context.Context, deviceId string) error

DecommissionDeviceDeployments provides a mock function with given fields: ctx, deviceId

func (*DataStore) DeleteDeployment

func (_m *DataStore) DeleteDeployment(ctx context.Context, id string) error

DeleteDeployment provides a mock function with given fields: ctx, id

func (*DataStore) DeleteImage

func (_m *DataStore) DeleteImage(ctx context.Context, id string) error

DeleteImage provides a mock function with given fields: ctx, id

func (*DataStore) DeviceCountByDeployment

func (_m *DataStore) DeviceCountByDeployment(ctx context.Context, id string) (int, error)

DeviceCountByDeployment provides a mock function with given fields: ctx, id

func (*DataStore) ExistAssignedImageWithIDAndStatuses

func (_m *DataStore) ExistAssignedImageWithIDAndStatuses(ctx context.Context, id string, statuses ...string) (bool, error)

ExistAssignedImageWithIDAndStatuses provides a mock function with given fields: ctx, id, statuses

func (*DataStore) ExistByArtifactId

func (_m *DataStore) ExistByArtifactId(ctx context.Context, id string) (bool, error)

ExistByArtifactId provides a mock function with given fields: ctx, id

func (*DataStore) ExistUnfinishedByArtifactId

func (_m *DataStore) ExistUnfinishedByArtifactId(ctx context.Context, id string) (bool, error)

ExistUnfinishedByArtifactId provides a mock function with given fields: ctx, id

func (*DataStore) Exists

func (_m *DataStore) Exists(ctx context.Context, id string) (bool, error)

Exists provides a mock function with given fields: ctx, id

func (*DataStore) Find

func (_m *DataStore) Find(ctx context.Context, query model.Query) ([]*model.Deployment, error)

Find provides a mock function with given fields: ctx, query

func (*DataStore) FindAll

func (_m *DataStore) FindAll(ctx context.Context) ([]*model.SoftwareImage, error)

FindAll provides a mock function with given fields: ctx

func (*DataStore) FindAllDeploymentsForDeviceIDWithStatuses

func (_m *DataStore) FindAllDeploymentsForDeviceIDWithStatuses(ctx context.Context, deviceID string, statuses ...string) ([]model.DeviceDeployment, error)

FindAllDeploymentsForDeviceIDWithStatuses provides a mock function with given fields: ctx, deviceID, statuses

func (*DataStore) FindDeploymentByID

func (_m *DataStore) FindDeploymentByID(ctx context.Context, id string) (*model.Deployment, error)

FindDeploymentByID provides a mock function with given fields: ctx, id

func (*DataStore) FindImageByID

func (_m *DataStore) FindImageByID(ctx context.Context, id string) (*model.SoftwareImage, error)

FindImageByID provides a mock function with given fields: ctx, id

func (*DataStore) FindOldestDeploymentForDeviceIDWithStatuses

func (_m *DataStore) FindOldestDeploymentForDeviceIDWithStatuses(ctx context.Context, deviceID string, statuses ...string) (*model.DeviceDeployment, error)

FindOldestDeploymentForDeviceIDWithStatuses provides a mock function with given fields: ctx, deviceID, statuses

func (*DataStore) FindUnfinishedByID

func (_m *DataStore) FindUnfinishedByID(ctx context.Context, id string) (*model.Deployment, error)

FindUnfinishedByID provides a mock function with given fields: ctx, id

func (*DataStore) Finish

func (_m *DataStore) Finish(ctx context.Context, id string, when time.Time) error

Finish provides a mock function with given fields: ctx, id, when

func (*DataStore) GetDeviceDeploymentLog

func (_m *DataStore) GetDeviceDeploymentLog(ctx context.Context, deviceID string, deploymentID string) (*model.DeploymentLog, error)

GetDeviceDeploymentLog provides a mock function with given fields: ctx, deviceID, deploymentID

func (*DataStore) GetDeviceDeploymentStatus

func (_m *DataStore) GetDeviceDeploymentStatus(ctx context.Context, deploymentID string, deviceID string) (string, error)

GetDeviceDeploymentStatus provides a mock function with given fields: ctx, deploymentID, deviceID

func (*DataStore) GetDeviceStatusesForDeployment

func (_m *DataStore) GetDeviceStatusesForDeployment(ctx context.Context, deploymentID string) ([]model.DeviceDeployment, error)

GetDeviceStatusesForDeployment provides a mock function with given fields: ctx, deploymentID

func (*DataStore) GetLimit

func (_m *DataStore) GetLimit(ctx context.Context, name string) (*model.Limit, error)

GetLimit provides a mock function with given fields: ctx, name

func (*DataStore) GetReleases

func (_m *DataStore) GetReleases(ctx context.Context, filt *model.ReleaseFilter) ([]model.Release, error)

GetReleases provides a mock function with given fields: ctx, filt

func (*DataStore) HasDeploymentForDevice

func (_m *DataStore) HasDeploymentForDevice(ctx context.Context, deploymentID string, deviceID string) (bool, error)

HasDeploymentForDevice provides a mock function with given fields: ctx, deploymentID, deviceID

func (*DataStore) ImageByIdsAndDeviceType

func (_m *DataStore) ImageByIdsAndDeviceType(ctx context.Context, ids []string, deviceType string) (*model.SoftwareImage, error)

ImageByIdsAndDeviceType provides a mock function with given fields: ctx, ids, deviceType

func (*DataStore) ImageByNameAndDeviceType

func (_m *DataStore) ImageByNameAndDeviceType(ctx context.Context, name string, deviceType string) (*model.SoftwareImage, error)

ImageByNameAndDeviceType provides a mock function with given fields: ctx, name, deviceType

func (*DataStore) ImagesByName

func (_m *DataStore) ImagesByName(ctx context.Context, artifactName string) ([]*model.SoftwareImage, error)

ImagesByName provides a mock function with given fields: ctx, artifactName

func (*DataStore) InsertDeployment

func (_m *DataStore) InsertDeployment(ctx context.Context, deployment *model.Deployment) error

InsertDeployment provides a mock function with given fields: ctx, deployment

func (*DataStore) InsertImage

func (_m *DataStore) InsertImage(ctx context.Context, image *model.SoftwareImage) error

InsertImage provides a mock function with given fields: ctx, image

func (*DataStore) InsertMany

func (_m *DataStore) InsertMany(ctx context.Context, deployment ...*model.DeviceDeployment) error

InsertMany provides a mock function with given fields: ctx, deployment

func (*DataStore) IsArtifactUnique

func (_m *DataStore) IsArtifactUnique(ctx context.Context, artifactName string, deviceTypesCompatible []string) (bool, error)

IsArtifactUnique provides a mock function with given fields: ctx, artifactName, deviceTypesCompatible

func (*DataStore) ProvisionTenant

func (_m *DataStore) ProvisionTenant(ctx context.Context, tenantId string) error

ProvisionTenant provides a mock function with given fields: ctx, tenantId

func (*DataStore) SaveDeviceDeploymentLog

func (_m *DataStore) SaveDeviceDeploymentLog(ctx context.Context, log model.DeploymentLog) error

SaveDeviceDeploymentLog provides a mock function with given fields: ctx, log

func (*DataStore) Update

func (_m *DataStore) Update(ctx context.Context, image *model.SoftwareImage) (bool, error)

Update provides a mock function with given fields: ctx, image

func (*DataStore) UpdateDeviceDeploymentLogAvailability

func (_m *DataStore) UpdateDeviceDeploymentLogAvailability(ctx context.Context, deviceID string, deploymentID string, log bool) error

UpdateDeviceDeploymentLogAvailability provides a mock function with given fields: ctx, deviceID, deploymentID, log

func (*DataStore) UpdateDeviceDeploymentStatus

func (_m *DataStore) UpdateDeviceDeploymentStatus(ctx context.Context, deviceID string, deploymentID string, status model.DeviceDeploymentStatus) (string, error)

UpdateDeviceDeploymentStatus provides a mock function with given fields: ctx, deviceID, deploymentID, status

func (*DataStore) UpdateStats

func (_m *DataStore) UpdateStats(ctx context.Context, id string, state_from string, state_to string) error

UpdateStats provides a mock function with given fields: ctx, id, state_from, state_to

func (*DataStore) UpdateStatsAndFinishDeployment

func (_m *DataStore) UpdateStatsAndFinishDeployment(ctx context.Context, id string, stats model.Stats) error

UpdateStatsAndFinishDeployment provides a mock function with given fields: ctx, id, stats

Jump to

Keyboard shortcuts

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