Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NarInfo ¶
type NarInfo struct {
StorePath string // The full nix store path (/nix/store/…-pname-version)
URL string // The relative location to the .nar[.xz,…] file. Usually nar/$fileHash.nar[.xz]
Compression string // The compression method file at URL is compressed with (none,xz,…)
FileHash *nixhash.HashWithEncoding // The hash of the file at URL
FileSize uint64 // The size of the file at URL, in bytes
// The hash of the .nar file, after possible decompression
// Identical to FileHash if no compression is used.
NarHash *nixhash.HashWithEncoding
// The size of the .nar file, after possible decompression, in bytes.
// Identical to FileSize if no compression is used.
NarSize uint64
// References to other store paths, contained in the .nar file
References []string
// Path of the .drv for this store path
Deriver string
// This doesn't seem to be used at all?
System string
// Signatures, if any.
Signatures []*Signature
// TODO: Figure out the meaning of this
CA string
}
NarInfo represents a parsed .narinfo file.
func (*NarInfo) Check ¶
Check does some sanity checking on a NarInfo struct, such as:
- ensuring the paths in StorePath, References and Deriver are syntactically valid (references and deriver first need to be made absolute)
- when no compression is present, ensuring File{Hash,Size} and Nar{Hash,Size} are equal
func (NarInfo) ContentType ¶
ContentType returns the mime content type of the object.
type Signature ¶
type Signature struct {
KeyName string // An identifier for the key that's used for the signature
Digest []byte // The digest itself, in bytes
}
Signature is used to sign a NarInfo (parts of it, to be precise).
func MustParseSignatureLine ¶
MustParseSignatureLine parses a signature line and returns a Signature struct, or panics on error.
func ParseSignatureLine ¶
ParseSignatureLine parses a signature line and returns a Signature struct, or error.
Click to show internal directories.
Click to hide internal directories.