Add enterprise support
This change adds enterprise support throughout garm. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
f40420bfb6
commit
296333412a
34 changed files with 2028 additions and 112 deletions
|
|
@ -21,16 +21,31 @@ import (
|
|||
"garm/runner/common"
|
||||
)
|
||||
|
||||
//go:generate mockery --name=PoolManagerController
|
||||
|
||||
type PoolManagerController interface {
|
||||
type RepoPoolManager interface {
|
||||
CreateRepoPoolManager(ctx context.Context, repo params.Repository, providers map[string]common.Provider, store dbCommon.Store) (common.PoolManager, error)
|
||||
GetRepoPoolManager(repo params.Repository) (common.PoolManager, error)
|
||||
DeleteRepoPoolManager(repo params.Repository) error
|
||||
GetRepoPoolManagers() (map[string]common.PoolManager, error)
|
||||
}
|
||||
|
||||
type OrgPoolManager interface {
|
||||
CreateOrgPoolManager(ctx context.Context, org params.Organization, providers map[string]common.Provider, store dbCommon.Store) (common.PoolManager, error)
|
||||
GetOrgPoolManager(org params.Organization) (common.PoolManager, error)
|
||||
DeleteOrgPoolManager(org params.Organization) error
|
||||
GetOrgPoolManagers() (map[string]common.PoolManager, error)
|
||||
}
|
||||
|
||||
type EnterprisePoolManager interface {
|
||||
CreateEnterprisePoolManager(ctx context.Context, enterprise params.Enterprise, providers map[string]common.Provider, store dbCommon.Store) (common.PoolManager, error)
|
||||
GetEnterprisePoolManager(enterprise params.Enterprise) (common.PoolManager, error)
|
||||
DeleteEnterprisePoolManager(enterprise params.Enterprise) error
|
||||
GetEnterprisePoolManagers() (map[string]common.PoolManager, error)
|
||||
}
|
||||
|
||||
//go:generate mockery --name=PoolManagerController
|
||||
|
||||
type PoolManagerController interface {
|
||||
RepoPoolManager
|
||||
OrgPoolManager
|
||||
EnterprisePoolManager
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue