Documentation ¶
Index ¶
- Variables
- func BuildEPK(projectDir string, inMemory bool, buildConfig Build, logger *Logger) (big.Int, string, error, error)
- func CreateTar(targetDir string, output io.Writer) error
- func GenerateRepository(directory string, privateKey ed25519.PrivateKey, logger *Logger) (error, error)
- func PackageEPK(metaData Metadata, build Build, tempDir string, output string, ...) (error, error)
- type Build
- type Config
- type Log
- type Logger
- type Metadata
- type PotentiallyNullString
- type SpecialFiles
Constants ¶
This section is empty.
Variables ¶
var ConstGenerateRepositoryEPKMagicNumber = []byte{0x65, 0x6F, 0x6E}
ConstGenerateRepositoryEPKMagicNumber is the magic number for an EPK repository: "eon" in ASCII / UTF-8, for obvious reasons
var ConstGenerateRepositoryRepoDataOffset int64 = 99
ConstGenerateRepositoryRepoDataOffset is the offset of the repository data in the repository.json file: it is 3 (magic) + 64 (the signature) + 32 (the public key) = 99
var ConstPackageEPKBigEndian = []byte{0x62}
ConstPackageEPKBigEndian is the letter "b" in ASCII / UTF-8
var ConstPackageEPKInitialByteOffset int64 = 12
ConstPackageEPKInitialByteOffset is the initial byte offset for an EPK file until we arrive at the signature. 12 = 3 + 1 + 8: 3 for the magic number, 1 for the endian, and 8 for the tar offset
var ConstPackageEPKLittleEndian = []byte{0x6C}
ConstPackageEPKLittleEndian is the letter "l" in ASCII / UTF-8
var ConstPackageEPKMagicNumber = []byte{0x65, 0x70, 0x6B}
ConstPackageEPKMagicNumber is the magic number for an EPK file: "epk" in ASCII / UTF-8
var ConstPackageEPKMetadataOffset = 108
ConstPackageEPKMetadataOffset is the offset of the metadata in the EPK file
var ConstPackageEPKPublicKeyLength int64 = 32
ConstPackageEPKPublicKeyLength is the length of the public key
var ConstPackageEPKSignatureLength int64 = 64
ConstPackageEPKSignatureLength is the length of the signature
var ErrBuildEPKBadBuildType = errors.New("bad build type")
var ErrBuildEPKBuildShError = errors.New("error creating build.sh")
var ErrBuildEPKChrootError = errors.New("chroot builds are not supported yet")
var ErrBuildEPKCopyHooksError = errors.New("error copying hooks")
var ErrBuildEPKCountingFilesError = errors.New("error counting files")
var ErrBuildEPKCreateHooksError = errors.New("error creating hooks directory")
var ErrBuildEPKExecutingBuildShError = errors.New("error executing build.sh")
var ErrBuildEPKTargetRootError = errors.New("error creating target root")
var ErrBuildEPKTemporaryDirectoryError = errors.New("error creating temporary directory")
var ErrBuildEPKUnrestrictedError = errors.New("unrestricted builds are not supported yet")
var ErrBuildEPKWritingBuildShError = errors.New("error writing to build.sh")
var ErrEternityJsonMapError = errors.New("error mapping eternity.json")
var ErrEternityJsonOpenError = errors.New("error opening eternity.json")
var ErrEternityJsonParseError = errors.New("error parsing eternity.json")
var ErrEternityJsonReadError = errors.New("error reading eternity.json")
var ErrGenerateRepositoryCannotCloseFile = errors.New("error closing file")
var ErrGenerateRepositoryCannotMarshalJSON = errors.New("error marshalling JSON")
var ErrGenerateRepositoryCannotOpenFile = errors.New("error opening file for writing")
var ErrGenerateRepositoryCannotUnmarshalJSON = errors.New("error unmarshalling JSON")
var ErrGenerateRepositoryCannotWriteFile = errors.New("error writing to file")
var ErrGenerateRepositoryFailedToWalk = errors.New("error walking directory")
var ErrGenerateRepositoryNotDirectory = errors.New("not a directory")
var ErrGenerateRepositoryRepositoryNameContainsSlash = errors.New("repository name contains a slash")
var ErrGenerateRepositoryStatError = errors.New("error stating file or directory")
var ErrPackageEPKCannotCloseFile = errors.New("error closing EPK file")
var ErrPackageEPKCannotOpenFile = errors.New("error opening EPK file for writing")
var ErrPackageEPKCannotWriteFile = errors.New("error writing to EPK file")
var ErrPackageEPKCompressCloseError = errors.New("error closing EPK ZStandard writer")
var ErrPackageEPKCreateCompressionWriterError = errors.New("error creating ZStandard writer")
var ErrPackageEPKCreateDistDirError = errors.New("error creating dist directory")
var ErrPackageEPKFailedToSeek = errors.New("error seeking in EPK file")
var ErrPackageEPKFailedToWriteHash = errors.New("error writing hash to EPK file")
var ErrPackageEPKJSONMarshal = errors.New("error marshalling JSON")
var ErrPackageEPKMoveToDistError = errors.New("error moving to dist directory")
var ErrPackageEPKTarError = errors.New("error creating tar")
Functions ¶
func BuildEPK ¶
func BuildEPK(projectDir string, inMemory bool, buildConfig Build, logger *Logger) (big.Int, string, error, error)
BuildEPK builds the EPK package into a build directory
func GenerateRepository ¶
Types ¶
type Build ¶
type Build struct { Type string Dependencies []string Steps []string TargetRoot string HooksFolder PotentiallyNullString FilesFolder PotentiallyNullString }
Build is a struct that contains the build configuration of the package
type Logger ¶
type Logger struct { LogFunc func(Log) string PromptSupported bool StdoutSupported bool Stdout io.Writer }
Logger is a struct that contains the functions and properties of the logger
type Metadata ¶
type Metadata struct { Name string Description string LongDescription string Version semver.Version Author string License string Architecture string // The decompressed size may be larger than the int64 allocated for a compressed file DecompressedSize big.Int Dependencies []string SpecialFiles SpecialFiles }
Metadata is a struct that contains the metadata of the package
type PotentiallyNullString ¶
PotentiallyNullString is a struct that contains a string that may be null
type SpecialFiles ¶
SpecialFiles is a struct that contains the special files that are not to be deleted or replaced