Documentation ¶
Index ¶
- Constants
- func FetchBinary(ctx context.Context, localCacheDir, name, binaryName, version string, ...) (string, error)
- func KnownInitFlavors() []string
- func KnownPackageFlavors() []string
- func KnownPlatformFlavors() []string
- type InitFlavor
- type PackageFlavor
- type PackageOptions
- type PlatformFlavor
- type Target
- func (t *Target) InitFromString(s string) error
- func (t *Target) PackageFromString(s string) error
- func (t *Target) Parse(s string) error
- func (t *Target) PkgExtension() string
- func (t *Target) PlatformBinaryName(input string) string
- func (t *Target) PlatformExtensionName(input string) string
- func (t *Target) PlatformFromString(s string) error
- func (t *Target) String() string
Constants ¶
const ( LaunchD InitFlavor = "launchd" Systemd = "systemd" Init = "init" Upstart = "upstart" WindowsService = "service" NoInit = "none" UpstartAmazonAMI = "upstart_amazon_ami" )
const ( Darwin PlatformFlavor = "darwin" Windows = "windows" Linux = "linux" )
const ( Pkg PackageFlavor = "pkg" Tar = "tar" Deb = "deb" Rpm = "rpm" Msi = "msi" Pacman = "pacman" )
Variables ¶
This section is empty.
Functions ¶
func FetchBinary ¶
func FetchBinary(ctx context.Context, localCacheDir, name, binaryName, version string, target Target) (string, error)
FetchBinary will synchronously download a binary as per the supplied desired version and platform identifiers. The path to the downloaded binary is returned or an error if the operation did not succeed.
You must specify a localCacheDir, to reuse downloads
func KnownInitFlavors ¶ added in v0.11.7
func KnownInitFlavors() []string
func KnownPackageFlavors ¶ added in v0.11.7
func KnownPackageFlavors() []string
func KnownPlatformFlavors ¶ added in v0.11.7
func KnownPlatformFlavors() []string
Types ¶
type InitFlavor ¶
type InitFlavor string
func (*InitFlavor) String ¶
func (i *InitFlavor) String() string
String returns the string representation
type PackageFlavor ¶
type PackageFlavor string
func (*PackageFlavor) String ¶
func (i *PackageFlavor) String() string
String returns the string representation
type PackageOptions ¶
type PackageOptions struct { PackageVersion string // What version in this package. If unset, autodetection will be attempted. OsqueryVersion string OsqueryFlags []string // Additional flags to pass to the runtime osquery instance LauncherVersion string ExtensionVersion string Hostname string Secret string Transport string Insecure bool InsecureTransport bool UpdateChannel string InitialRunner bool ControlHostname string DisableControlTLS bool Identifier string OmitSecret bool CertPins string RootPEM string CacheDir string NotaryURL string MirrorURL string NotaryPrefix string WixPath string MSIUI bool WixSkipCleanup bool AppleSigningKey string // apple signing key WindowsUseSigntool bool // whether to use signtool.exe on windows WindowsSigntoolArgs []string // Extra args for signtool. May be needed for finding a key // contains filtered or unexported fields }
PackageOptions encapsulates the launcher build options. It's populated by callers, such as command line flags. It may change.
func NewPackager ¶
func NewPackager() *PackageOptions
NewPackager returns a PackageOptions struct. You can, however, just create one directly.
type PlatformFlavor ¶
type PlatformFlavor string
func (*PlatformFlavor) String ¶
func (i *PlatformFlavor) String() string
String returns the string representation
type Target ¶
type Target struct { Init InitFlavor Package PackageFlavor Platform PlatformFlavor }
Target is the platform being targeted by the build. As "platform" has several axis, we use a stuct to convey them.
func (*Target) InitFromString ¶
InitFromString sets a target's init flavor from string representation
func (*Target) PackageFromString ¶
PackageFromString sets a target's package flavor from string representation
func (*Target) Parse ¶
Parse parses a string in the form platform-init-package and sets the target accordingly.
func (*Target) PkgExtension ¶
Extension returns the extension that the resulting filesystem package should have. This may need to gain a PlatformFlavor in the future, and not just a straight string(PackageFlavor)
func (*Target) PlatformBinaryName ¶
PlatformBinaryName is a helper to return the platform specific binary suffix.
func (*Target) PlatformExtensionName ¶
PlatformExtensionName is a helper to return the platform specific extension name.
func (*Target) PlatformFromString ¶
PlatformFromString sets a target's platform flavor from string representation