2024-03-10 15:21:39 +00:00
// Code generated by mockery v2.42.0. DO NOT EDIT.
2022-08-01 12:14:38 +03:00
package mocks
import (
context "context"
2023-03-12 16:01:49 +02:00
params "github.com/cloudbase/garm/params"
2022-08-01 12:14:38 +03:00
mock "github.com/stretchr/testify/mock"
)
// Store is an autogenerated mock type for the Store type
type Store struct {
mock . Mock
}
2024-03-30 18:22:06 +00:00
// AddInstanceEvent provides a mock function with given fields: ctx, instanceName, event, eventLevel, eventMessage
func ( _m * Store ) AddInstanceEvent ( ctx context . Context , instanceName string , event params . EventType , eventLevel params . EventLevel , eventMessage string ) error {
ret := _m . Called ( ctx , instanceName , event , eventLevel , eventMessage )
2022-08-01 12:14:38 +03:00
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for AddInstanceEvent" )
}
2022-08-01 12:14:38 +03:00
var r0 error
2023-03-12 16:01:49 +02:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . EventType , params . EventLevel , string ) error ) ; ok {
2024-03-30 18:22:06 +00:00
r0 = rf ( ctx , instanceName , event , eventLevel , eventMessage )
2022-08-01 12:14:38 +03:00
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2023-07-04 22:11:45 +00:00
// BreakLockJobIsQueued provides a mock function with given fields: ctx, jobID
func ( _m * Store ) BreakLockJobIsQueued ( ctx context . Context , jobID int64 ) error {
ret := _m . Called ( ctx , jobID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for BreakLockJobIsQueued" )
}
2023-07-04 22:11:45 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 ) error ) ; ok {
r0 = rf ( ctx , jobID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-08-01 12:14:38 +03:00
// ControllerInfo provides a mock function with given fields:
func ( _m * Store ) ControllerInfo ( ) ( params . ControllerInfo , error ) {
ret := _m . Called ( )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ControllerInfo" )
}
2022-08-01 12:14:38 +03:00
var r0 params . ControllerInfo
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( ) ( params . ControllerInfo , error ) ) ; ok {
return rf ( )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( ) params . ControllerInfo ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( params . ControllerInfo )
}
if rf , ok := ret . Get ( 1 ) . ( func ( ) error ) ; ok {
r1 = rf ( )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
// CreateEnterprise provides a mock function with given fields: ctx, name, credentialsName, webhookSecret, poolBalancerType
func ( _m * Store ) CreateEnterprise ( ctx context . Context , name string , credentialsName string , webhookSecret string , poolBalancerType params . PoolBalancerType ) ( params . Enterprise , error ) {
ret := _m . Called ( ctx , name , credentialsName , webhookSecret , poolBalancerType )
2022-10-13 16:09:28 +00:00
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for CreateEnterprise" )
}
2022-10-13 16:09:28 +00:00
var r0 params . Enterprise
2023-03-12 16:01:49 +02:00
var r1 error
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string , string , params . PoolBalancerType ) ( params . Enterprise , error ) ) ; ok {
return rf ( ctx , name , credentialsName , webhookSecret , poolBalancerType )
2023-03-12 16:01:49 +02:00
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string , string , params . PoolBalancerType ) params . Enterprise ) ; ok {
r0 = rf ( ctx , name , credentialsName , webhookSecret , poolBalancerType )
2022-10-13 16:09:28 +00:00
} else {
r0 = ret . Get ( 0 ) . ( params . Enterprise )
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , string , string , params . PoolBalancerType ) error ) ; ok {
r1 = rf ( ctx , name , credentialsName , webhookSecret , poolBalancerType )
2022-10-13 16:09:28 +00:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-03-28 18:23:49 +00:00
// CreateEntityPool provides a mock function with given fields: ctx, entity, param
func ( _m * Store ) CreateEntityPool ( ctx context . Context , entity params . GithubEntity , param params . CreatePoolParams ) ( params . Pool , error ) {
ret := _m . Called ( ctx , entity , param )
2022-10-13 16:09:28 +00:00
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
2024-03-28 18:23:49 +00:00
panic ( "no return value specified for CreateEntityPool" )
2024-03-10 15:21:39 +00:00
}
2022-10-13 16:09:28 +00:00
var r0 params . Pool
2023-03-12 16:01:49 +02:00
var r1 error
2024-03-28 18:23:49 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity , params . CreatePoolParams ) ( params . Pool , error ) ) ; ok {
return rf ( ctx , entity , param )
2023-03-12 16:01:49 +02:00
}
2024-03-28 18:23:49 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity , params . CreatePoolParams ) params . Pool ) ; ok {
r0 = rf ( ctx , entity , param )
2022-10-13 16:09:28 +00:00
} else {
r0 = ret . Get ( 0 ) . ( params . Pool )
}
2024-03-28 18:23:49 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . GithubEntity , params . CreatePoolParams ) error ) ; ok {
r1 = rf ( ctx , entity , param )
2022-10-13 16:09:28 +00:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-04-15 08:32:19 +00:00
// CreateGithubCredentials provides a mock function with given fields: ctx, endpointName, param
func ( _m * Store ) CreateGithubCredentials ( ctx context . Context , endpointName string , param params . CreateGithubCredentialsParams ) ( params . GithubCredentials , error ) {
ret := _m . Called ( ctx , endpointName , param )
if len ( ret ) == 0 {
panic ( "no return value specified for CreateGithubCredentials" )
}
var r0 params . GithubCredentials
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . CreateGithubCredentialsParams ) ( params . GithubCredentials , error ) ) ; ok {
return rf ( ctx , endpointName , param )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . CreateGithubCredentialsParams ) params . GithubCredentials ) ; ok {
r0 = rf ( ctx , endpointName , param )
} else {
r0 = ret . Get ( 0 ) . ( params . GithubCredentials )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , params . CreateGithubCredentialsParams ) error ) ; ok {
r1 = rf ( ctx , endpointName , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// CreateGithubEndpoint provides a mock function with given fields: ctx, param
func ( _m * Store ) CreateGithubEndpoint ( ctx context . Context , param params . CreateGithubEndpointParams ) ( params . GithubEndpoint , error ) {
ret := _m . Called ( ctx , param )
if len ( ret ) == 0 {
panic ( "no return value specified for CreateGithubEndpoint" )
}
var r0 params . GithubEndpoint
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . CreateGithubEndpointParams ) ( params . GithubEndpoint , error ) ) ; ok {
return rf ( ctx , param )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . CreateGithubEndpointParams ) params . GithubEndpoint ) ; ok {
r0 = rf ( ctx , param )
} else {
r0 = ret . Get ( 0 ) . ( params . GithubEndpoint )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . CreateGithubEndpointParams ) error ) ; ok {
r1 = rf ( ctx , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-08-01 12:14:38 +03:00
// CreateInstance provides a mock function with given fields: ctx, poolID, param
func ( _m * Store ) CreateInstance ( ctx context . Context , poolID string , param params . CreateInstanceParams ) ( params . Instance , error ) {
ret := _m . Called ( ctx , poolID , param )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for CreateInstance" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . CreateInstanceParams ) ( params . Instance , error ) ) ; ok {
return rf ( ctx , poolID , param )
}
2022-08-01 12:14:38 +03:00
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 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , params . CreateInstanceParams ) error ) ; ok {
r1 = rf ( ctx , poolID , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-04 22:11:45 +00:00
// CreateOrUpdateJob provides a mock function with given fields: ctx, job
func ( _m * Store ) CreateOrUpdateJob ( ctx context . Context , job params . Job ) ( params . Job , error ) {
ret := _m . Called ( ctx , job )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for CreateOrUpdateJob" )
}
2023-07-04 22:11:45 +00:00
var r0 params . Job
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . Job ) ( params . Job , error ) ) ; ok {
return rf ( ctx , job )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . Job ) params . Job ) ; ok {
r0 = rf ( ctx , job )
} else {
r0 = ret . Get ( 0 ) . ( params . Job )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . Job ) error ) ; ok {
r1 = rf ( ctx , job )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
// CreateOrganization provides a mock function with given fields: ctx, name, credentialsName, webhookSecret, poolBalancerType
func ( _m * Store ) CreateOrganization ( ctx context . Context , name string , credentialsName string , webhookSecret string , poolBalancerType params . PoolBalancerType ) ( params . Organization , error ) {
ret := _m . Called ( ctx , name , credentialsName , webhookSecret , poolBalancerType )
2022-08-01 12:14:38 +03:00
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for CreateOrganization" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Organization
2023-03-12 16:01:49 +02:00
var r1 error
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string , string , params . PoolBalancerType ) ( params . Organization , error ) ) ; ok {
return rf ( ctx , name , credentialsName , webhookSecret , poolBalancerType )
2023-03-12 16:01:49 +02:00
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string , string , params . PoolBalancerType ) params . Organization ) ; ok {
r0 = rf ( ctx , name , credentialsName , webhookSecret , poolBalancerType )
2022-08-01 12:14:38 +03:00
} else {
r0 = ret . Get ( 0 ) . ( params . Organization )
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , string , string , params . PoolBalancerType ) error ) ; ok {
r1 = rf ( ctx , name , credentialsName , webhookSecret , poolBalancerType )
2022-08-01 12:14:38 +03:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
// CreateRepository provides a mock function with given fields: ctx, owner, name, credentialsName, webhookSecret, poolBalancerType
func ( _m * Store ) CreateRepository ( ctx context . Context , owner string , name string , credentialsName string , webhookSecret string , poolBalancerType params . PoolBalancerType ) ( params . Repository , error ) {
ret := _m . Called ( ctx , owner , name , credentialsName , webhookSecret , poolBalancerType )
2022-08-01 12:14:38 +03:00
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for CreateRepository" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Repository
2023-03-12 16:01:49 +02:00
var r1 error
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string , string , string , params . PoolBalancerType ) ( params . Repository , error ) ) ; ok {
return rf ( ctx , owner , name , credentialsName , webhookSecret , poolBalancerType )
2023-03-12 16:01:49 +02:00
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string , string , string , params . PoolBalancerType ) params . Repository ) ; ok {
r0 = rf ( ctx , owner , name , credentialsName , webhookSecret , poolBalancerType )
2022-08-01 12:14:38 +03:00
} else {
r0 = ret . Get ( 0 ) . ( params . Repository )
}
Add pool balancing strategy
This change adds the ability to specify the pool balancing strategy to
use when processing queued jobs. Before this change, GARM would round-robin
through all pools that matched the set of tags requested by queued jobs.
When round-robin (default) is used for an entity (repo, org or enterprise)
and you have 2 pools defined for that entity with a common set of tags that
match 10 jobs (for example), then those jobs would trigger the creation of
a new runner in each of the two pools in turn. Job 1 would go to pool 1,
job 2 would go to pool 2, job 3 to pool 1, job 4 to pool 2 and so on.
When "stack" is used, those same 10 jobs would trigger the creation of a
new runner in the pool with the highest priority, every time.
In both cases, if a pool is full, the next one would be tried automatically.
For the stack case, this would mean that if pool 2 had a priority of 10 and
pool 1 would have a priority of 5, pool 2 would be saturated first, then
pool 1.
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
2024-03-14 20:04:34 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , string , string , string , params . PoolBalancerType ) error ) ; ok {
r1 = rf ( ctx , owner , name , credentialsName , webhookSecret , poolBalancerType )
2022-08-01 12:14:38 +03:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// CreateUser provides a mock function with given fields: ctx, user
func ( _m * Store ) CreateUser ( ctx context . Context , user params . NewUserParams ) ( params . User , error ) {
ret := _m . Called ( ctx , user )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for CreateUser" )
}
2022-08-01 12:14:38 +03:00
var r0 params . User
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . NewUserParams ) ( params . User , error ) ) ; ok {
return rf ( ctx , user )
}
2022-08-01 12:14:38 +03:00
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 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . NewUserParams ) error ) ; ok {
r1 = rf ( ctx , user )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-04 22:11:45 +00:00
// DeleteCompletedJobs provides a mock function with given fields: ctx
func ( _m * Store ) DeleteCompletedJobs ( ctx context . Context ) error {
ret := _m . Called ( ctx )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteCompletedJobs" )
}
2023-07-04 22:11:45 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) error ) ; ok {
r0 = rf ( ctx )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-10-13 16:09:28 +00:00
// DeleteEnterprise provides a mock function with given fields: ctx, enterpriseID
func ( _m * Store ) DeleteEnterprise ( ctx context . Context , enterpriseID string ) error {
ret := _m . Called ( ctx , enterpriseID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteEnterprise" )
}
2022-10-13 16:09:28 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , enterpriseID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2024-03-28 18:23:49 +00:00
// DeleteEntityPool provides a mock function with given fields: ctx, entity, poolID
func ( _m * Store ) DeleteEntityPool ( ctx context . Context , entity params . GithubEntity , poolID string ) error {
ret := _m . Called ( ctx , entity , poolID )
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteEntityPool" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity , string ) error ) ; ok {
r0 = rf ( ctx , entity , poolID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2024-04-15 08:32:19 +00:00
// DeleteGithubCredentials provides a mock function with given fields: ctx, id
func ( _m * Store ) DeleteGithubCredentials ( ctx context . Context , id uint ) error {
ret := _m . Called ( ctx , id )
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteGithubCredentials" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , uint ) error ) ; ok {
r0 = rf ( ctx , id )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// DeleteGithubEndpoint provides a mock function with given fields: ctx, name
func ( _m * Store ) DeleteGithubEndpoint ( ctx context . Context , name string ) error {
ret := _m . Called ( ctx , name )
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteGithubEndpoint" )
}
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , name )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-08-01 12:14:38 +03:00
// DeleteInstance provides a mock function with given fields: ctx, poolID, instanceName
func ( _m * Store ) DeleteInstance ( ctx context . Context , poolID string , instanceName string ) error {
ret := _m . Called ( ctx , poolID , instanceName )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteInstance" )
}
2022-08-01 12:14:38 +03:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string ) error ) ; ok {
r0 = rf ( ctx , poolID , instanceName )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2023-07-04 22:11:45 +00:00
// DeleteJob provides a mock function with given fields: ctx, jobID
func ( _m * Store ) DeleteJob ( ctx context . Context , jobID int64 ) error {
ret := _m . Called ( ctx , jobID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteJob" )
}
2023-07-04 22:11:45 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 ) error ) ; ok {
r0 = rf ( ctx , jobID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-08-01 12:14:38 +03:00
// DeleteOrganization provides a mock function with given fields: ctx, orgID
func ( _m * Store ) DeleteOrganization ( ctx context . Context , orgID string ) error {
ret := _m . Called ( ctx , orgID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteOrganization" )
}
2022-08-01 12:14:38 +03:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , orgID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// DeletePoolByID provides a mock function with given fields: ctx, poolID
func ( _m * Store ) DeletePoolByID ( ctx context . Context , poolID string ) error {
ret := _m . Called ( ctx , poolID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for DeletePoolByID" )
}
2022-08-01 12:14:38 +03:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , poolID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// DeleteRepository provides a mock function with given fields: ctx, repoID
func ( _m * Store ) DeleteRepository ( ctx context . Context , repoID string ) error {
ret := _m . Called ( ctx , repoID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for DeleteRepository" )
}
2022-08-01 12:14:38 +03:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) error ) ; ok {
r0 = rf ( ctx , repoID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2023-07-04 22:11:45 +00:00
// FindPoolsMatchingAllTags provides a mock function with given fields: ctx, entityType, entityID, tags
2024-03-17 05:59:47 +00:00
func ( _m * Store ) FindPoolsMatchingAllTags ( ctx context . Context , entityType params . GithubEntityType , entityID string , tags [ ] string ) ( [ ] params . Pool , error ) {
2023-07-04 22:11:45 +00:00
ret := _m . Called ( ctx , entityType , entityID , tags )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for FindPoolsMatchingAllTags" )
}
2023-07-04 22:11:45 +00:00
var r0 [ ] params . Pool
var r1 error
2024-03-17 05:59:47 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntityType , string , [ ] string ) ( [ ] params . Pool , error ) ) ; ok {
2023-07-04 22:11:45 +00:00
return rf ( ctx , entityType , entityID , tags )
}
2024-03-17 05:59:47 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntityType , string , [ ] string ) [ ] params . Pool ) ; ok {
2023-07-04 22:11:45 +00:00
r0 = rf ( ctx , entityType , entityID , tags )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Pool )
}
}
2024-03-17 05:59:47 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . GithubEntityType , string , [ ] string ) error ) ; ok {
2023-07-04 22:11:45 +00:00
r1 = rf ( ctx , entityType , entityID , tags )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-04-15 08:32:19 +00:00
// GetAdminUser provides a mock function with given fields: ctx
func ( _m * Store ) GetAdminUser ( ctx context . Context ) ( params . User , error ) {
ret := _m . Called ( ctx )
if len ( ret ) == 0 {
panic ( "no return value specified for GetAdminUser" )
}
var r0 params . User
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( params . User , error ) ) ; ok {
return rf ( ctx )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) params . User ) ; ok {
r0 = rf ( ctx )
} else {
r0 = ret . Get ( 0 ) . ( params . User )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-10-13 16:09:28 +00:00
// GetEnterprise provides a mock function with given fields: ctx, name
func ( _m * Store ) GetEnterprise ( ctx context . Context , name string ) ( params . Enterprise , error ) {
ret := _m . Called ( ctx , name )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetEnterprise" )
}
2022-10-13 16:09:28 +00:00
var r0 params . Enterprise
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . Enterprise , error ) ) ; ok {
return rf ( ctx , name )
}
2022-10-13 16:09:28 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . Enterprise ) ; ok {
r0 = rf ( ctx , name )
} else {
r0 = ret . Get ( 0 ) . ( params . Enterprise )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , name )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetEnterpriseByID provides a mock function with given fields: ctx, enterpriseID
func ( _m * Store ) GetEnterpriseByID ( ctx context . Context , enterpriseID string ) ( params . Enterprise , error ) {
ret := _m . Called ( ctx , enterpriseID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetEnterpriseByID" )
}
2022-10-13 16:09:28 +00:00
var r0 params . Enterprise
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . Enterprise , error ) ) ; ok {
return rf ( ctx , enterpriseID )
}
2022-10-13 16:09:28 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . Enterprise ) ; ok {
r0 = rf ( ctx , enterpriseID )
} else {
r0 = ret . Get ( 0 ) . ( params . Enterprise )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , enterpriseID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-03-28 18:23:49 +00:00
// GetEntityPool provides a mock function with given fields: ctx, entity, poolID
func ( _m * Store ) GetEntityPool ( ctx context . Context , entity params . GithubEntity , poolID string ) ( params . Pool , error ) {
ret := _m . Called ( ctx , entity , poolID )
2022-10-13 16:09:28 +00:00
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
2024-03-28 18:23:49 +00:00
panic ( "no return value specified for GetEntityPool" )
2024-03-10 15:21:39 +00:00
}
2022-10-13 16:09:28 +00:00
var r0 params . Pool
2023-03-12 16:01:49 +02:00
var r1 error
2024-03-28 18:23:49 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity , string ) ( params . Pool , error ) ) ; ok {
return rf ( ctx , entity , poolID )
2023-03-12 16:01:49 +02:00
}
2024-03-28 18:23:49 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity , string ) params . Pool ) ; ok {
r0 = rf ( ctx , entity , poolID )
2022-10-13 16:09:28 +00:00
} else {
r0 = ret . Get ( 0 ) . ( params . Pool )
}
2024-03-28 18:23:49 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . GithubEntity , string ) error ) ; ok {
r1 = rf ( ctx , entity , poolID )
2022-10-13 16:09:28 +00:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-04-15 08:32:19 +00:00
// GetGithubCredentials provides a mock function with given fields: ctx, id, detailed
func ( _m * Store ) GetGithubCredentials ( ctx context . Context , id uint , detailed bool ) ( params . GithubCredentials , error ) {
ret := _m . Called ( ctx , id , detailed )
if len ( ret ) == 0 {
panic ( "no return value specified for GetGithubCredentials" )
}
var r0 params . GithubCredentials
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , uint , bool ) ( params . GithubCredentials , error ) ) ; ok {
return rf ( ctx , id , detailed )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , uint , bool ) params . GithubCredentials ) ; ok {
r0 = rf ( ctx , id , detailed )
} else {
r0 = ret . Get ( 0 ) . ( params . GithubCredentials )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , uint , bool ) error ) ; ok {
r1 = rf ( ctx , id , detailed )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetGithubCredentialsByName provides a mock function with given fields: ctx, name, detailed
func ( _m * Store ) GetGithubCredentialsByName ( ctx context . Context , name string , detailed bool ) ( params . GithubCredentials , error ) {
ret := _m . Called ( ctx , name , detailed )
if len ( ret ) == 0 {
panic ( "no return value specified for GetGithubCredentialsByName" )
}
var r0 params . GithubCredentials
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , bool ) ( params . GithubCredentials , error ) ) ; ok {
return rf ( ctx , name , detailed )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , bool ) params . GithubCredentials ) ; ok {
r0 = rf ( ctx , name , detailed )
} else {
r0 = ret . Get ( 0 ) . ( params . GithubCredentials )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , bool ) error ) ; ok {
r1 = rf ( ctx , name , detailed )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetGithubEndpoint provides a mock function with given fields: ctx, name
func ( _m * Store ) GetGithubEndpoint ( ctx context . Context , name string ) ( params . GithubEndpoint , error ) {
ret := _m . Called ( ctx , name )
if len ( ret ) == 0 {
panic ( "no return value specified for GetGithubEndpoint" )
}
var r0 params . GithubEndpoint
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . GithubEndpoint , error ) ) ; ok {
return rf ( ctx , name )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . GithubEndpoint ) ; ok {
r0 = rf ( ctx , name )
} else {
r0 = ret . Get ( 0 ) . ( params . GithubEndpoint )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , name )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-08-01 12:14:38 +03:00
// GetInstanceByName provides a mock function with given fields: ctx, instanceName
func ( _m * Store ) GetInstanceByName ( ctx context . Context , instanceName string ) ( params . Instance , error ) {
ret := _m . Called ( ctx , instanceName )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetInstanceByName" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . Instance , error ) ) ; ok {
return rf ( ctx , instanceName )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . Instance ) ; ok {
r0 = rf ( ctx , instanceName )
} else {
r0 = ret . Get ( 0 ) . ( params . Instance )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , instanceName )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-04 22:11:45 +00:00
// GetJobByID provides a mock function with given fields: ctx, jobID
func ( _m * Store ) GetJobByID ( ctx context . Context , jobID int64 ) ( params . Job , error ) {
ret := _m . Called ( ctx , jobID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetJobByID" )
}
2023-07-04 22:11:45 +00:00
var r0 params . Job
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 ) ( params . Job , error ) ) ; ok {
return rf ( ctx , jobID )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 ) params . Job ) ; ok {
r0 = rf ( ctx , jobID )
} else {
r0 = ret . Get ( 0 ) . ( params . Job )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , int64 ) error ) ; ok {
r1 = rf ( ctx , jobID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-08-01 12:14:38 +03:00
// GetOrganization provides a mock function with given fields: ctx, name
func ( _m * Store ) GetOrganization ( ctx context . Context , name string ) ( params . Organization , error ) {
ret := _m . Called ( ctx , name )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetOrganization" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Organization
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . Organization , error ) ) ; ok {
return rf ( ctx , name )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . Organization ) ; ok {
r0 = rf ( ctx , name )
} else {
r0 = ret . Get ( 0 ) . ( params . Organization )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , name )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetOrganizationByID provides a mock function with given fields: ctx, orgID
func ( _m * Store ) GetOrganizationByID ( ctx context . Context , orgID string ) ( params . Organization , error ) {
ret := _m . Called ( ctx , orgID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetOrganizationByID" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Organization
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . Organization , error ) ) ; ok {
return rf ( ctx , orgID )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . Organization ) ; ok {
r0 = rf ( ctx , orgID )
} else {
r0 = ret . Get ( 0 ) . ( params . Organization )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , orgID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetPoolByID provides a mock function with given fields: ctx, poolID
func ( _m * Store ) GetPoolByID ( ctx context . Context , poolID string ) ( params . Pool , error ) {
ret := _m . Called ( ctx , poolID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetPoolByID" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Pool
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . Pool , error ) ) ; ok {
return rf ( ctx , poolID )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . Pool ) ; ok {
r0 = rf ( ctx , poolID )
} else {
r0 = ret . Get ( 0 ) . ( params . Pool )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , poolID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetPoolInstanceByName provides a mock function with given fields: ctx, poolID, instanceName
func ( _m * Store ) GetPoolInstanceByName ( ctx context . Context , poolID string , instanceName string ) ( params . Instance , error ) {
ret := _m . Called ( ctx , poolID , instanceName )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetPoolInstanceByName" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string ) ( params . Instance , error ) ) ; ok {
return rf ( ctx , poolID , instanceName )
}
2022-08-01 12:14:38 +03:00
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 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , string ) error ) ; ok {
r1 = rf ( ctx , poolID , instanceName )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetRepository provides a mock function with given fields: ctx, owner, name
func ( _m * Store ) GetRepository ( ctx context . Context , owner string , name string ) ( params . Repository , error ) {
ret := _m . Called ( ctx , owner , name )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetRepository" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Repository
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , string ) ( params . Repository , error ) ) ; ok {
return rf ( ctx , owner , name )
}
2022-08-01 12:14:38 +03:00
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 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , string ) error ) ; ok {
r1 = rf ( ctx , owner , name )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetRepositoryByID provides a mock function with given fields: ctx, repoID
func ( _m * Store ) GetRepositoryByID ( ctx context . Context , repoID string ) ( params . Repository , error ) {
ret := _m . Called ( ctx , repoID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetRepositoryByID" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Repository
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . Repository , error ) ) ; ok {
return rf ( ctx , repoID )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . Repository ) ; ok {
r0 = rf ( ctx , repoID )
} else {
r0 = ret . Get ( 0 ) . ( params . Repository )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , repoID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetUser provides a mock function with given fields: ctx, user
func ( _m * Store ) GetUser ( ctx context . Context , user string ) ( params . User , error ) {
ret := _m . Called ( ctx , user )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetUser" )
}
2022-08-01 12:14:38 +03:00
var r0 params . User
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . User , error ) ) ; ok {
return rf ( ctx , user )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . User ) ; ok {
r0 = rf ( ctx , user )
} else {
r0 = ret . Get ( 0 ) . ( params . User )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , user )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// GetUserByID provides a mock function with given fields: ctx, userID
func ( _m * Store ) GetUserByID ( ctx context . Context , userID string ) ( params . User , error ) {
ret := _m . Called ( ctx , userID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for GetUserByID" )
}
2022-08-01 12:14:38 +03:00
var r0 params . User
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( params . User , error ) ) ; ok {
return rf ( ctx , userID )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) params . User ) ; ok {
r0 = rf ( ctx , userID )
} else {
r0 = ret . Get ( 0 ) . ( params . User )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , userID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// HasAdminUser provides a mock function with given fields: ctx
func ( _m * Store ) HasAdminUser ( ctx context . Context ) bool {
ret := _m . Called ( ctx )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for HasAdminUser" )
}
2022-08-01 12:14:38 +03:00
var r0 bool
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) bool ) ; ok {
r0 = rf ( ctx )
} else {
r0 = ret . Get ( 0 ) . ( bool )
}
return r0
}
// InitController provides a mock function with given fields:
func ( _m * Store ) InitController ( ) ( params . ControllerInfo , error ) {
ret := _m . Called ( )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for InitController" )
}
2022-08-01 12:14:38 +03:00
var r0 params . ControllerInfo
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( ) ( params . ControllerInfo , error ) ) ; ok {
return rf ( )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( ) params . ControllerInfo ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( params . ControllerInfo )
}
if rf , ok := ret . Get ( 1 ) . ( func ( ) error ) ; ok {
r1 = rf ( )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// ListAllInstances provides a mock function with given fields: ctx
func ( _m * Store ) ListAllInstances ( ctx context . Context ) ( [ ] params . Instance , error ) {
ret := _m . Called ( ctx )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListAllInstances" )
}
2022-08-01 12:14:38 +03:00
var r0 [ ] params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] params . Instance , error ) ) ; ok {
return rf ( ctx )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) [ ] params . Instance ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Instance )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-04 22:11:45 +00:00
// ListAllJobs provides a mock function with given fields: ctx
func ( _m * Store ) ListAllJobs ( ctx context . Context ) ( [ ] params . Job , error ) {
ret := _m . Called ( ctx )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListAllJobs" )
}
2023-07-04 22:11:45 +00:00
var r0 [ ] params . Job
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] params . Job , error ) ) ; ok {
return rf ( ctx )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) [ ] params . Job ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Job )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-08-01 12:14:38 +03:00
// ListAllPools provides a mock function with given fields: ctx
func ( _m * Store ) ListAllPools ( ctx context . Context ) ( [ ] params . Pool , error ) {
ret := _m . Called ( ctx )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListAllPools" )
}
2022-08-01 12:14:38 +03:00
var r0 [ ] params . Pool
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] params . Pool , error ) ) ; ok {
return rf ( ctx )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) [ ] params . Pool ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Pool )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-10-13 16:09:28 +00:00
// ListEnterprises provides a mock function with given fields: ctx
func ( _m * Store ) ListEnterprises ( ctx context . Context ) ( [ ] params . Enterprise , error ) {
ret := _m . Called ( ctx )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListEnterprises" )
}
2022-10-13 16:09:28 +00:00
var r0 [ ] params . Enterprise
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] params . Enterprise , error ) ) ; ok {
return rf ( ctx )
}
2022-10-13 16:09:28 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) [ ] params . Enterprise ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Enterprise )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-03-28 18:23:49 +00:00
// ListEntityInstances provides a mock function with given fields: ctx, entity
func ( _m * Store ) ListEntityInstances ( ctx context . Context , entity params . GithubEntity ) ( [ ] params . Instance , error ) {
ret := _m . Called ( ctx , entity )
if len ( ret ) == 0 {
panic ( "no return value specified for ListEntityInstances" )
}
var r0 [ ] params . Instance
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity ) ( [ ] params . Instance , error ) ) ; ok {
return rf ( ctx , entity )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity ) [ ] params . Instance ) ; ok {
r0 = rf ( ctx , entity )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Instance )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . GithubEntity ) error ) ; ok {
r1 = rf ( ctx , entity )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-04 22:11:45 +00:00
// ListEntityJobsByStatus provides a mock function with given fields: ctx, entityType, entityID, status
2024-03-17 05:59:47 +00:00
func ( _m * Store ) ListEntityJobsByStatus ( ctx context . Context , entityType params . GithubEntityType , entityID string , status params . JobStatus ) ( [ ] params . Job , error ) {
2023-07-04 22:11:45 +00:00
ret := _m . Called ( ctx , entityType , entityID , status )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListEntityJobsByStatus" )
}
2023-07-04 22:11:45 +00:00
var r0 [ ] params . Job
var r1 error
2024-03-17 05:59:47 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntityType , string , params . JobStatus ) ( [ ] params . Job , error ) ) ; ok {
2023-07-04 22:11:45 +00:00
return rf ( ctx , entityType , entityID , status )
}
2024-03-17 05:59:47 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntityType , string , params . JobStatus ) [ ] params . Job ) ; ok {
2023-07-04 22:11:45 +00:00
r0 = rf ( ctx , entityType , entityID , status )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Job )
}
}
2024-03-17 05:59:47 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . GithubEntityType , string , params . JobStatus ) error ) ; ok {
2023-07-04 22:11:45 +00:00
r1 = rf ( ctx , entityType , entityID , status )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-03-28 18:23:49 +00:00
// ListEntityPools provides a mock function with given fields: ctx, entity
func ( _m * Store ) ListEntityPools ( ctx context . Context , entity params . GithubEntity ) ( [ ] params . Pool , error ) {
ret := _m . Called ( ctx , entity )
if len ( ret ) == 0 {
panic ( "no return value specified for ListEntityPools" )
}
var r0 [ ] params . Pool
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity ) ( [ ] params . Pool , error ) ) ; ok {
return rf ( ctx , entity )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity ) [ ] params . Pool ) ; ok {
r0 = rf ( ctx , entity )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Pool )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . GithubEntity ) error ) ; ok {
r1 = rf ( ctx , entity )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-04-15 08:32:19 +00:00
// ListGithubCredentials provides a mock function with given fields: ctx
func ( _m * Store ) ListGithubCredentials ( ctx context . Context ) ( [ ] params . GithubCredentials , error ) {
ret := _m . Called ( ctx )
if len ( ret ) == 0 {
panic ( "no return value specified for ListGithubCredentials" )
}
var r0 [ ] params . GithubCredentials
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] params . GithubCredentials , error ) ) ; ok {
return rf ( ctx )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) [ ] params . GithubCredentials ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . GithubCredentials )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// ListGithubEndpoints provides a mock function with given fields: ctx
func ( _m * Store ) ListGithubEndpoints ( ctx context . Context ) ( [ ] params . GithubEndpoint , error ) {
ret := _m . Called ( ctx )
if len ( ret ) == 0 {
panic ( "no return value specified for ListGithubEndpoints" )
}
var r0 [ ] params . GithubEndpoint
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] params . GithubEndpoint , error ) ) ; ok {
return rf ( ctx )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) [ ] params . GithubEndpoint ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . GithubEndpoint )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-04 22:11:45 +00:00
// ListJobsByStatus provides a mock function with given fields: ctx, status
func ( _m * Store ) ListJobsByStatus ( ctx context . Context , status params . JobStatus ) ( [ ] params . Job , error ) {
ret := _m . Called ( ctx , status )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListJobsByStatus" )
}
2023-07-04 22:11:45 +00:00
var r0 [ ] params . Job
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . JobStatus ) ( [ ] params . Job , error ) ) ; ok {
return rf ( ctx , status )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . JobStatus ) [ ] params . Job ) ; ok {
r0 = rf ( ctx , status )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Job )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . JobStatus ) error ) ; ok {
r1 = rf ( ctx , status )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2022-08-01 12:14:38 +03:00
// ListOrganizations provides a mock function with given fields: ctx
func ( _m * Store ) ListOrganizations ( ctx context . Context ) ( [ ] params . Organization , error ) {
ret := _m . Called ( ctx )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListOrganizations" )
}
2022-08-01 12:14:38 +03:00
var r0 [ ] params . Organization
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] params . Organization , error ) ) ; ok {
return rf ( ctx )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) [ ] params . Organization ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Organization )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// ListPoolInstances provides a mock function with given fields: ctx, poolID
func ( _m * Store ) ListPoolInstances ( ctx context . Context , poolID string ) ( [ ] params . Instance , error ) {
ret := _m . Called ( ctx , poolID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListPoolInstances" )
}
2022-08-01 12:14:38 +03:00
var r0 [ ] params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( [ ] params . Instance , error ) ) ; ok {
return rf ( ctx , poolID )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) [ ] params . Instance ) ; ok {
r0 = rf ( ctx , poolID )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Instance )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , poolID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// ListRepositories provides a mock function with given fields: ctx
func ( _m * Store ) ListRepositories ( ctx context . Context ) ( [ ] params . Repository , error ) {
ret := _m . Called ( ctx )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for ListRepositories" )
}
2022-08-01 12:14:38 +03:00
var r0 [ ] params . Repository
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) ( [ ] params . Repository , error ) ) ; ok {
return rf ( ctx )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context ) [ ] params . Repository ) ; ok {
r0 = rf ( ctx )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( [ ] params . Repository )
}
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context ) error ) ; ok {
r1 = rf ( ctx )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-04 22:11:45 +00:00
// LockJob provides a mock function with given fields: ctx, jobID, entityID
func ( _m * Store ) LockJob ( ctx context . Context , jobID int64 , entityID string ) error {
ret := _m . Called ( ctx , jobID , entityID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for LockJob" )
}
2023-07-04 22:11:45 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) error ) ; ok {
r0 = rf ( ctx , jobID , entityID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-08-01 12:14:38 +03:00
// PoolInstanceCount provides a mock function with given fields: ctx, poolID
func ( _m * Store ) PoolInstanceCount ( ctx context . Context , poolID string ) ( int64 , error ) {
ret := _m . Called ( ctx , poolID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for PoolInstanceCount" )
}
2022-08-01 12:14:38 +03:00
var r0 int64
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) ( int64 , error ) ) ; ok {
return rf ( ctx , poolID )
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string ) int64 ) ; ok {
r0 = rf ( ctx , poolID )
} else {
r0 = ret . Get ( 0 ) . ( int64 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string ) error ) ; ok {
r1 = rf ( ctx , poolID )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2023-07-04 22:11:45 +00:00
// UnlockJob provides a mock function with given fields: ctx, jobID, entityID
func ( _m * Store ) UnlockJob ( ctx context . Context , jobID int64 , entityID string ) error {
ret := _m . Called ( ctx , jobID , entityID )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for UnlockJob" )
}
2023-07-04 22:11:45 +00:00
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , int64 , string ) error ) ; ok {
r0 = rf ( ctx , jobID , entityID )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
2022-10-13 16:09:28 +00:00
// UpdateEnterprise provides a mock function with given fields: ctx, enterpriseID, param
2023-07-04 23:47:55 +00:00
func ( _m * Store ) UpdateEnterprise ( ctx context . Context , enterpriseID string , param params . UpdateEntityParams ) ( params . Enterprise , error ) {
2022-10-13 16:09:28 +00:00
ret := _m . Called ( ctx , enterpriseID , param )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateEnterprise" )
}
2022-10-13 16:09:28 +00:00
var r0 params . Enterprise
2023-03-12 16:01:49 +02:00
var r1 error
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateEntityParams ) ( params . Enterprise , error ) ) ; ok {
2023-03-12 16:01:49 +02:00
return rf ( ctx , enterpriseID , param )
}
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateEntityParams ) params . Enterprise ) ; ok {
2022-10-13 16:09:28 +00:00
r0 = rf ( ctx , enterpriseID , param )
} else {
r0 = ret . Get ( 0 ) . ( params . Enterprise )
}
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , params . UpdateEntityParams ) error ) ; ok {
2022-10-13 16:09:28 +00:00
r1 = rf ( ctx , enterpriseID , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-03-28 18:23:49 +00:00
// UpdateEntityPool provides a mock function with given fields: ctx, entity, poolID, param
func ( _m * Store ) UpdateEntityPool ( ctx context . Context , entity params . GithubEntity , poolID string , param params . UpdatePoolParams ) ( params . Pool , error ) {
ret := _m . Called ( ctx , entity , poolID , param )
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateEntityPool" )
}
var r0 params . Pool
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity , string , params . UpdatePoolParams ) ( params . Pool , error ) ) ; ok {
return rf ( ctx , entity , poolID , param )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , params . GithubEntity , string , params . UpdatePoolParams ) params . Pool ) ; ok {
r0 = rf ( ctx , entity , poolID , param )
} else {
r0 = ret . Get ( 0 ) . ( params . Pool )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , params . GithubEntity , string , params . UpdatePoolParams ) error ) ; ok {
r1 = rf ( ctx , entity , poolID , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-04-15 08:32:19 +00:00
// UpdateGithubCredentials provides a mock function with given fields: ctx, id, param
func ( _m * Store ) UpdateGithubCredentials ( ctx context . Context , id uint , param params . UpdateGithubCredentialsParams ) ( params . GithubCredentials , error ) {
ret := _m . Called ( ctx , id , param )
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateGithubCredentials" )
}
var r0 params . GithubCredentials
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , uint , params . UpdateGithubCredentialsParams ) ( params . GithubCredentials , error ) ) ; ok {
return rf ( ctx , id , param )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , uint , params . UpdateGithubCredentialsParams ) params . GithubCredentials ) ; ok {
r0 = rf ( ctx , id , param )
} else {
r0 = ret . Get ( 0 ) . ( params . GithubCredentials )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , uint , params . UpdateGithubCredentialsParams ) error ) ; ok {
r1 = rf ( ctx , id , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// UpdateGithubEndpoint provides a mock function with given fields: ctx, name, param
func ( _m * Store ) UpdateGithubEndpoint ( ctx context . Context , name string , param params . UpdateGithubEndpointParams ) ( params . GithubEndpoint , error ) {
ret := _m . Called ( ctx , name , param )
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateGithubEndpoint" )
}
var r0 params . GithubEndpoint
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateGithubEndpointParams ) ( params . GithubEndpoint , error ) ) ; ok {
return rf ( ctx , name , param )
}
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateGithubEndpointParams ) params . GithubEndpoint ) ; ok {
r0 = rf ( ctx , name , param )
} else {
r0 = ret . Get ( 0 ) . ( params . GithubEndpoint )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , params . UpdateGithubEndpointParams ) error ) ; ok {
r1 = rf ( ctx , name , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-03-30 18:22:06 +00:00
// UpdateInstance provides a mock function with given fields: ctx, instanceName, param
func ( _m * Store ) UpdateInstance ( ctx context . Context , instanceName string , param params . UpdateInstanceParams ) ( params . Instance , error ) {
ret := _m . Called ( ctx , instanceName , param )
2022-08-01 12:14:38 +03:00
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateInstance" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Instance
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateInstanceParams ) ( params . Instance , error ) ) ; ok {
2024-03-30 18:22:06 +00:00
return rf ( ctx , instanceName , param )
2023-03-12 16:01:49 +02:00
}
2022-08-01 12:14:38 +03:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateInstanceParams ) params . Instance ) ; ok {
2024-03-30 18:22:06 +00:00
r0 = rf ( ctx , instanceName , param )
2022-08-01 12:14:38 +03:00
} else {
r0 = ret . Get ( 0 ) . ( params . Instance )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , params . UpdateInstanceParams ) error ) ; ok {
2024-03-30 18:22:06 +00:00
r1 = rf ( ctx , instanceName , param )
2022-08-01 12:14:38 +03:00
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// UpdateOrganization provides a mock function with given fields: ctx, orgID, param
2023-07-04 23:47:55 +00:00
func ( _m * Store ) UpdateOrganization ( ctx context . Context , orgID string , param params . UpdateEntityParams ) ( params . Organization , error ) {
2022-08-01 12:14:38 +03:00
ret := _m . Called ( ctx , orgID , param )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateOrganization" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Organization
2023-03-12 16:01:49 +02:00
var r1 error
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateEntityParams ) ( params . Organization , error ) ) ; ok {
2023-03-12 16:01:49 +02:00
return rf ( ctx , orgID , param )
}
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateEntityParams ) params . Organization ) ; ok {
2022-08-01 12:14:38 +03:00
r0 = rf ( ctx , orgID , param )
} else {
r0 = ret . Get ( 0 ) . ( params . Organization )
}
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , params . UpdateEntityParams ) error ) ; ok {
2022-08-01 12:14:38 +03:00
r1 = rf ( ctx , orgID , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// UpdateRepository provides a mock function with given fields: ctx, repoID, param
2023-07-04 23:47:55 +00:00
func ( _m * Store ) UpdateRepository ( ctx context . Context , repoID string , param params . UpdateEntityParams ) ( params . Repository , error ) {
2022-08-01 12:14:38 +03:00
ret := _m . Called ( ctx , repoID , param )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateRepository" )
}
2022-08-01 12:14:38 +03:00
var r0 params . Repository
2023-03-12 16:01:49 +02:00
var r1 error
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateEntityParams ) ( params . Repository , error ) ) ; ok {
2023-03-12 16:01:49 +02:00
return rf ( ctx , repoID , param )
}
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateEntityParams ) params . Repository ) ; ok {
2022-08-01 12:14:38 +03:00
r0 = rf ( ctx , repoID , param )
} else {
r0 = ret . Get ( 0 ) . ( params . Repository )
}
2023-07-04 23:47:55 +00:00
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , params . UpdateEntityParams ) error ) ; ok {
2022-08-01 12:14:38 +03:00
r1 = rf ( ctx , repoID , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
// UpdateUser provides a mock function with given fields: ctx, user, param
func ( _m * Store ) UpdateUser ( ctx context . Context , user string , param params . UpdateUserParams ) ( params . User , error ) {
ret := _m . Called ( ctx , user , param )
2024-03-10 15:21:39 +00:00
if len ( ret ) == 0 {
panic ( "no return value specified for UpdateUser" )
}
2022-08-01 12:14:38 +03:00
var r0 params . User
2023-03-12 16:01:49 +02:00
var r1 error
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , string , params . UpdateUserParams ) ( params . User , error ) ) ; ok {
return rf ( ctx , user , param )
}
2022-08-01 12:14:38 +03:00
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 )
}
if rf , ok := ret . Get ( 1 ) . ( func ( context . Context , string , params . UpdateUserParams ) error ) ; ok {
r1 = rf ( ctx , user , param )
} else {
r1 = ret . Error ( 1 )
}
return r0 , r1
}
2024-03-10 15:21:39 +00:00
// NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewStore ( t interface {
2022-08-01 12:14:38 +03:00
mock . TestingT
Cleanup ( func ( ) )
2024-03-10 15:21:39 +00:00
} ) * Store {
2022-08-01 12:14:38 +03:00
mock := & Store { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}