northbound

package
v0.17.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 57 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	ActiveProjectID = "activeprojectid"
	AdminProjectID  = "default"
)
View Source
const DefaultPageSize = 20
View Source
const (
	MaxExtractedFileSize = 10 * 1024 * 1024 // to limit the size of extracted files and mitigate decompression bomb lint message
)
View Source
const MaxPageSize = 500

Variables

View Source
var Base64Factory = newBase64
View Source
var K8STokenFile = vaultK8STokenFile // #nosec
View Source
var SecretServiceFactory = newSecretService
View Source
var UseSecretService = false
View Source
var VaultServer = VaultServerAddress
View Source
var VaultServerAddress = os.Getenv("VAULT_SERVER_ADDRESS")

Functions

func GetActiveProjectID

func GetActiveProjectID(ctx context.Context) (string, error)

GetActiveProjectID extracts ActiveProjectID metadata from the incoming context

func GetActiveProjectIDAllowAdmin

func GetActiveProjectIDAllowAdmin(ctx context.Context, fallbackProjectID string) (string, error)

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 MakeSecretPath(projectUUID string, registryName string) string

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 Base64Strings interface {
	EncodeBase64(r registrySecretData) string
	DecodeBase64(r *registrySecretData, encodedData string) error
}

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 EventType

type EventType string
const (
	CreatedEvent  EventType = "created"
	UpdatedEvent  EventType = "updated"
	DeletedEvent  EventType = "deleted"
	ReplayedEvent EventType = "replayed"
)

type RegistryEvents

type RegistryEvents struct {
	// contains filtered or unexported fields
}

RegistryEvents is a queue of registry events.

type RegistrySecretData

type RegistrySecretData interface {
	RootURL() string
	InventoryURL() string
	Username() string
	AuthToken() string
	Cacerts() string
}

type SecretService

type SecretService interface {
	ReadSecret(ctx context.Context, path string) (string, error)
	WriteSecret(ctx context.Context, path string, secret string) error
	DeleteSecret(ctx context.Context, path string) error
	Logout(ctx context.Context)
}

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

CreateApplication creates an Application from gRPC request

func (*Server) CreateArtifact

CreateArtifact creates an artifact through gRPC

func (*Server) CreateDeploymentPackage

CreateDeploymentPackage creates an CreateDeploymentPackage from gRPC request

func (*Server) CreateRegistry

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

DownloadDeploymentPackage gets a package and its related objects as a tarball

func (*Server) GetApplication

GetApplication gets a single application through gRPC

func (*Server) GetApplicationReferenceCount

GetApplicationReferenceCount gets reference count for the specified application through gRPC

func (*Server) GetApplicationVersions

GetApplicationVersions gets all versions of a named Application through gRPC

func (*Server) GetArtifact

GetArtifact gets a single artifact through gRPC

func (*Server) GetDeploymentPackage

GetDeploymentPackage gets a single application through gRPC

func (*Server) GetDeploymentPackageVersions

GetDeploymentPackageVersions gets all versions of a named DeploymentPackage through gRPC

func (*Server) GetRegistry

GetRegistry gets a single registry through gRPC

func (*Server) Import

Import allows a helm chart to be imported from an OCI registry

func (*Server) IsSystemRegistry

func (g *Server) IsSystemRegistry(name string) bool

func (*Server) ListApplications

ListApplications gets a list of all applications through gRPC

func (*Server) ListArtifacts

ListArtifacts gets a list of all artifacts through gRPC

func (*Server) ListDeploymentPackages

ListDeploymentPackages gets a list of all deployment-packages through gRPC

func (*Server) ListRegistries

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

UploadCatalogEntities allows upload of YAML files containing catalog entity descriptions or TAR file containing such YAML files through gRPC

func (*Server) WatchApplications

WatchApplications watches inventory of applications for changes.

func (*Server) WatchArtifacts

WatchArtifacts watches inventory of artifacts for changes.

func (*Server) WatchDeploymentPackages

WatchDeploymentPackages watches inventory of deployment packages for changes.

func (*Server) WatchRegistries

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.

func (Service) Register

func (s Service) Register(r *grpc.Server)

Register registers the Service with the gRPC server.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL