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 ¶
- type DataStore
- func (_m *DataStore) AbortDeviceDeployments(ctx context.Context, deploymentID string) error
- func (_m *DataStore) AggregateDeviceDeploymentByStatus(ctx context.Context, id string) (model.Stats, error)
- func (_m *DataStore) AssignArtifact(ctx context.Context, deviceID string, deploymentID string, ...) error
- func (_m *DataStore) DecommissionDeviceDeployments(ctx context.Context, deviceId string) error
- func (_m *DataStore) DeleteDeployment(ctx context.Context, id string) error
- func (_m *DataStore) DeleteImage(ctx context.Context, id string) error
- func (_m *DataStore) DeviceCountByDeployment(ctx context.Context, id string) (int, error)
- func (_m *DataStore) ExistAssignedImageWithIDAndStatuses(ctx context.Context, id string, statuses ...string) (bool, error)
- func (_m *DataStore) ExistByArtifactId(ctx context.Context, id string) (bool, error)
- func (_m *DataStore) ExistUnfinishedByArtifactId(ctx context.Context, id string) (bool, error)
- func (_m *DataStore) Exists(ctx context.Context, id string) (bool, error)
- func (_m *DataStore) Find(ctx context.Context, query model.Query) ([]*model.Deployment, error)
- func (_m *DataStore) FindAll(ctx context.Context) ([]*model.SoftwareImage, error)
- func (_m *DataStore) FindAllDeploymentsForDeviceIDWithStatuses(ctx context.Context, deviceID string, statuses ...string) ([]model.DeviceDeployment, error)
- func (_m *DataStore) FindDeploymentByID(ctx context.Context, id string) (*model.Deployment, error)
- func (_m *DataStore) FindImageByID(ctx context.Context, id string) (*model.SoftwareImage, error)
- func (_m *DataStore) FindOldestDeploymentForDeviceIDWithStatuses(ctx context.Context, deviceID string, statuses ...string) (*model.DeviceDeployment, error)
- func (_m *DataStore) FindUnfinishedByID(ctx context.Context, id string) (*model.Deployment, error)
- func (_m *DataStore) Finish(ctx context.Context, id string, when time.Time) error
- func (_m *DataStore) GetDeviceDeploymentLog(ctx context.Context, deviceID string, deploymentID string) (*model.DeploymentLog, error)
- func (_m *DataStore) GetDeviceDeploymentStatus(ctx context.Context, deploymentID string, deviceID string) (string, error)
- func (_m *DataStore) GetDeviceStatusesForDeployment(ctx context.Context, deploymentID string) ([]model.DeviceDeployment, error)
- func (_m *DataStore) GetLimit(ctx context.Context, name string) (*model.Limit, error)
- func (_m *DataStore) GetReleases(ctx context.Context, filt *model.ReleaseFilter) ([]model.Release, error)
- func (_m *DataStore) HasDeploymentForDevice(ctx context.Context, deploymentID string, deviceID string) (bool, error)
- func (_m *DataStore) ImageByIdsAndDeviceType(ctx context.Context, ids []string, deviceType string) (*model.SoftwareImage, error)
- func (_m *DataStore) ImageByNameAndDeviceType(ctx context.Context, name string, deviceType string) (*model.SoftwareImage, error)
- func (_m *DataStore) ImagesByName(ctx context.Context, artifactName string) ([]*model.SoftwareImage, error)
- func (_m *DataStore) InsertDeployment(ctx context.Context, deployment *model.Deployment) error
- func (_m *DataStore) InsertImage(ctx context.Context, image *model.SoftwareImage) error
- func (_m *DataStore) InsertMany(ctx context.Context, deployment ...*model.DeviceDeployment) error
- func (_m *DataStore) IsArtifactUnique(ctx context.Context, artifactName string, deviceTypesCompatible []string) (bool, error)
- func (_m *DataStore) ProvisionTenant(ctx context.Context, tenantId string) error
- func (_m *DataStore) SaveDeviceDeploymentLog(ctx context.Context, log model.DeploymentLog) error
- func (_m *DataStore) Update(ctx context.Context, image *model.SoftwareImage) (bool, error)
- func (_m *DataStore) UpdateDeviceDeploymentLogAvailability(ctx context.Context, deviceID string, deploymentID string, log bool) error
- func (_m *DataStore) UpdateDeviceDeploymentStatus(ctx context.Context, deviceID string, deploymentID string, ...) (string, error)
- func (_m *DataStore) UpdateStats(ctx context.Context, id string, state_from string, state_to string) error
- func (_m *DataStore) UpdateStatsAndFinishDeployment(ctx context.Context, id string, stats model.Stats) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
DataStore is an autogenerated mock type for the DataStore type
func (*DataStore) AbortDeviceDeployments ¶
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 ¶
DecommissionDeviceDeployments provides a mock function with given fields: ctx, deviceId
func (*DataStore) DeleteDeployment ¶
DeleteDeployment provides a mock function with given fields: ctx, id
func (*DataStore) DeleteImage ¶
DeleteImage provides a mock function with given fields: ctx, id
func (*DataStore) DeviceCountByDeployment ¶
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 ¶
ExistByArtifactId provides a mock function with given fields: ctx, id
func (*DataStore) ExistUnfinishedByArtifactId ¶
ExistUnfinishedByArtifactId provides a mock function with given fields: ctx, id
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 ¶
FindDeploymentByID provides a mock function with given fields: ctx, id
func (*DataStore) FindImageByID ¶
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 ¶
FindUnfinishedByID provides a mock function with given fields: ctx, id
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) 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 ¶
InsertDeployment provides a mock function with given fields: ctx, deployment
func (*DataStore) InsertImage ¶
InsertImage provides a mock function with given fields: ctx, image
func (*DataStore) InsertMany ¶
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 ¶
ProvisionTenant provides a mock function with given fields: ctx, tenantId
func (*DataStore) SaveDeviceDeploymentLog ¶
SaveDeviceDeploymentLog provides a mock function with given fields: ctx, log
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