Documentation
¶
Index ¶
- Variables
- func NewCompressionWriter(compression Compression, dest io.Writer) (io.WriteCloser, error)
- type Compression
- type Database
- func (db *Database) Add(pkg *Package, replaceIfExists bool) error
- func (db *Database) Find(name string, version string) (*Package, error)
- func (db *Database) FindAll(name string) []*Package
- func (db *Database) Remove(name string, version string) error
- func (db *Database) RemoveAll(name string)
- func (db *Database) Write(mainDBDest io.Writer, fileDBDest io.Writer, compression Compression) error
- type Package
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUnknownCompression = errors.New("unknown compression format")
View Source
var MagicBZ = [...]byte{0x42, 0x5a, 0x68}
View Source
var MagicGZ = [...]byte{0x1f, 0x8b}
View Source
var MagicXZ = [...]byte{0xfd, 0x37, 0x7a, 0x58, 0x5a, 0x00}
View Source
var MagicZST = [...]byte{0x28, 0xb5, 0x2f, 0xfd}
Functions ¶
func NewCompressionWriter ¶
func NewCompressionWriter(compression Compression, dest io.Writer) (io.WriteCloser, error)
Types ¶
type Compression ¶
type Compression int
const ( CompressionGZ Compression = iota CompressionBZ CompressionXZ CompressionZST )
func DetectCompressionFormat ¶
func NewDetectedCompressionReader ¶
func NewDetectedCompressionReader(source io.Reader) (io.Reader, io.ReadCloser, Compression, error)
func (*Compression) CompressionFileExtension ¶
func (cmp *Compression) CompressionFileExtension() string
func (*Compression) MarshalText ¶
func (cmp *Compression) MarshalText() ([]byte, error)
func (*Compression) UnmarshalText ¶
func (cmp *Compression) UnmarshalText(text []byte) error
type Package ¶
type Package struct { Name string Base string Version string Description string URL *url.URL BuildDate time.Time Packager string Size uint64 CompressedSize uint64 Architecture string Licenses []string Filenames []string Groups []string Depends []string Replaces []string Conflicts []string Provides []string OptionalDepends []string MakeDepends []string CheckDepends []string MD5 []byte SHA256 []byte Signature []byte Compression Compression }
func (*Package) RepositoryFilename ¶
Click to show internal directories.
Click to hide internal directories.