Documentation
¶
Index ¶
- Constants
- type BuildArgs
- type BuildKitConfig
- type CacheConfig
- type ContainerHiveProject
- type HiveProjectConfig
- type Image
- type ImageDefinitionConfig
- type ImageVariant
- type LatestAliasConfig
- type RegistryConfig
- type ReportConfig
- type ReportModel
- type Secret
- type SecretValue
- type Secrets
- type Tag
- type VariantConfig
- type Versions
Constants ¶
const DistDirName = "dist"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildKitConfig ¶
type BuildKitConfig struct {
Address string `yaml:"address" json:"address" jsonschema:"BuildKit daemon address (e.g. tcp://127.0.0.1:8502)"`
}
BuildKitConfig holds the BuildKit daemon connection settings.
type CacheConfig ¶
type CacheConfig struct {
// Type discriminates the cache backend: "s3" or "registry"
Type string `yaml:"type" json:"type" jsonschema:"Cache type (s3, registry),required"`
// S3 fields (type: s3)
Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty" jsonschema:"S3 endpoint URL"`
Bucket string `yaml:"bucket,omitempty" json:"bucket,omitempty" jsonschema:"S3 bucket name"`
Region string `yaml:"region,omitempty" json:"region,omitempty" jsonschema:"S3 region"`
AccessKeyId string `yaml:"access_key_id,omitempty" json:"access_key_id,omitempty" jsonschema:"S3 access key ID"`
SecretAccessKey string `yaml:"secret_access_key,omitempty" json:"secret_access_key,omitempty" jsonschema:"S3 secret access key"`
UsePathStyle bool `yaml:"use_path_style,omitempty" json:"use_path_style,omitempty" jsonschema:"Use path-style S3 URLs"`
// Registry fields (type: registry)
Ref string `yaml:"ref,omitempty" json:"ref,omitempty" jsonschema:"Registry cache ref (e.g. registry:5000/cache)"`
Insecure bool `yaml:"insecure,omitempty" json:"insecure,omitempty" jsonschema:"Allow insecure registry connections"`
}
CacheConfig configures the build cache backend (S3 or registry).
type ContainerHiveProject ¶
type ContainerHiveProject struct {
RootDir string
ConfigFilePath string
Config HiveProjectConfig
ImagesByIdentifier map[string]*Image
ImagesByName map[string][]*Image
}
ContainerHiveProject represents a fully loaded project with its configuration and images.
type HiveProjectConfig ¶
type HiveProjectConfig struct {
BuildKit *BuildKitConfig `yaml:"buildkit,omitempty" json:"buildkit,omitempty" jsonschema:"BuildKit daemon configuration"`
Cache *CacheConfig `yaml:"cache,omitempty" json:"cache,omitempty" jsonschema:"Build cache configuration"`
Registry *RegistryConfig `yaml:"registry,omitempty" json:"registry,omitempty" jsonschema:"Container registry configuration"`
Platforms []string `yaml:"platforms,omitempty" json:"platforms,omitempty" jsonschema:"Default target platforms for all images (e.g. linux/amd64)"`
TemplateOptions map[string]string `` /* 167-byte string literal not displayed */
}
HiveProjectConfig is the top-level project configuration from hive.yml.
type Image ¶
type Image struct {
Identifier string
Name string
Description string
RootDir string
RootFSDir string
TestConfigFilePath string
DefinitionFilePath string
BuildEntryPointPath string
Versions Versions
BuildArgs BuildArgs `yaml:"build_args"`
Secrets Secrets `yaml:"secrets"`
Tags map[string]*Tag
Variants map[string]*ImageVariant
DependsOn []string
Platforms []string
LatestAlias *LatestAliasConfig
Report ReportModel
}
Image represents a fully resolved container image definition within a project.
type ImageDefinitionConfig ¶
type ImageDefinitionConfig struct {
Description string `yaml:"description" json:"description,omitempty" jsonschema:"Description of the image"`
Tags []*Tag `yaml:"tags" json:"tags" jsonschema:"Tags to create for this image"`
Variants []VariantConfig `yaml:"variants" json:"variants,omitempty" jsonschema:"Variants to create for this image"`
Versions Versions `yaml:"versions" json:"versions,omitempty" jsonschema:"Versions to use for this image"`
BuildArgs BuildArgs `yaml:"build_args" json:"build_args,omitempty" jsonschema:"Build args to add for this image"`
Secrets Secrets `yaml:"secrets" json:"secrets,omitempty" jsonschema:"Secrets to resolve for this image"`
DependsOn []string `` /* 133-byte string literal not displayed */
Platforms []string `yaml:"platforms,omitempty" json:"platforms,omitempty" jsonschema:"Target platforms for this image (e.g. linux/amd64)"`
LatestAlias *LatestAliasConfig `` /* 136-byte string literal not displayed */
Report ReportConfig `yaml:"report" json:"report,omitempty" jsonschema:"Report metadata"`
}
ImageDefinitionConfig is the parsed content of an image definition YAML file.
type ImageVariant ¶
type ImageVariant struct {
Name string
BuildEntryPointPath string
RootDir string
RootFSDir string
TagSuffix string `yaml:"tag_suffix"`
TestConfigFilePath string
Versions Versions
BuildArgs BuildArgs `yaml:"build_args"`
Platforms []string
Report ReportModel
}
ImageVariant represents an alternative build of an image with different configuration.
type LatestAliasConfig ¶ added in v0.0.5
type LatestAliasConfig struct {
Tag string `yaml:"tag" json:"tag" jsonschema:"Alias tag name to assign to the highest semantic version (e.g. latest, stable),required"`
OnMissing string `` /* 144-byte string literal not displayed */
}
LatestAliasConfig configures automatic latest-alias assignment for an image.
type RegistryConfig ¶
type RegistryConfig struct {
Address string `yaml:"address" json:"address" jsonschema:"Container registry address"`
}
RegistryConfig holds the container registry connection settings.
type ReportConfig ¶ added in v0.0.5
type ReportConfig struct {
Icon *string `yaml:"icon" json:"icon" jsonschema:"Icon slug for devicon (e.g. go-original)"`
}
ReportConfig holds report-related metadata for an image or variant.
type ReportModel ¶ added in v0.0.5
type ReportModel struct {
Icon string
}
ReportModel holds report-related metadata for an image or variant.
type Secret ¶
type Secret struct {
SourceType string `` /* 138-byte string literal not displayed */
Value string `yaml:"value" json:"value" jsonschema:"Value of the secret (env var name or plain text)"`
}
Secret represents a named secret with its value configuration This is a simplified version for the model package
type SecretValue ¶
type SecretValue struct {
SourceType string `` /* 138-byte string literal not displayed */
Value string `yaml:"value" json:"value" jsonschema:"Value of the secret (env var name or plain text)"`
}
SecretValue represents how a secret value should be resolved
type Secrets ¶
Secrets represents a collection of named secrets This is a type alias to the secrets.Secrets type
type Tag ¶
type Tag struct {
Name string `yaml:"name" json:"name" jsonschema:"Name of the tag"`
Versions Versions `yaml:"versions" json:"versions,omitempty" jsonschema:"Versions to use for this tag"`
BuildArgs BuildArgs `yaml:"build_args" json:"build_args,omitempty" jsonschema:"Build args to specify for this tag"`
}
Tag defines a single image tag with its version overrides and build arguments.
type VariantConfig ¶
type VariantConfig struct {
Name string `yaml:"name" json:"name" jsonschema:"Name of the variant"`
TagSuffix string `yaml:"tag_suffix" json:"tag_suffix" jsonschema:"Suffix to append to the tag name for this variant"`
Versions Versions `yaml:"versions" json:"versions,omitempty" jsonschema:"Versions to use for this variant"`
BuildArgs BuildArgs `yaml:"build_args" json:"build_args,omitempty" jsonschema:"Build args to add for this variant"`
Platforms []string `yaml:"platforms,omitempty" json:"platforms,omitempty" jsonschema:"Target platforms for this variant (e.g. linux/amd64)"`
Report ReportConfig `yaml:"report" json:"report,omitempty" jsonschema:"Report metadata"`
}
VariantConfig defines a variant in the image definition YAML file.