Documentation ¶
Index ¶
- Constants
- func CopyDir(source string, dest string) (err error)
- func CopyFile(src, dst string) (err error)
- func ExecCmd(head string, parts ...string) error
- func ExecCmdGetOutput(head string, parts ...string) (string, error)
- func ExecCmdGetStderr(head string, parts ...string) (string, error)
- func ExecCmdGetStdoutAndStderr(head string, parts ...string) (string, string, error)
- func ExtractManifestContentFromAci(aciPath string) ([]byte, error)
- func ExtractManifestFromAci(aciPath string) (*schema.ImageManifest, error)
- func GenerateVersion(aciHome string) string
- func GitHash(path string) (string, error)
- func IsDirEmpty(name string) (bool, error)
- func ToAppcDependencies(dependencies []ACFullname) (types.Dependencies, error)
- func ToAppcIsolators(isos []Isolator) (types.Isolators, error)
- func WriteAciManifest(m *AciManifest, targetFile string, projectName string, dgrVersion string) error
- type ACFullname
- func ExtractNameVersionFromManifest(im *schema.ImageManifest) *ACFullname
- func FromAppcDependencies(dependencies types.Dependencies) []ACFullname
- func NewACFullName(s string) *ACFullname
- func NewACFullnameFromNameAndVersion(name string, version string) *ACFullname
- func NewACFullnameWithVersion(source ACFullname, version string) *ACFullname
- func (n ACFullname) DomainName() string
- func (n ACFullname) FullyResolved() (*ACFullname, error)
- func (n ACFullname) LatestVersion() (string, error)
- func (n ACFullname) MarshalJSON() ([]byte, error)
- func (n ACFullname) Name() string
- func (n ACFullname) ShortName() string
- func (n ACFullname) String() string
- func (n ACFullname) TinyName() string
- func (n ACFullname) TinyNameId() string
- func (n *ACFullname) UnmarshalJSON(data []byte) error
- func (n ACFullname) Version() string
- type AciDefinition
- type AciManifest
- type BuildDefinition
- type BuilderCommand
- type BuilderDefinition
- type DgrApp
- type Env
- type InheritDependencyPolicy
- type InsecuOptions
- type Isolator
- type LinuxCapabilitiesSetValue
- type MountInfo
- type PodDefinition
- type PodManifest
- type PullPolicy
- type RktClient
- func (rkt *RktClient) CatManifest(image string) (string, error)
- func (rkt *RktClient) Fetch(image string, pullPolicy PullPolicy) (string, error)
- func (rkt *RktClient) FetchInsecure(image string) (string, error)
- func (rkt *RktClient) GetManifest(image string) (schema.ImageManifest, error)
- func (rkt *RktClient) GetPath() (string, error)
- func (rkt *RktClient) GetVersion() (Version, error)
- func (rkt *RktClient) ImageRm(images string) error
- func (rkt *RktClient) Rm(uuids string) (string, string, error)
- func (rkt *RktClient) RmFromFile(path string) (string, string, error)
- func (rkt *RktClient) Run(args []string) error
- type RktConfig
- type RuntimeApp
- type TestManifest
- type Version
Constants ¶
View Source
const ( FIRST InheritDependencyPolicy = "first" // default LAST = "last" // useful when you want to overlay with a dep as last but inherit from it NONE = "none" )
View Source
const EnvAciPath = "ACI_PATH"
View Source
const EnvAciTarget = "ACI_TARGET"
View Source
const EnvBuilderCommand = "BUILDER_COMMAND"
View Source
const EnvCatchOnError = "CATCH_ON_ERROR"
View Source
const EnvCatchOnStep = "CATCH_ON_STEP"
View Source
const EnvDgrVersion = "DGR_VERSION"
View Source
const EnvLogLevel = "LOG_LEVEL"
View Source
const ManifestDrgVersion = "dgr-version"
View Source
const PathAciManifest = "/aci-manifest.yml"
View Source
const PathBuilder = "/builder"
View Source
const PathImageAci = "/image.aci"
View Source
const PathManifest = "/manifest"
View Source
const PathManifestYmlTmpl = "/aci-manifest.yml.tmpl"
View Source
const PathRootfs = "/rootfs"
View Source
const PrefixBuilder = "builder/"
Variables ¶
This section is empty.
Functions ¶
func ExtractManifestFromAci ¶
func ExtractManifestFromAci(aciPath string) (*schema.ImageManifest, error)
func GenerateVersion ¶
func IsDirEmpty ¶
func ToAppcDependencies ¶
func ToAppcDependencies(dependencies []ACFullname) (types.Dependencies, error)
func WriteAciManifest ¶
func WriteAciManifest(m *AciManifest, targetFile string, projectName string, dgrVersion string) error
Types ¶
type ACFullname ¶
type ACFullname string
func ExtractNameVersionFromManifest ¶
func ExtractNameVersionFromManifest(im *schema.ImageManifest) *ACFullname
func FromAppcDependencies ¶
func FromAppcDependencies(dependencies types.Dependencies) []ACFullname
func NewACFullnameFromNameAndVersion ¶
func NewACFullnameFromNameAndVersion(name string, version string) *ACFullname
func NewACFullnameWithVersion ¶
func NewACFullnameWithVersion(source ACFullname, version string) *ACFullname
func (ACFullname) FullyResolved ¶
func (n ACFullname) FullyResolved() (*ACFullname, error)
func (ACFullname) LatestVersion ¶
func (n ACFullname) LatestVersion() (string, error)
func (ACFullname) MarshalJSON ¶
func (n ACFullname) MarshalJSON() ([]byte, error)
func (ACFullname) String ¶
func (n ACFullname) String() string
func (*ACFullname) UnmarshalJSON ¶
func (n *ACFullname) UnmarshalJSON(data []byte) error
type AciDefinition ¶
type AciDefinition struct { App DgrApp `json:"app,omitempty" yaml:"app,omitempty"` Annotations types.Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` Dependencies []ACFullname `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` PathWhitelist []string `json:"pathWhitelist,omitempty" yaml:"pathWhitelist,omitempty"` }
type AciManifest ¶
type AciManifest struct { NameAndVersion ACFullname `json:"name,omitempty" yaml:"name,omitempty"` Builder BuilderDefinition `json:"builder,omitempty" yaml:"builder,omitempty"` Build BuildDefinition `json:"build,omitempty" yaml:"build,omitempty"` Aci AciDefinition `json:"aci,omitempty" yaml:"aci,omitempty"` Tester TestManifest `json:"tester,omitempty" yaml:"tester,omitempty"` }
func ProcessManifestTemplate ¶
func ProcessManifestTemplate(manifestContent string, data2 interface{}, checkNoValue bool) (*AciManifest, error)
type BuildDefinition ¶
type BuildDefinition struct {
MountPoints []MountInfo `json:"mountPoints,omitempty" yaml:"mountPoints,omitempty"`
}
type BuilderCommand ¶
type BuilderCommand string
const ( CommandBuild BuilderCommand = "build" CommandInit BuilderCommand = "init" CommandTry BuilderCommand = "try" )
func (BuilderCommand) CommandManifestKey ¶
func (b BuilderCommand) CommandManifestKey() (string, error)
type BuilderDefinition ¶
type BuilderDefinition struct { Image ACFullname `json:"image,omitempty" yaml:"image,omitempty"` Environment types.Environment `json:"environment,omitempty" yaml:"environment,omitempty"` Dependencies []ACFullname `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` MountPoints []MountInfo `json:"mountPoints,omitempty" yaml:"mountPoints,omitempty"` }
type DgrApp ¶
type DgrApp struct { Exec types.Exec `json:"exec,omitempty" yaml:"exec,omitempty"` User string `json:"user,omitempty" yaml:"user,omitempty"` Group string `json:"group,omitempty" yaml:"group,omitempty"` SupplementaryGIDs []int `json:"supplementaryGIDs,omitempty" yaml:"supplementaryGIDs,omitempty"` WorkingDirectory string `json:"workingDirectory,omitempty" yaml:"workingDirectory,omitempty"` Environment types.Environment `json:"environment,omitempty" yaml:"environment,omitempty"` MountPoints []types.MountPoint `json:"mountPoints,omitempty" yaml:"mountPoints,omitempty"` Ports []types.Port `json:"ports,omitempty" yaml:"ports,omitempty"` Isolators []Isolator `json:"isolators,omitempty" yaml:"isolators,omitempty"` }
type InheritDependencyPolicy ¶
type InheritDependencyPolicy string
func (InheritDependencyPolicy) GetInheritDependency ¶
func (i InheritDependencyPolicy) GetInheritDependency(r RuntimeApp) *ACFullname
type InsecuOptions ¶
type InsecuOptions []string
func (InsecuOptions) HasImage ¶
func (i InsecuOptions) HasImage() bool
func (InsecuOptions) ToDiscoveryInsecureOption ¶
func (i InsecuOptions) ToDiscoveryInsecureOption() discovery.InsecureOption
type LinuxCapabilitiesSetValue ¶
type LinuxCapabilitiesSetValue struct {
Set []types.LinuxCapability `json:"set"`
}
type PodDefinition ¶
type PodDefinition struct { Apps []RuntimeApp `json:"apps,omitempty" yaml:"apps,omitempty"` Volumes []types.Volume `json:"volumes,omitempty" yaml:"volumes,omitempty"` Isolators []types.Isolator `json:"isolators,omitempty" yaml:"isolators,omitempty"` Annotations types.Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` Ports []types.ExposedPort `json:"ports,omitempty" yaml:"ports,omitempty"` }
type PodManifest ¶
type PodManifest struct { Name ACFullname `json:"name,omitempty" yaml:"name,omitempty"` Pod *PodDefinition `json:"pod,omitempty" yaml:"pod,omitempty"` }
type PullPolicy ¶
type PullPolicy string
const ( PullPolicyNever PullPolicy = "never" PullPolicyNew PullPolicy = "new" PullPolicyUpdate PullPolicy = "update" )
func (PullPolicy) IsValid ¶
func (p PullPolicy) IsValid() bool
type RktClient ¶
type RktClient struct { Version Version // contains filtered or unexported fields }
func NewRktClient ¶
func (*RktClient) Fetch ¶
func (rkt *RktClient) Fetch(image string, pullPolicy PullPolicy) (string, error)
func (*RktClient) GetManifest ¶
func (rkt *RktClient) GetManifest(image string) (schema.ImageManifest, error)
func (*RktClient) GetVersion ¶
func (*RktClient) RmFromFile ¶
type RktConfig ¶
type RktConfig struct { Path string `yaml:"path"` InsecureOptions InsecuOptions `yaml:"insecureOptions"` LocalConfig string `yaml:"localConfig"` SystemConfig string `yaml:"systemConfig"` UserConfig string `yaml:"userConfig"` PullPolicy PullPolicy `yaml:"pullPolicy"` TrustKeysFromHttps bool `yaml:"trustKeysFromHttps"` NoStore bool `yaml:"noStore"` StoreOnly bool `yaml:"storeOnly"` // contains filtered or unexported fields }
type RuntimeApp ¶
type RuntimeApp struct { InheritDependencyPolicy InheritDependencyPolicy `json:"inheritDependencyPolicy,omitempty" yaml:"inheritDependencyPolicy,omitempty"` Dependencies []ACFullname `json:"dependencies,omitempty" yaml:"dependencies,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` App DgrApp `json:"app,omitempty" yaml:"app,omitempty"` Mounts []schema.Mount `json:"mounts,omitempty" yaml:"mounts,omitempty"` Annotations types.Annotations `json:"annotations,omitempty" yaml:"annotations,omitempty"` }
type TestManifest ¶
type TestManifest struct { Builder BuilderDefinition `json:"builder,omitempty" yaml:"builder,omitempty"` Aci AciDefinition `json:"aci,omitempty" yaml:"aci,omitempty"` }
type Version ¶
type Version string
Version provides utility methods for comparing versions.
func (Version) GreaterThan ¶
GreaterThan checks if a version is greater than another
func (Version) GreaterThanOrEqualTo ¶
GreaterThanOrEqualTo checks if a version is greater than or equal to another
func (Version) LessThanOrEqualTo ¶
LessThanOrEqualTo checks if a version is less than or equal to another
Click to show internal directories.
Click to hide internal directories.