Documentation ¶
Index ¶
- func Main(stdout io.Writer, stderr io.Writer, argv []string) int
- func SetVersion(pairs ...string)
- type Builder
- type CompressAlgorithm
- func (algo CompressAlgorithm) GoString() string
- func (algo CompressAlgorithm) MarshalText() ([]byte, error)
- func (algo CompressAlgorithm) NewWriter(w io.Writer) (io.WriteCloser, error)
- func (algo *CompressAlgorithm) Parse(input string) error
- func (algo *CompressAlgorithm) Set(value string, opt getopt.Option) error
- func (algo CompressAlgorithm) String() string
- func (algo CompressAlgorithm) Suffix() string
- func (algo *CompressAlgorithm) UnmarshalText(input []byte) error
- type File
- type HashAlgorithm
- func (algo HashAlgorithm) FileName() string
- func (algo HashAlgorithm) GoString() string
- func (algo HashAlgorithm) MarshalText() ([]byte, error)
- func (algo HashAlgorithm) New() hash.Hash
- func (algo *HashAlgorithm) Parse(input string) error
- func (algo *HashAlgorithm) Set(value string, opt getopt.Option) error
- func (algo HashAlgorithm) String() string
- func (algo *HashAlgorithm) UnmarshalText(input []byte) error
- type Manifest
- func (manifest Manifest) ConfFiles() []byte
- func (manifest Manifest) ControlFile() []byte
- func (manifest Manifest) PostInstallScript() []byte
- func (manifest Manifest) PostRemoveScript() []byte
- func (manifest Manifest) PreInstallScript() []byte
- func (manifest Manifest) PreRemoveScript() []byte
- func (manifest *Manifest) Resolve(fileSystem fs.FS) error
- func (manifest Manifest) Validate() error
- type Owner
- func (owner Owner) Equal(other Owner) bool
- func (owner Owner) GoString() string
- func (owner Owner) IsZero() bool
- func (owner Owner) MarshalJSON() ([]byte, error)
- func (owner Owner) MarshalText() ([]byte, error)
- func (owner *Owner) Parse(input string) error
- func (owner Owner) String() string
- func (owner *Owner) UnmarshalJSON(input []byte) error
- func (owner *Owner) UnmarshalText(input []byte) error
- type OwnerType
- type Perm
- func (perm Perm) AppendTo(out []byte) []byte
- func (perm Perm) GoString() string
- func (perm Perm) MarshalText() ([]byte, error)
- func (perm *Perm) Parse(input string) error
- func (perm Perm) String() string
- func (perm *Perm) UnmarshalJSON(input []byte) error
- func (perm *Perm) UnmarshalText(input []byte) error
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetVersion ¶ added in v0.1.1
func SetVersion(pairs ...string)
Types ¶
type Builder ¶
type Builder struct { Root fs.FS ZeroTime time.Time Compression CompressAlgorithm Hashes []HashAlgorithm }
func (Builder) BuildControlTarball ¶
type CompressAlgorithm ¶
type CompressAlgorithm byte
const ( CompressAuto CompressAlgorithm = iota CompressNone CompressGZIP CompressBZIP2 CompressXZ CompressZSTD )
func (CompressAlgorithm) GoString ¶
func (algo CompressAlgorithm) GoString() string
func (CompressAlgorithm) MarshalText ¶
func (algo CompressAlgorithm) MarshalText() ([]byte, error)
func (CompressAlgorithm) NewWriter ¶
func (algo CompressAlgorithm) NewWriter(w io.Writer) (io.WriteCloser, error)
func (*CompressAlgorithm) Parse ¶
func (algo *CompressAlgorithm) Parse(input string) error
func (*CompressAlgorithm) Set ¶
func (algo *CompressAlgorithm) Set(value string, opt getopt.Option) error
func (CompressAlgorithm) String ¶
func (algo CompressAlgorithm) String() string
func (CompressAlgorithm) Suffix ¶
func (algo CompressAlgorithm) Suffix() string
func (*CompressAlgorithm) UnmarshalText ¶
func (algo *CompressAlgorithm) UnmarshalText(input []byte) error
type File ¶
type File struct { Name string `json:"name"` Type Type `json:"type"` IsConf bool `json:"isConf"` Perm Perm `json:"perm"` User Owner `json:"user"` Group Owner `json:"group"` MTime time.Time `json:"mtime"` Major *int64 `json:"major"` Minor *int64 `json:"minor"` Path *string `json:"path"` Text *string `json:"text"` Bytes *[]byte `json:"bytes"` Link *string `json:"link"` // contains filtered or unexported fields }
func (File) AsTarHeader ¶
type HashAlgorithm ¶
type HashAlgorithm byte
const ( HashMD5 HashAlgorithm = iota HashSHA1 HashSHA256 )
func (HashAlgorithm) FileName ¶
func (algo HashAlgorithm) FileName() string
func (HashAlgorithm) GoString ¶
func (algo HashAlgorithm) GoString() string
func (HashAlgorithm) MarshalText ¶
func (algo HashAlgorithm) MarshalText() ([]byte, error)
func (HashAlgorithm) New ¶
func (algo HashAlgorithm) New() hash.Hash
func (*HashAlgorithm) Parse ¶
func (algo *HashAlgorithm) Parse(input string) error
func (HashAlgorithm) String ¶
func (algo HashAlgorithm) String() string
func (*HashAlgorithm) UnmarshalText ¶
func (algo *HashAlgorithm) UnmarshalText(input []byte) error
type Manifest ¶
type Manifest struct { Package string `json:"package"` Version string `json:"version"` Arch string `json:"arch"` Section string `json:"section"` Priority string `json:"priority"` Essential string `json:"essential"` Depends string `json:"depends"` PreDepends string `json:"preDepends"` Recommends string `json:"recommends"` Suggests string `json:"suggests"` Enhances string `json:"enhances"` Breaks string `json:"breaks"` Conflicts string `json:"conflicts"` Maintainer string `json:"maintainer"` HomePage string `json:"homePage"` BuiltUsing string `json:"builtUsing"` ShortDescription string `json:"shortDescription"` LongDescription []string `json:"longDescription"` ImplicitDirs []string `json:"implicitDirs"` Files []File `json:"files"` PreInstall []string `json:"preInstall"` PostInstall []string `json:"postInstall"` PreRemove []string `json:"preRemove"` PostRemove []string `json:"postRemove"` // contains filtered or unexported fields }
func (Manifest) ControlFile ¶
func (Manifest) PostInstallScript ¶
func (Manifest) PostRemoveScript ¶
func (Manifest) PreInstallScript ¶
func (Manifest) PreRemoveScript ¶
type Owner ¶
func (Owner) MarshalJSON ¶
func (Owner) MarshalText ¶
func (*Owner) UnmarshalJSON ¶
func (*Owner) UnmarshalText ¶
type Perm ¶
type Perm uint16
func (Perm) MarshalText ¶
func (*Perm) UnmarshalJSON ¶
func (*Perm) UnmarshalText ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.