Rename module

This change renames the module from "garm" to "github.com/cloudbase/garm".

This will make it easier to consume public functions defined in garm, by
external applications, without having to resort to replace.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2023-03-12 16:01:49 +02:00
parent 24f61ceb8c
commit 829db87f15
No known key found for this signature in database
GPG key ID: 7D073DCC2C074CB5
87 changed files with 638 additions and 362 deletions

View file

@ -1,11 +1,11 @@
// Code generated by mockery v2.15.0. DO NOT EDIT.
// Code generated by mockery v2.22.1. DO NOT EDIT.
package mocks
import (
context "context"
params "garm/params"
params "github.com/cloudbase/garm/params"
mock "github.com/stretchr/testify/mock"
)
@ -14,13 +14,13 @@ type Store struct {
mock.Mock
}
// AddInstanceEvent provides a mock function with given fields: ctx, instanceID, event, statusMessage
func (_m *Store) AddInstanceEvent(ctx context.Context, instanceID string, event params.EventType, statusMessage string) error {
ret := _m.Called(ctx, instanceID, event, statusMessage)
// AddInstanceEvent provides a mock function with given fields: ctx, instanceID, event, eventLevel, eventMessage
func (_m *Store) AddInstanceEvent(ctx context.Context, instanceID string, event params.EventType, eventLevel params.EventLevel, eventMessage string) error {
ret := _m.Called(ctx, instanceID, event, eventLevel, eventMessage)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, string) error); ok {
r0 = rf(ctx, instanceID, event, statusMessage)
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, params.EventLevel, string) error); ok {
r0 = rf(ctx, instanceID, event, eventLevel, eventMessage)
} else {
r0 = ret.Error(0)
}
@ -33,13 +33,16 @@ func (_m *Store) ControllerInfo() (params.ControllerInfo, error) {
ret := _m.Called()
var r0 params.ControllerInfo
var r1 error
if rf, ok := ret.Get(0).(func() (params.ControllerInfo, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() params.ControllerInfo); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(params.ControllerInfo)
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
@ -54,13 +57,16 @@ func (_m *Store) CreateEnterprise(ctx context.Context, name string, credentialsN
ret := _m.Called(ctx, name, credentialsName, webhookSecret)
var r0 params.Enterprise
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (params.Enterprise, error)); ok {
return rf(ctx, name, credentialsName, webhookSecret)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) params.Enterprise); ok {
r0 = rf(ctx, name, credentialsName, webhookSecret)
} else {
r0 = ret.Get(0).(params.Enterprise)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
r1 = rf(ctx, name, credentialsName, webhookSecret)
} else {
@ -75,13 +81,16 @@ func (_m *Store) CreateEnterprisePool(ctx context.Context, enterpriseID string,
ret := _m.Called(ctx, enterpriseID, param)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) (params.Pool, error)); ok {
return rf(ctx, enterpriseID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
r0 = rf(ctx, enterpriseID, param)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
r1 = rf(ctx, enterpriseID, param)
} else {
@ -96,13 +105,16 @@ func (_m *Store) CreateInstance(ctx context.Context, poolID string, param params
ret := _m.Called(ctx, poolID, param)
var r0 params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreateInstanceParams) (params.Instance, error)); ok {
return rf(ctx, poolID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreateInstanceParams) params.Instance); ok {
r0 = rf(ctx, poolID, param)
} else {
r0 = ret.Get(0).(params.Instance)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreateInstanceParams) error); ok {
r1 = rf(ctx, poolID, param)
} else {
@ -117,13 +129,16 @@ func (_m *Store) CreateOrganization(ctx context.Context, name string, credential
ret := _m.Called(ctx, name, credentialsName, webhookSecret)
var r0 params.Organization
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (params.Organization, error)); ok {
return rf(ctx, name, credentialsName, webhookSecret)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string) params.Organization); ok {
r0 = rf(ctx, name, credentialsName, webhookSecret)
} else {
r0 = ret.Get(0).(params.Organization)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
r1 = rf(ctx, name, credentialsName, webhookSecret)
} else {
@ -138,13 +153,16 @@ func (_m *Store) CreateOrganizationPool(ctx context.Context, orgId string, param
ret := _m.Called(ctx, orgId, param)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) (params.Pool, error)); ok {
return rf(ctx, orgId, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
r0 = rf(ctx, orgId, param)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
r1 = rf(ctx, orgId, param)
} else {
@ -159,13 +177,16 @@ func (_m *Store) CreateRepository(ctx context.Context, owner string, name string
ret := _m.Called(ctx, owner, name, credentialsName, webhookSecret)
var r0 params.Repository
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) (params.Repository, error)); ok {
return rf(ctx, owner, name, credentialsName, webhookSecret)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, string, string) params.Repository); ok {
r0 = rf(ctx, owner, name, credentialsName, webhookSecret)
} else {
r0 = ret.Get(0).(params.Repository)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, string, string) error); ok {
r1 = rf(ctx, owner, name, credentialsName, webhookSecret)
} else {
@ -180,13 +201,16 @@ func (_m *Store) CreateRepositoryPool(ctx context.Context, repoId string, param
ret := _m.Called(ctx, repoId, param)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) (params.Pool, error)); ok {
return rf(ctx, repoId, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.CreatePoolParams) params.Pool); ok {
r0 = rf(ctx, repoId, param)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.CreatePoolParams) error); ok {
r1 = rf(ctx, repoId, param)
} else {
@ -201,13 +225,16 @@ func (_m *Store) CreateUser(ctx context.Context, user params.NewUserParams) (par
ret := _m.Called(ctx, user)
var r0 params.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, params.NewUserParams) (params.User, error)); ok {
return rf(ctx, user)
}
if rf, ok := ret.Get(0).(func(context.Context, params.NewUserParams) params.User); ok {
r0 = rf(ctx, user)
} else {
r0 = ret.Get(0).(params.User)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, params.NewUserParams) error); ok {
r1 = rf(ctx, user)
} else {
@ -334,13 +361,16 @@ func (_m *Store) FindEnterprisePoolByTags(ctx context.Context, enterpriseID stri
ret := _m.Called(ctx, enterpriseID, tags)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) (params.Pool, error)); ok {
return rf(ctx, enterpriseID, tags)
}
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
r0 = rf(ctx, enterpriseID, tags)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
r1 = rf(ctx, enterpriseID, tags)
} else {
@ -355,13 +385,16 @@ func (_m *Store) FindOrganizationPoolByTags(ctx context.Context, orgID string, t
ret := _m.Called(ctx, orgID, tags)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) (params.Pool, error)); ok {
return rf(ctx, orgID, tags)
}
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
r0 = rf(ctx, orgID, tags)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
r1 = rf(ctx, orgID, tags)
} else {
@ -376,13 +409,16 @@ func (_m *Store) FindRepositoryPoolByTags(ctx context.Context, repoID string, ta
ret := _m.Called(ctx, repoID, tags)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, []string) (params.Pool, error)); ok {
return rf(ctx, repoID, tags)
}
if rf, ok := ret.Get(0).(func(context.Context, string, []string) params.Pool); ok {
r0 = rf(ctx, repoID, tags)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, []string) error); ok {
r1 = rf(ctx, repoID, tags)
} else {
@ -397,13 +433,16 @@ func (_m *Store) GetEnterprise(ctx context.Context, name string) (params.Enterpr
ret := _m.Called(ctx, name)
var r0 params.Enterprise
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Enterprise, error)); ok {
return rf(ctx, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.Enterprise); ok {
r0 = rf(ctx, name)
} else {
r0 = ret.Get(0).(params.Enterprise)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, name)
} else {
@ -418,13 +457,16 @@ func (_m *Store) GetEnterpriseByID(ctx context.Context, enterpriseID string) (pa
ret := _m.Called(ctx, enterpriseID)
var r0 params.Enterprise
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Enterprise, error)); ok {
return rf(ctx, enterpriseID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.Enterprise); ok {
r0 = rf(ctx, enterpriseID)
} else {
r0 = ret.Get(0).(params.Enterprise)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, enterpriseID)
} else {
@ -439,13 +481,16 @@ func (_m *Store) GetEnterprisePool(ctx context.Context, enterpriseID string, poo
ret := _m.Called(ctx, enterpriseID, poolID)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Pool, error)); ok {
return rf(ctx, enterpriseID, poolID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
r0 = rf(ctx, enterpriseID, poolID)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, enterpriseID, poolID)
} else {
@ -460,13 +505,16 @@ func (_m *Store) GetInstanceByName(ctx context.Context, instanceName string) (pa
ret := _m.Called(ctx, instanceName)
var r0 params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Instance, error)); ok {
return rf(ctx, instanceName)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.Instance); ok {
r0 = rf(ctx, instanceName)
} else {
r0 = ret.Get(0).(params.Instance)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, instanceName)
} else {
@ -481,13 +529,16 @@ func (_m *Store) GetOrganization(ctx context.Context, name string) (params.Organ
ret := _m.Called(ctx, name)
var r0 params.Organization
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Organization, error)); ok {
return rf(ctx, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.Organization); ok {
r0 = rf(ctx, name)
} else {
r0 = ret.Get(0).(params.Organization)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, name)
} else {
@ -502,13 +553,16 @@ func (_m *Store) GetOrganizationByID(ctx context.Context, orgID string) (params.
ret := _m.Called(ctx, orgID)
var r0 params.Organization
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Organization, error)); ok {
return rf(ctx, orgID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.Organization); ok {
r0 = rf(ctx, orgID)
} else {
r0 = ret.Get(0).(params.Organization)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, orgID)
} else {
@ -523,13 +577,16 @@ func (_m *Store) GetOrganizationPool(ctx context.Context, orgID string, poolID s
ret := _m.Called(ctx, orgID, poolID)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Pool, error)); ok {
return rf(ctx, orgID, poolID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
r0 = rf(ctx, orgID, poolID)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, orgID, poolID)
} else {
@ -544,13 +601,16 @@ func (_m *Store) GetPoolByID(ctx context.Context, poolID string) (params.Pool, e
ret := _m.Called(ctx, poolID)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Pool, error)); ok {
return rf(ctx, poolID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.Pool); ok {
r0 = rf(ctx, poolID)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, poolID)
} else {
@ -565,13 +625,16 @@ func (_m *Store) GetPoolInstanceByName(ctx context.Context, poolID string, insta
ret := _m.Called(ctx, poolID, instanceName)
var r0 params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Instance, error)); ok {
return rf(ctx, poolID, instanceName)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Instance); ok {
r0 = rf(ctx, poolID, instanceName)
} else {
r0 = ret.Get(0).(params.Instance)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, poolID, instanceName)
} else {
@ -586,13 +649,16 @@ func (_m *Store) GetRepository(ctx context.Context, owner string, name string) (
ret := _m.Called(ctx, owner, name)
var r0 params.Repository
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Repository, error)); ok {
return rf(ctx, owner, name)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Repository); ok {
r0 = rf(ctx, owner, name)
} else {
r0 = ret.Get(0).(params.Repository)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, owner, name)
} else {
@ -607,13 +673,16 @@ func (_m *Store) GetRepositoryByID(ctx context.Context, repoID string) (params.R
ret := _m.Called(ctx, repoID)
var r0 params.Repository
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.Repository, error)); ok {
return rf(ctx, repoID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.Repository); ok {
r0 = rf(ctx, repoID)
} else {
r0 = ret.Get(0).(params.Repository)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, repoID)
} else {
@ -628,13 +697,16 @@ func (_m *Store) GetRepositoryPool(ctx context.Context, repoID string, poolID st
ret := _m.Called(ctx, repoID, poolID)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string) (params.Pool, error)); ok {
return rf(ctx, repoID, poolID)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string) params.Pool); ok {
r0 = rf(ctx, repoID, poolID)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
r1 = rf(ctx, repoID, poolID)
} else {
@ -649,13 +721,16 @@ func (_m *Store) GetUser(ctx context.Context, user string) (params.User, error)
ret := _m.Called(ctx, user)
var r0 params.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.User, error)); ok {
return rf(ctx, user)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.User); ok {
r0 = rf(ctx, user)
} else {
r0 = ret.Get(0).(params.User)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, user)
} else {
@ -670,13 +745,16 @@ func (_m *Store) GetUserByID(ctx context.Context, userID string) (params.User, e
ret := _m.Called(ctx, userID)
var r0 params.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (params.User, error)); ok {
return rf(ctx, userID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) params.User); ok {
r0 = rf(ctx, userID)
} else {
r0 = ret.Get(0).(params.User)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, userID)
} else {
@ -705,13 +783,16 @@ func (_m *Store) InitController() (params.ControllerInfo, error) {
ret := _m.Called()
var r0 params.ControllerInfo
var r1 error
if rf, ok := ret.Get(0).(func() (params.ControllerInfo, error)); ok {
return rf()
}
if rf, ok := ret.Get(0).(func() params.ControllerInfo); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(params.ControllerInfo)
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
@ -726,6 +807,10 @@ func (_m *Store) ListAllInstances(ctx context.Context) ([]params.Instance, error
ret := _m.Called(ctx)
var r0 []params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Instance, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []params.Instance); ok {
r0 = rf(ctx)
} else {
@ -734,7 +819,6 @@ func (_m *Store) ListAllInstances(ctx context.Context) ([]params.Instance, error
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
@ -749,6 +833,10 @@ func (_m *Store) ListAllPools(ctx context.Context) ([]params.Pool, error) {
ret := _m.Called(ctx)
var r0 []params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Pool, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []params.Pool); ok {
r0 = rf(ctx)
} else {
@ -757,7 +845,6 @@ func (_m *Store) ListAllPools(ctx context.Context) ([]params.Pool, error) {
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
@ -772,6 +859,10 @@ func (_m *Store) ListEnterpriseInstances(ctx context.Context, enterpriseID strin
ret := _m.Called(ctx, enterpriseID)
var r0 []params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
return rf(ctx, enterpriseID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
r0 = rf(ctx, enterpriseID)
} else {
@ -780,7 +871,6 @@ func (_m *Store) ListEnterpriseInstances(ctx context.Context, enterpriseID strin
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, enterpriseID)
} else {
@ -795,6 +885,10 @@ func (_m *Store) ListEnterprisePools(ctx context.Context, enterpriseID string) (
ret := _m.Called(ctx, enterpriseID)
var r0 []params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Pool, error)); ok {
return rf(ctx, enterpriseID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
r0 = rf(ctx, enterpriseID)
} else {
@ -803,7 +897,6 @@ func (_m *Store) ListEnterprisePools(ctx context.Context, enterpriseID string) (
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, enterpriseID)
} else {
@ -818,6 +911,10 @@ func (_m *Store) ListEnterprises(ctx context.Context) ([]params.Enterprise, erro
ret := _m.Called(ctx)
var r0 []params.Enterprise
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Enterprise, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []params.Enterprise); ok {
r0 = rf(ctx)
} else {
@ -826,7 +923,6 @@ func (_m *Store) ListEnterprises(ctx context.Context) ([]params.Enterprise, erro
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
@ -836,11 +932,41 @@ func (_m *Store) ListEnterprises(ctx context.Context) ([]params.Enterprise, erro
return r0, r1
}
// ListInstanceEvents provides a mock function with given fields: ctx, instanceID, eventType, eventLevel
func (_m *Store) ListInstanceEvents(ctx context.Context, instanceID string, eventType params.EventType, eventLevel params.EventLevel) ([]params.StatusMessage, error) {
ret := _m.Called(ctx, instanceID, eventType, eventLevel)
var r0 []params.StatusMessage
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, params.EventLevel) ([]params.StatusMessage, error)); ok {
return rf(ctx, instanceID, eventType, eventLevel)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.EventType, params.EventLevel) []params.StatusMessage); ok {
r0 = rf(ctx, instanceID, eventType, eventLevel)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]params.StatusMessage)
}
}
if rf, ok := ret.Get(1).(func(context.Context, string, params.EventType, params.EventLevel) error); ok {
r1 = rf(ctx, instanceID, eventType, eventLevel)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ListOrgInstances provides a mock function with given fields: ctx, orgID
func (_m *Store) ListOrgInstances(ctx context.Context, orgID string) ([]params.Instance, error) {
ret := _m.Called(ctx, orgID)
var r0 []params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
return rf(ctx, orgID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
r0 = rf(ctx, orgID)
} else {
@ -849,7 +975,6 @@ func (_m *Store) ListOrgInstances(ctx context.Context, orgID string) ([]params.I
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, orgID)
} else {
@ -864,6 +989,10 @@ func (_m *Store) ListOrgPools(ctx context.Context, orgID string) ([]params.Pool,
ret := _m.Called(ctx, orgID)
var r0 []params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Pool, error)); ok {
return rf(ctx, orgID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
r0 = rf(ctx, orgID)
} else {
@ -872,7 +1001,6 @@ func (_m *Store) ListOrgPools(ctx context.Context, orgID string) ([]params.Pool,
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, orgID)
} else {
@ -887,6 +1015,10 @@ func (_m *Store) ListOrganizations(ctx context.Context) ([]params.Organization,
ret := _m.Called(ctx)
var r0 []params.Organization
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Organization, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []params.Organization); ok {
r0 = rf(ctx)
} else {
@ -895,7 +1027,6 @@ func (_m *Store) ListOrganizations(ctx context.Context) ([]params.Organization,
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
@ -910,6 +1041,10 @@ func (_m *Store) ListPoolInstances(ctx context.Context, poolID string) ([]params
ret := _m.Called(ctx, poolID)
var r0 []params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
return rf(ctx, poolID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
r0 = rf(ctx, poolID)
} else {
@ -918,7 +1053,6 @@ func (_m *Store) ListPoolInstances(ctx context.Context, poolID string) ([]params
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, poolID)
} else {
@ -933,6 +1067,10 @@ func (_m *Store) ListRepoInstances(ctx context.Context, repoID string) ([]params
ret := _m.Called(ctx, repoID)
var r0 []params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Instance, error)); ok {
return rf(ctx, repoID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Instance); ok {
r0 = rf(ctx, repoID)
} else {
@ -941,7 +1079,6 @@ func (_m *Store) ListRepoInstances(ctx context.Context, repoID string) ([]params
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, repoID)
} else {
@ -956,6 +1093,10 @@ func (_m *Store) ListRepoPools(ctx context.Context, repoID string) ([]params.Poo
ret := _m.Called(ctx, repoID)
var r0 []params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) ([]params.Pool, error)); ok {
return rf(ctx, repoID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) []params.Pool); ok {
r0 = rf(ctx, repoID)
} else {
@ -964,7 +1105,6 @@ func (_m *Store) ListRepoPools(ctx context.Context, repoID string) ([]params.Poo
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, repoID)
} else {
@ -979,6 +1119,10 @@ func (_m *Store) ListRepositories(ctx context.Context) ([]params.Repository, err
ret := _m.Called(ctx)
var r0 []params.Repository
var r1 error
if rf, ok := ret.Get(0).(func(context.Context) ([]params.Repository, error)); ok {
return rf(ctx)
}
if rf, ok := ret.Get(0).(func(context.Context) []params.Repository); ok {
r0 = rf(ctx)
} else {
@ -987,7 +1131,6 @@ func (_m *Store) ListRepositories(ctx context.Context) ([]params.Repository, err
}
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context) error); ok {
r1 = rf(ctx)
} else {
@ -1002,13 +1145,16 @@ func (_m *Store) PoolInstanceCount(ctx context.Context, poolID string) (int64, e
ret := _m.Called(ctx, poolID)
var r0 int64
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string) (int64, error)); ok {
return rf(ctx, poolID)
}
if rf, ok := ret.Get(0).(func(context.Context, string) int64); ok {
r0 = rf(ctx, poolID)
} else {
r0 = ret.Get(0).(int64)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
r1 = rf(ctx, poolID)
} else {
@ -1023,13 +1169,16 @@ func (_m *Store) UpdateEnterprise(ctx context.Context, enterpriseID string, para
ret := _m.Called(ctx, enterpriseID, param)
var r0 params.Enterprise
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) (params.Enterprise, error)); ok {
return rf(ctx, enterpriseID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Enterprise); ok {
r0 = rf(ctx, enterpriseID, param)
} else {
r0 = ret.Get(0).(params.Enterprise)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
r1 = rf(ctx, enterpriseID, param)
} else {
@ -1044,13 +1193,16 @@ func (_m *Store) UpdateEnterprisePool(ctx context.Context, enterpriseID string,
ret := _m.Called(ctx, enterpriseID, poolID, param)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) (params.Pool, error)); ok {
return rf(ctx, enterpriseID, poolID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
r0 = rf(ctx, enterpriseID, poolID, param)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
r1 = rf(ctx, enterpriseID, poolID, param)
} else {
@ -1065,13 +1217,16 @@ func (_m *Store) UpdateInstance(ctx context.Context, instanceID string, param pa
ret := _m.Called(ctx, instanceID, param)
var r0 params.Instance
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) (params.Instance, error)); ok {
return rf(ctx, instanceID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateInstanceParams) params.Instance); ok {
r0 = rf(ctx, instanceID, param)
} else {
r0 = ret.Get(0).(params.Instance)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateInstanceParams) error); ok {
r1 = rf(ctx, instanceID, param)
} else {
@ -1086,13 +1241,16 @@ func (_m *Store) UpdateOrganization(ctx context.Context, orgID string, param par
ret := _m.Called(ctx, orgID, param)
var r0 params.Organization
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) (params.Organization, error)); ok {
return rf(ctx, orgID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Organization); ok {
r0 = rf(ctx, orgID, param)
} else {
r0 = ret.Get(0).(params.Organization)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
r1 = rf(ctx, orgID, param)
} else {
@ -1107,13 +1265,16 @@ func (_m *Store) UpdateOrganizationPool(ctx context.Context, orgID string, poolI
ret := _m.Called(ctx, orgID, poolID, param)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) (params.Pool, error)); ok {
return rf(ctx, orgID, poolID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
r0 = rf(ctx, orgID, poolID, param)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
r1 = rf(ctx, orgID, poolID, param)
} else {
@ -1128,13 +1289,16 @@ func (_m *Store) UpdateRepository(ctx context.Context, repoID string, param para
ret := _m.Called(ctx, repoID, param)
var r0 params.Repository
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) (params.Repository, error)); ok {
return rf(ctx, repoID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateRepositoryParams) params.Repository); ok {
r0 = rf(ctx, repoID, param)
} else {
r0 = ret.Get(0).(params.Repository)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateRepositoryParams) error); ok {
r1 = rf(ctx, repoID, param)
} else {
@ -1149,13 +1313,16 @@ func (_m *Store) UpdateRepositoryPool(ctx context.Context, repoID string, poolID
ret := _m.Called(ctx, repoID, poolID, param)
var r0 params.Pool
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) (params.Pool, error)); ok {
return rf(ctx, repoID, poolID, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, string, params.UpdatePoolParams) params.Pool); ok {
r0 = rf(ctx, repoID, poolID, param)
} else {
r0 = ret.Get(0).(params.Pool)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, string, params.UpdatePoolParams) error); ok {
r1 = rf(ctx, repoID, poolID, param)
} else {
@ -1170,13 +1337,16 @@ func (_m *Store) UpdateUser(ctx context.Context, user string, param params.Updat
ret := _m.Called(ctx, user, param)
var r0 params.User
var r1 error
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateUserParams) (params.User, error)); ok {
return rf(ctx, user, param)
}
if rf, ok := ret.Get(0).(func(context.Context, string, params.UpdateUserParams) params.User); ok {
r0 = rf(ctx, user, param)
} else {
r0 = ret.Get(0).(params.User)
}
var r1 error
if rf, ok := ret.Get(1).(func(context.Context, string, params.UpdateUserParams) error); ok {
r1 = rf(ctx, user, param)
} else {