componentcatalog

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidComponent  = errors.New("invalid Helm component definition")
	ErrHelmInspect       = errors.New("unable to read Helm chart values")
	ErrReservedComponent = errors.New("built-in component keys are reserved")
	ErrInlineSecret      = errors.New("inline secrets are not allowed in Helm values; use a Kubernetes Secret reference")
)

Functions

This section is empty.

Types

type Component

type Component struct {
	Key              string         `json:"key"`
	DisplayName      string         `json:"display_name"`
	Category         string         `json:"category"`
	Description      string         `json:"description"`
	Repository       string         `json:"repository"`
	Chart            string         `json:"chart"`
	ChartVersion     string         `json:"chart_version"`
	DefaultNamespace string         `json:"default_namespace"`
	ReplicaPaths     []string       `json:"replica_paths"`
	ValuesYAML       string         `json:"values_yaml"`
	Values           map[string]any `json:"values"`
	CreatedBy        string         `json:"created_by"`
	CreatedAt        time.Time      `json:"created_at"`
	UpdatedAt        time.Time      `json:"updated_at"`
}

type InspectRequest

type InspectRequest struct {
	Repository   string `json:"repository"`
	Chart        string `json:"chart"`
	ChartVersion string `json:"chart_version"`
}

type InspectResult

type InspectResult struct {
	Repository             string         `json:"repository"`
	Chart                  string         `json:"chart"`
	ChartVersion           string         `json:"chart_version"`
	ValuesYAML             string         `json:"values_yaml"`
	Values                 map[string]any `json:"values"`
	FilteredSensitivePaths []string       `json:"filtered_sensitive_paths,omitempty"`
}

type Service

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

func New

func New(config *appconfig.Config, store Store) *Service

func (*Service) Delete

func (s *Service) Delete(ctx context.Context, key string) error

func (*Service) Get

func (s *Service) Get(ctx context.Context, key string) (Component, error)

func (*Service) Inspect

func (s *Service) Inspect(ctx context.Context, request InspectRequest) (InspectResult, error)

func (*Service) List

func (s *Service) List(ctx context.Context) ([]Component, error)

func (*Service) Save

func (s *Service) Save(ctx context.Context, component Component) (Component, error)

func (*Service) Versions

func (s *Service) Versions(ctx context.Context, request InspectRequest) (VersionResult, error)

type Store

type Store interface {
	ListHelmComponents(context.Context) ([]Component, error)
	GetHelmComponent(context.Context, string) (Component, error)
	SaveHelmComponent(context.Context, Component) error
	DeleteHelmComponent(context.Context, string) error
}

type VersionOption

type VersionOption struct {
	Version     string `json:"version"`
	AppVersion  string `json:"app_version,omitempty"`
	Description string `json:"description,omitempty"`
}

type VersionResult

type VersionResult struct {
	Repository string          `json:"repository"`
	Chart      string          `json:"chart"`
	Versions   []VersionOption `json:"versions"`
}

Jump to

Keyboard shortcuts

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