packaging

package
v0.11.16 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2020 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LaunchD          InitFlavor = "launchd"
	Systemd                     = "systemd"
	Init                        = "init"
	Upstart                     = "upstart"
	WindowsService              = "service"
	NoInit                      = "none"
	UpstartAmazonAMI            = "upstart_amazon_ami"
)
View Source
const (
	Darwin  PlatformFlavor = "darwin"
	Windows                = "windows"
	Linux                  = "linux"
)
View Source
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
	DisableService    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.

func (*PackageOptions) Build

func (p *PackageOptions) Build(ctx context.Context, packageWriter io.Writer, target Target) error

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

func (t *Target) InitFromString(s string) error

InitFromString sets a target's init flavor from string representation

func (*Target) PackageFromString

func (t *Target) PackageFromString(s string) error

PackageFromString sets a target's package flavor from string representation

func (*Target) Parse

func (t *Target) Parse(s string) error

Parse parses a string in the form platform-init-package and sets the target accordingly.

func (*Target) PkgExtension

func (t *Target) PkgExtension() string

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

func (t *Target) PlatformBinaryName(input string) string

PlatformBinaryName is a helper to return the platform specific binary suffix.

func (*Target) PlatformExtensionName

func (t *Target) PlatformExtensionName(input string) string

PlatformExtensionName is a helper to return the platform specific extension name.

func (*Target) PlatformFromString

func (t *Target) PlatformFromString(s string) error

PlatformFromString sets a target's platform flavor from string representation

func (*Target) String

func (t *Target) String() string

String returns the string representation

Directories

Path Synopsis
Code generated by go-bindata.
Code generated by go-bindata.

Jump to

Keyboard shortcuts

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