Documentation
¶
Index ¶
- Constants
- type Component
- func (c *Component) Config() *Config
- func (c *Component) DocsDir(p ...string) string
- func (c *Component) ImagesContainerfile(imageType image.ImageType) string
- func (c *Component) ImagesDir(p ...string) string
- func (c *Component) Language() string
- func (c *Component) Name() string
- func (c *Component) OutBuildBinDir(p ...string) string
- func (c *Component) OutBuildDir(p ...string) string
- func (c *Component) OutBuildDocsDir(p ...string) string
- func (c *Component) OutBuildShareDir(p ...string) string
- func (c *Component) OutCoverageBinDir(p ...string) string
- func (c *Component) OutCoverageDataDir(p ...string) string
- func (c *Component) OutDir(p ...string) string
- func (c *Component) OutImageDir(p ...string) string
- func (c *Component) OutPackageDir(p ...string) string
- func (c *Component) RelOutPath(p string, ps ...string) string
- func (c *Component) RelPath(p string, ps ...string) string
- func (c *Component) Root() string
- func (c *Component) String() string
- func (c *Component) Version() *version.Version
- type ComponentCreator
- type Config
- type ConfigAdjuster
- type Version
Constants ¶
const (
ConfigFilename = ".component.yaml"
)
These paths are relative to the component folder. Use the below functions to get paths relative to the component.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component represents a component in the mono-repo.
func (*Component) ImagesContainerfile ¶
ImagesContainerfile returns the image file of the component for the image type.
func (*Component) OutBuildBinDir ¶
OutBuildBinDir returns the directory of the components build binary directory.
func (*Component) OutBuildDir ¶
OutBuildDir returns the directory of the components build folder.
func (*Component) OutBuildDocsDir ¶
OutBuildDocsDir returns the directory of the components build docs directory.
func (*Component) OutBuildShareDir ¶ added in v0.18.0
OutBuildShareDir returns the directory of the components build share directory.
func (*Component) OutCoverageBinDir ¶
OutCoverageBinDir returns the directory of the coverage binary output directory.
func (*Component) OutCoverageDataDir ¶
OutCoverageDataDir returns the directory of the coverage data output directory.
func (*Component) OutImageDir ¶
OutImageDir returns the directory of the image output directory.
func (*Component) OutPackageDir ¶
OutPackageDir returns the directory of the package output directory.
func (*Component) RelOutPath ¶
RelOutPath concats paths relative to the component's out directory.
type ComponentCreator ¶
func NewComponentCreator ¶
func NewComponentCreator(outBaseDir string, transformConfig ConfigAdjuster) ComponentCreator
NewComponentCreator creates a factory method which creates components. It will transform the config if a `transformConfig` function is given.
type Config ¶
type Config struct {
Name string `yaml:"name" validate:"required"`
Version Version `yaml:"version" validate:"required"`
Language string `yaml:"language" validate:"required"`
Inputs map[string]*input.Config `yaml:"inputs"`
Targets map[string]*target.Config `yaml:"targets"`
}
func (*Config) TargetByID ¶
TargetById finds the target by the respective name in the config.