sdk

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoreOSEpoch = 1372636800
)

Variables

View Source
var (
	USRAUUID = uuid.UUID{0x71, 0x30, 0xC9, 0x4A, 0x21, 0x3A, 0x4E, 0x5A, 0x8E, 0x26, 0x6C, 0xCE, 0x96, 0x62, 0xF1, 0x32}
	USRBUUID = uuid.UUID{0xE0, 0x3D, 0xD3, 0x5C, 0x7C, 0x2D, 0x4A, 0x47, 0xB3, 0xFE, 0x27, 0xF1, 0x57, 0x80, 0xA5, 0x7C}
)

Partition UUIDs for CoreOS systems.

Functions

func ApplyPatch added in v0.20.0

func ApplyPatch(chroot string, useHostDNS bool, repositoryPath, patchPath string) error

func BoardRoot added in v0.1.0

func BoardRoot(board string) string

func BuildImageDir

func BuildImageDir(board, version string) string

version may be "latest" or a full version like "752.1.0+2015-07-27-1656"

func BuildRoot

func BuildRoot() string

func DefaultBoard

func DefaultBoard() string

func Delete

func Delete(name string) error

func DownloadFile

func DownloadFile(file, fileURL string, client *http.Client) error

func DownloadSDK

func DownloadSDK(urlHost, urlPath, version, verifyKeyFile, JSONKeyFile string) error

func DownloadSignedFile

func DownloadSignedFile(file, url string, client *http.Client, verifyKeyFile string) error

func Enter

func Enter(name string, bindGpgAgent, useHostDNS bool, args ...string) error

Enter the chroot with a login shell, optionally invoking a command. The command may be prefixed by environment variable assignments.

func GetCoreOSAge

func GetCoreOSAge() int64

GetCoreOSAge returns the number of days since the CoreOS epoch.

func GetDefaultAppId

func GetDefaultAppId() string

func RepoCache

func RepoCache() string

func RepoInit

func RepoInit(chroot, url, manifestBranch, name string, useHostDNS bool) error

func RepoRoot

func RepoRoot() string

func RepoSync added in v0.1.0

func RepoSync(chroot string, force, verbose, useHostDNS bool) error

func RepoVerifyTag added in v0.5.0

func RepoVerifyTag(branch string) error

func SetManifestSDKVersion added in v0.20.0

func SetManifestSDKVersion(version string) error

func Setup

func Setup(name string) error

func TarballName

func TarballName(version string) string

func TarballURL

func TarballURL(urlHost, urlPath, version string) string

func Unpack

func Unpack(version, name string) error

func UpdateFile

func UpdateFile(file, url string, client *http.Client) error

UpdateFile downloads a file to temp dir and replaces the file only if contents have changed. If tempDir is "" default will be os.TempDir(). Leave client nil to use default.

func UpdateSignedFile

func UpdateSignedFile(file, url string, client *http.Client, verifyKeyFile string) error

UpdateSignedFile will download and replace the local file if the published signature doesn't match the local copy. Leave client nil to use default.

func Verify

func Verify(signed, signature io.Reader, key string) error

func VerifyFile

func VerifyFile(file, verifyKeyFile string) error

Types

type Versions added in v0.1.0

type Versions struct {
	Version    string
	VersionID  string
	BuildID    string
	SDKVersion string
}

func OSRelease added in v0.1.0

func OSRelease(root string) (ver Versions, err error)

func VersionsFromDir added in v0.1.0

func VersionsFromDir(dir string) (ver Versions, err error)

func VersionsFromManifest added in v0.1.0

func VersionsFromManifest() (Versions, error)

func VersionsFromRemoteRepo added in v0.1.0

func VersionsFromRemoteRepo(url, branch string) (ver Versions, err error)

func VersionsFromSignedRemoteRepo added in v0.5.0

func VersionsFromSignedRemoteRepo(url, branch string) (ver Versions, err error)

Directories

Path Synopsis
repo is a limited implementation of the python repo git front end.
repo is a limited implementation of the python repo git front end.

Jump to

Keyboard shortcuts

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