MCPcopy Create free account
hub / github.com/cloudbase/garm / SetEntityPoolManagerStatus

Method SetEntityPoolManagerStatus

database/sql/util.go:1225–1239  ·  view source on GitHub ↗
(ctx context.Context, entity params.ForgeEntity, param params.PoolManagerStatus)

Source from the content-addressed store, hash-verified

1223}
1224
1225func (s *sqlDatabase) SetEntityPoolManagerStatus(ctx context.Context, entity params.ForgeEntity, param params.PoolManagerStatus) error {
1226 updateEntityParams := params.UpdateEntityParams{
1227 PoolManagerStatus: &param,
1228 }
1229 var err error
1230 switch entity.EntityType {
1231 case params.ForgeEntityTypeEnterprise:
1232 _, err = s.UpdateEnterprise(ctx, entity.ID, updateEntityParams)
1233 case params.ForgeEntityTypeOrganization:
1234 _, err = s.UpdateOrganization(ctx, entity.ID, updateEntityParams)
1235 case params.ForgeEntityTypeRepository:
1236 _, err = s.UpdateRepository(ctx, entity.ID, updateEntityParams)
1237 }
1238 return err
1239}

Callers

nothing calls this directly

Calls 3

UpdateEnterpriseMethod · 0.95
UpdateOrganizationMethod · 0.95
UpdateRepositoryMethod · 0.95

Tested by

no test coverage detected