source

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractRepositoryInfo

func ExtractRepositoryInfo(repoURL string) (string, string, error)

func MakeComponentDescriptorPath

func MakeComponentDescriptorPath(buildCtx *integrations.BuildContext) string

Types

type Config

type Config struct {
	SchemaVersion string     `yaml:"schemaVersion"`
	Endpoints     []Endpoint `yaml:"endpoints"`
}

Config represents the root configuration structure

type Endpoint

type Endpoint struct {
	Name                string                   `yaml:"name"`
	DisplayName         string                   `yaml:"displayName,omitempty"`
	Service             Service                  `yaml:"service"`
	NetworkVisibilities []NetworkVisibilityLevel `yaml:"networkVisibilities,omitempty"`
	Type                choreov1.EndpointType    `yaml:"type"`
}

Endpoint represents an individual service endpoint configuration

type NetworkVisibilityLevel

type NetworkVisibilityLevel string

NetworkVisibilityLevel defines the visibility level of an endpoint

const (
	// NetworkVisibilityLevelProject indicates endpoint is only visible within the project
	NetworkVisibilityLevelProject NetworkVisibilityLevel = "Project"
	// NetworkVisibilityLevelOrganization indicates endpoint is visible within the organization
	NetworkVisibilityLevelOrganization NetworkVisibilityLevel = "Organization"
	// NetworkVisibilityLevelPublic indicates endpoint is publicly visible
	NetworkVisibilityLevelPublic NetworkVisibilityLevel = "Public"
)

type Service

type Service struct {
	BasePath string `yaml:"basePath,omitempty"`
	Port     int32  `yaml:"port"`
}

Service contains the service-specific configuration

type SourceHandler

type SourceHandler[T any] interface {
	// Name returns the name of the source provider.
	Name(ctx context.Context, resourceCtx *T) string

	// FetchComponentDescriptor fetches the component yaml from the source repository.
	FetchComponentDescriptor(ctx context.Context, resourceCtx *T) (*Config, error)
}

SourceHandler is an interface that defines the operations that can be performed on the source provider (GitHub/BitBucket/GitLab/etc.) by the build controller during the reconciliation process.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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