Documentation
¶
Index ¶
- Constants
- Variables
- func GetActiveProjectID(ctx context.Context) (string, error)
- func GetActiveProjectIDAllowAdmin(ctx context.Context, fallbackProjectID string) (string, error)
- func MakeSecretPath(projectUUID string, registryName string) string
- func NewService(databaseClient *generated.Client, ...) northbound.Service
- type ApplicationEvents
- type ArtifactEvents
- type Base64Strings
- type DeploymentPackageEvents
- type EventListeners
- type EventType
- type RegistryEvents
- type RegistrySecretData
- type SecretService
- type Server
- func (g *Server) CreateApplication(ctx context.Context, req *catalogv3.CreateApplicationRequest) (*catalogv3.CreateApplicationResponse, error)
- func (g *Server) CreateArtifact(ctx context.Context, req *catalogv3.CreateArtifactRequest) (*catalogv3.CreateArtifactResponse, error)
- func (g *Server) CreateDeploymentPackage(ctx context.Context, req *catalogv3.CreateDeploymentPackageRequest) (*catalogv3.CreateDeploymentPackageResponse, error)
- func (g *Server) CreateRegistry(ctx context.Context, req *catalogv3.CreateRegistryRequest) (*catalogv3.CreateRegistryResponse, error)
- func (g *Server) DeleteApplication(ctx context.Context, req *catalogv3.DeleteApplicationRequest) (*emptypb.Empty, error)
- func (g *Server) DeleteArtifact(ctx context.Context, req *catalogv3.DeleteArtifactRequest) (*emptypb.Empty, error)
- func (g *Server) DeleteDeploymentPackage(ctx context.Context, req *catalogv3.DeleteDeploymentPackageRequest) (*emptypb.Empty, error)
- func (g *Server) DeleteRegistry(ctx context.Context, req *catalogv3.DeleteRegistryRequest) (*emptypb.Empty, error)
- func (g *Server) DownloadDeploymentPackage(ctx context.Context, req *catalogv3.DownloadDeploymentPackageRequest) (*catalogv3.DownloadDeploymentPackageResponse, error)
- func (g *Server) GetApplication(ctx context.Context, req *catalogv3.GetApplicationRequest) (*catalogv3.GetApplicationResponse, error)
- func (g *Server) GetApplicationReferenceCount(ctx context.Context, req *catalogv3.GetApplicationReferenceCountRequest) (*catalogv3.GetApplicationReferenceCountResponse, error)
- func (g *Server) GetApplicationVersions(ctx context.Context, req *catalogv3.GetApplicationVersionsRequest) (*catalogv3.GetApplicationVersionsResponse, error)
- func (g *Server) GetArtifact(ctx context.Context, req *catalogv3.GetArtifactRequest) (*catalogv3.GetArtifactResponse, error)
- func (g *Server) GetDeploymentPackage(ctx context.Context, req *catalogv3.GetDeploymentPackageRequest) (*catalogv3.GetDeploymentPackageResponse, error)
- func (g *Server) GetDeploymentPackageVersions(ctx context.Context, req *catalogv3.GetDeploymentPackageVersionsRequest) (*catalogv3.GetDeploymentPackageVersionsResponse, error)
- func (g *Server) GetRegistry(ctx context.Context, req *catalogv3.GetRegistryRequest) (*catalogv3.GetRegistryResponse, error)
- func (g *Server) Import(ctx context.Context, req *catalogv3.ImportRequest) (*catalogv3.ImportResponse, error)
- func (g *Server) IsSystemRegistry(name string) bool
- func (g *Server) ListApplications(ctx context.Context, req *catalogv3.ListApplicationsRequest) (*catalogv3.ListApplicationsResponse, error)
- func (g *Server) ListArtifacts(ctx context.Context, req *catalogv3.ListArtifactsRequest) (*catalogv3.ListArtifactsResponse, error)
- func (g *Server) ListDeploymentPackages(ctx context.Context, req *catalogv3.ListDeploymentPackagesRequest) (*catalogv3.ListDeploymentPackagesResponse, error)
- func (g *Server) ListRegistries(ctx context.Context, req *catalogv3.ListRegistriesRequest) (*catalogv3.ListRegistriesResponse, error)
- func (g *Server) UpdateApplication(ctx context.Context, req *catalogv3.UpdateApplicationRequest) (*emptypb.Empty, error)
- func (g *Server) UpdateArtifact(ctx context.Context, req *catalogv3.UpdateArtifactRequest) (*emptypb.Empty, error)
- func (g *Server) UpdateDeploymentPackage(ctx context.Context, req *catalogv3.UpdateDeploymentPackageRequest) (*emptypb.Empty, error)
- func (g *Server) UpdateRegistry(ctx context.Context, req *catalogv3.UpdateRegistryRequest) (*emptypb.Empty, error)
- func (g *Server) UploadCatalogEntities(ctx context.Context, req *catalogv3.UploadCatalogEntitiesRequest) (*catalogv3.UploadCatalogEntitiesResponse, error)
- func (g *Server) WatchApplications(req *catalogv3.WatchApplicationsRequest, ...) error
- func (g *Server) WatchArtifacts(req *catalogv3.WatchArtifactsRequest, ...) error
- func (g *Server) WatchDeploymentPackages(req *catalogv3.WatchDeploymentPackagesRequest, ...) error
- func (g *Server) WatchRegistries(req *catalogv3.WatchRegistriesRequest, ...) error
- type Service
Constants ¶
const ( // System registries that are managed by app-orch-tenant-controller // NOTE: Ensure app-orch-tenant-controller and app-orch-catalog are updated at the same time, // if these registry names change. SystemRegistryHarborHelm = "harbor-helm-oci" SystemRegistryHarborDocker = "harbor-docker-oci" )
const ( ActiveProjectID = "activeprojectid" AdminProjectID = "default" )
const DefaultPageSize = 20
const (
MaxExtractedFileSize = 10 * 1024 * 1024 // to limit the size of extracted files and mitigate decompression bomb lint message
)
const MaxPageSize = 500
Variables ¶
var Base64Factory = newBase64
var K8STokenFile = vaultK8STokenFile // #nosec
var SecretServiceFactory = newSecretService
var UseSecretService = false
var VaultServer = VaultServerAddress
var VaultServerAddress = os.Getenv("VAULT_SERVER_ADDRESS")
Functions ¶
func GetActiveProjectID ¶
GetActiveProjectID extracts ActiveProjectID metadata from the incoming context
func GetActiveProjectIDAllowAdmin ¶
GetActiveProjectIDAllowAdmin extracts ActiveProjectID metadata from the incoming context and if it's an admin project, it will return the fallback project, if one is specified.
func MakeSecretPath ¶
func NewService ¶
func NewService(databaseClient *generated.Client, opaClient openpolicyagent.ClientWithResponsesInterface) northbound.Service
NewService returns a new catalog Service
Types ¶
type ApplicationEvents ¶
type ApplicationEvents struct {
// contains filtered or unexported fields
}
ApplicationEvents is a queue of application events.
type ArtifactEvents ¶
type ArtifactEvents struct {
// contains filtered or unexported fields
}
ArtifactEvents is a queue of artifact events.
type Base64Strings ¶
type DeploymentPackageEvents ¶
type DeploymentPackageEvents struct {
// contains filtered or unexported fields
}
DeploymentPackageEvents is a queue of deployment package events.
type EventListeners ¶
type EventListeners struct {
// contains filtered or unexported fields
}
EventListeners tracks current listeners for different type of entity events.
func NewEventListeners ¶
func NewEventListeners() *EventListeners
type RegistryEvents ¶
type RegistryEvents struct {
// contains filtered or unexported fields
}
RegistryEvents is a queue of registry events.
type RegistrySecretData ¶
type SecretService ¶
type Server ¶
type Server struct {
catalogv3.UnimplementedCatalogServiceServer
// contains filtered or unexported fields
}
Server implements the gRPC service for administrative facilities.
func NewServer ¶
func NewServer(dbClient *generated.Client, opaClient openpolicyagent.ClientWithResponsesInterface) *Server
NewServer creates a new server with the specified database client and OPA client entities.
func (*Server) CreateApplication ¶
func (g *Server) CreateApplication(ctx context.Context, req *catalogv3.CreateApplicationRequest) (*catalogv3.CreateApplicationResponse, error)
CreateApplication creates an Application from gRPC request
func (*Server) CreateArtifact ¶
func (g *Server) CreateArtifact(ctx context.Context, req *catalogv3.CreateArtifactRequest) (*catalogv3.CreateArtifactResponse, error)
CreateArtifact creates an artifact through gRPC
func (*Server) CreateDeploymentPackage ¶
func (g *Server) CreateDeploymentPackage(ctx context.Context, req *catalogv3.CreateDeploymentPackageRequest) (*catalogv3.CreateDeploymentPackageResponse, error)
CreateDeploymentPackage creates an CreateDeploymentPackage from gRPC request
func (*Server) CreateRegistry ¶
func (g *Server) CreateRegistry(ctx context.Context, req *catalogv3.CreateRegistryRequest) (*catalogv3.CreateRegistryResponse, error)
CreateRegistry creates a Registry from gRPC request
func (*Server) DeleteApplication ¶
func (g *Server) DeleteApplication(ctx context.Context, req *catalogv3.DeleteApplicationRequest) (*emptypb.Empty, error)
DeleteApplication deletes an application through gRPC
func (*Server) DeleteArtifact ¶
func (g *Server) DeleteArtifact(ctx context.Context, req *catalogv3.DeleteArtifactRequest) (*emptypb.Empty, error)
DeleteArtifact deletes an artifact through gRPC
func (*Server) DeleteDeploymentPackage ¶
func (g *Server) DeleteDeploymentPackage(ctx context.Context, req *catalogv3.DeleteDeploymentPackageRequest) (*emptypb.Empty, error)
DeleteDeploymentPackage deletes an application through gRPC
func (*Server) DeleteRegistry ¶
func (g *Server) DeleteRegistry(ctx context.Context, req *catalogv3.DeleteRegistryRequest) (*emptypb.Empty, error)
DeleteRegistry deletes a registry through gRPC
func (*Server) DownloadDeploymentPackage ¶
func (g *Server) DownloadDeploymentPackage(ctx context.Context, req *catalogv3.DownloadDeploymentPackageRequest) (*catalogv3.DownloadDeploymentPackageResponse, error)
DownloadDeploymentPackage gets a package and its related objects as a tarball
func (*Server) GetApplication ¶
func (g *Server) GetApplication(ctx context.Context, req *catalogv3.GetApplicationRequest) (*catalogv3.GetApplicationResponse, error)
GetApplication gets a single application through gRPC
func (*Server) GetApplicationReferenceCount ¶
func (g *Server) GetApplicationReferenceCount(ctx context.Context, req *catalogv3.GetApplicationReferenceCountRequest) (*catalogv3.GetApplicationReferenceCountResponse, error)
GetApplicationReferenceCount gets reference count for the specified application through gRPC
func (*Server) GetApplicationVersions ¶
func (g *Server) GetApplicationVersions(ctx context.Context, req *catalogv3.GetApplicationVersionsRequest) (*catalogv3.GetApplicationVersionsResponse, error)
GetApplicationVersions gets all versions of a named Application through gRPC
func (*Server) GetArtifact ¶
func (g *Server) GetArtifact(ctx context.Context, req *catalogv3.GetArtifactRequest) (*catalogv3.GetArtifactResponse, error)
GetArtifact gets a single artifact through gRPC
func (*Server) GetDeploymentPackage ¶
func (g *Server) GetDeploymentPackage(ctx context.Context, req *catalogv3.GetDeploymentPackageRequest) (*catalogv3.GetDeploymentPackageResponse, error)
GetDeploymentPackage gets a single application through gRPC
func (*Server) GetDeploymentPackageVersions ¶
func (g *Server) GetDeploymentPackageVersions(ctx context.Context, req *catalogv3.GetDeploymentPackageVersionsRequest) (*catalogv3.GetDeploymentPackageVersionsResponse, error)
GetDeploymentPackageVersions gets all versions of a named DeploymentPackage through gRPC
func (*Server) GetRegistry ¶
func (g *Server) GetRegistry(ctx context.Context, req *catalogv3.GetRegistryRequest) (*catalogv3.GetRegistryResponse, error)
GetRegistry gets a single registry through gRPC
func (*Server) Import ¶
func (g *Server) Import(ctx context.Context, req *catalogv3.ImportRequest) (*catalogv3.ImportResponse, error)
Import allows a helm chart to be imported from an OCI registry
func (*Server) IsSystemRegistry ¶
func (*Server) ListApplications ¶
func (g *Server) ListApplications(ctx context.Context, req *catalogv3.ListApplicationsRequest) (*catalogv3.ListApplicationsResponse, error)
ListApplications gets a list of all applications through gRPC
func (*Server) ListArtifacts ¶
func (g *Server) ListArtifacts(ctx context.Context, req *catalogv3.ListArtifactsRequest) (*catalogv3.ListArtifactsResponse, error)
ListArtifacts gets a list of all artifacts through gRPC
func (*Server) ListDeploymentPackages ¶
func (g *Server) ListDeploymentPackages(ctx context.Context, req *catalogv3.ListDeploymentPackagesRequest) (*catalogv3.ListDeploymentPackagesResponse, error)
ListDeploymentPackages gets a list of all deployment-packages through gRPC
func (*Server) ListRegistries ¶
func (g *Server) ListRegistries(ctx context.Context, req *catalogv3.ListRegistriesRequest) (*catalogv3.ListRegistriesResponse, error)
ListRegistries gets a list of all registries through gRPC
func (*Server) UpdateApplication ¶
func (g *Server) UpdateApplication(ctx context.Context, req *catalogv3.UpdateApplicationRequest) (*emptypb.Empty, error)
UpdateApplication updates an application through gRPC
func (*Server) UpdateArtifact ¶
func (g *Server) UpdateArtifact(ctx context.Context, req *catalogv3.UpdateArtifactRequest) (*emptypb.Empty, error)
UpdateArtifact updates an artifact through gRPC
func (*Server) UpdateDeploymentPackage ¶
func (g *Server) UpdateDeploymentPackage(ctx context.Context, req *catalogv3.UpdateDeploymentPackageRequest) (*emptypb.Empty, error)
UpdateDeploymentPackage updates an application through gRPC
func (*Server) UpdateRegistry ¶
func (g *Server) UpdateRegistry(ctx context.Context, req *catalogv3.UpdateRegistryRequest) (*emptypb.Empty, error)
UpdateRegistry updates a registry through gRPC
func (*Server) UploadCatalogEntities ¶
func (g *Server) UploadCatalogEntities(ctx context.Context, req *catalogv3.UploadCatalogEntitiesRequest) (*catalogv3.UploadCatalogEntitiesResponse, error)
UploadCatalogEntities allows upload of YAML files containing catalog entity descriptions or TAR file containing such YAML files through gRPC
func (*Server) WatchApplications ¶
func (g *Server) WatchApplications(req *catalogv3.WatchApplicationsRequest, server catalogv3.CatalogService_WatchApplicationsServer) error
WatchApplications watches inventory of applications for changes.
func (*Server) WatchArtifacts ¶
func (g *Server) WatchArtifacts(req *catalogv3.WatchArtifactsRequest, server catalogv3.CatalogService_WatchArtifactsServer) error
WatchArtifacts watches inventory of artifacts for changes.
func (*Server) WatchDeploymentPackages ¶
func (g *Server) WatchDeploymentPackages(req *catalogv3.WatchDeploymentPackagesRequest, server catalogv3.CatalogService_WatchDeploymentPackagesServer) error
WatchDeploymentPackages watches inventory of deployment packages for changes.
func (*Server) WatchRegistries ¶
func (g *Server) WatchRegistries(req *catalogv3.WatchRegistriesRequest, server catalogv3.CatalogService_WatchRegistriesServer) error
WatchRegistries watches inventory of registries for changes.
type Service ¶
type Service struct {
DatabaseClient *generated.Client
OpaClient openpolicyagent.ClientWithResponsesInterface
}
Service is a Service implementation for administration.