Versions in this module Expand all Collapse all v0 v0.4.1 Mar 12, 2014 Changes in this version + const DepFollowAllVariants + const DepFollowBuild + const DepFollowRecommends + const DepFollowSource + const DepFollowSuggests + const VersionDontCare + const VersionEqual + const VersionGreater + const VersionGreaterOrEqual + const VersionLess + const VersionLessOrEqual + var ErrMalformedStanza = errors.New("malformed stanza syntax") + func CompareVersions(ver1, ver2 string) int + func ParsePPA(ppaURL string) (url string, distribution string, components []string, err error) + type ControlFileReader struct + func NewControlFileReader(r io.Reader) *ControlFileReader + func (c *ControlFileReader) ReadStanza() (Stanza, error) + type Dependency struct + Architecture string + Pkg string + Relation int + Version string + func ParseDependency(dep string) (d Dependency, err error) + func ParseDependencyVariants(variants string) (l []Dependency, err error) + func (d *Dependency) Hash() string + func (d *Dependency) String() string + type LocalRepo struct + Comment string + Name string + UUID string + func NewLocalRepo(name string, comment string) *LocalRepo + func (repo *LocalRepo) Decode(input []byte) error + func (repo *LocalRepo) Encode() []byte + func (repo *LocalRepo) Key() []byte + func (repo *LocalRepo) NumPackages() int + func (repo *LocalRepo) RefKey() []byte + func (repo *LocalRepo) RefList() *PackageRefList + func (repo *LocalRepo) String() string + func (repo *LocalRepo) UpdateRefList(reflist *PackageRefList) + type LocalRepoCollection struct + func NewLocalRepoCollection(db database.Storage) *LocalRepoCollection + func (collection *LocalRepoCollection) Add(repo *LocalRepo) error + func (collection *LocalRepoCollection) ByName(name string) (*LocalRepo, error) + func (collection *LocalRepoCollection) ByUUID(uuid string) (*LocalRepo, error) + func (collection *LocalRepoCollection) Drop(repo *LocalRepo) error + func (collection *LocalRepoCollection) ForEach(handler func(*LocalRepo) error) error + func (collection *LocalRepoCollection) Len() int + func (collection *LocalRepoCollection) LoadComplete(repo *LocalRepo) error + func (collection *LocalRepoCollection) Update(repo *LocalRepo) error + type Package struct + Architecture string + FilesHash uint64 + IsSource bool + Name string + Provides []string + Source string + SourceArchitecture string + Version string + func NewPackageFromControlFile(input Stanza) *Package + func NewSourcePackageFromControlFile(input Stanza) (*Package, error) + func (p *Package) Deps() *PackageDependencies + func (p *Package) DownloadList(packagePool aptly.PackagePool) (result []PackageDownloadTask, err error) + func (p *Package) Equals(p2 *Package) bool + func (p *Package) Extra() Stanza + func (p *Package) FilepathList(packagePool aptly.PackagePool) ([]string, error) + func (p *Package) Files() PackageFiles + func (p *Package) GetDependencies(options int) (dependencies []string) + func (p *Package) Key(prefix string) []byte + func (p *Package) LinkFromPool(publishedStorage aptly.PublishedStorage, packagePool aptly.PackagePool, ...) error + func (p *Package) MatchesArchitecture(arch string) bool + func (p *Package) MatchesDependency(dep Dependency) bool + func (p *Package) PoolDirectory() (string, error) + func (p *Package) Stanza() (result Stanza) + func (p *Package) String() string + func (p *Package) UpdateFiles(files PackageFiles) + func (p *Package) VerifyFiles(packagePool aptly.PackagePool) (result bool, err error) + type PackageCollection struct + func NewPackageCollection(db database.Storage) *PackageCollection + func (collection *PackageCollection) AllPackageRefs() *PackageRefList + func (collection *PackageCollection) ByKey(key []byte) (*Package, error) + func (collection *PackageCollection) DeleteByKey(key []byte) error + func (collection *PackageCollection) Update(p *Package) error + type PackageDependencies struct + BuildDepends []string + BuildDependsInDep []string + Depends []string + PreDepends []string + Recommends []string + Suggests []string + type PackageDiff struct + Left *Package + Right *Package + type PackageDiffs []PackageDiff + type PackageDownloadTask struct + Checksums utils.ChecksumInfo + DestinationPath string + RepoURI string + type PackageFile struct + Checksums utils.ChecksumInfo + Filename string + func (f *PackageFile) DownloadURL() string + func (f *PackageFile) Verify(packagePool aptly.PackagePool) (bool, error) + type PackageFiles []PackageFile + func (files PackageFiles) Hash() uint64 + func (files PackageFiles) Len() int + func (files PackageFiles) Less(i, j int) bool + func (files PackageFiles) Swap(i, j int) + type PackageList struct + func NewPackageList() *PackageList + func NewPackageListFromRefList(reflist *PackageRefList, collection *PackageCollection, ...) (*PackageList, error) + func (l *PackageList) Add(p *Package) error + func (l *PackageList) Append(pl *PackageList) error + func (l *PackageList) Architectures(includeSource bool) (result []string) + func (l *PackageList) Filter(queries []string, withDependencies bool, source *PackageList, ...) (*PackageList, error) + func (l *PackageList) ForEach(handler func(*Package) error) error + func (l *PackageList) Len() int + func (l *PackageList) Less(i, j int) bool + func (l *PackageList) PrepareIndex() + func (l *PackageList) Remove(p *Package) + func (l *PackageList) Search(dep Dependency) *Package + func (l *PackageList) Swap(i, j int) + func (l *PackageList) VerifyDependencies(options int, architectures []string, sources *PackageList, ...) ([]Dependency, error) + type PackageRefList struct + Refs [][]byte + func NewPackageRefList() *PackageRefList + func NewPackageRefListFromPackageList(list *PackageList) *PackageRefList + func (l *PackageRefList) Decode(input []byte) error + func (l *PackageRefList) Diff(r *PackageRefList, packageCollection *PackageCollection) (result PackageDiffs, err error) + func (l *PackageRefList) Encode() []byte + func (l *PackageRefList) ForEach(handler func([]byte) error) error + func (l *PackageRefList) Len() int + func (l *PackageRefList) Less(i, j int) bool + func (l *PackageRefList) Merge(r *PackageRefList, overrideMatching bool) (result *PackageRefList) + func (l *PackageRefList) Substract(r *PackageRefList) *PackageRefList + func (l *PackageRefList) Swap(i, j int) + type PublishedRepo struct + Architectures []string + Component string + Distribution string + Prefix string + SnapshotUUID string + UUID string + func NewPublishedRepo(prefix string, distribution string, component string, architectures []string, ...) (*PublishedRepo, error) + func (p *PublishedRepo) Decode(input []byte) error + func (p *PublishedRepo) Encode() []byte + func (p *PublishedRepo) Key() []byte + func (p *PublishedRepo) Publish(packagePool aptly.PackagePool, publishedStorage aptly.PublishedStorage, ...) error + func (p *PublishedRepo) RemoveFiles(publishedStorage aptly.PublishedStorage, ...) error + func (p *PublishedRepo) String() string + type PublishedRepoCollection struct + func NewPublishedRepoCollection(db database.Storage) *PublishedRepoCollection + func (collection *PublishedRepoCollection) Add(repo *PublishedRepo) error + func (collection *PublishedRepoCollection) ByPrefixDistribution(prefix, distribution string) (*PublishedRepo, error) + func (collection *PublishedRepoCollection) BySnapshot(snapshot *Snapshot) []*PublishedRepo + func (collection *PublishedRepoCollection) ByUUID(uuid string) (*PublishedRepo, error) + func (collection *PublishedRepoCollection) CheckDuplicate(repo *PublishedRepo) *PublishedRepo + func (collection *PublishedRepoCollection) ForEach(handler func(*PublishedRepo) error) error + func (collection *PublishedRepoCollection) Len() int + func (collection *PublishedRepoCollection) LoadComplete(repo *PublishedRepo, snapshotCollection *SnapshotCollection) error + func (collection *PublishedRepoCollection) Remove(publishedStorage aptly.PublishedStorage, prefix, distribution string) error + func (collection *PublishedRepoCollection) Update(repo *PublishedRepo) error + type RemoteRepo struct + Architectures []string + ArchiveRoot string + Components []string + Distribution string + DownloadSources bool + LastDownloadDate time.Time + Meta Stanza + Name string + ReleaseFiles map[string]utils.ChecksumInfo + UUID string + func NewRemoteRepo(name string, archiveRoot string, distribution string, components []string, ...) (*RemoteRepo, error) + func (repo *RemoteRepo) BinaryURL(component string, architecture string) *url.URL + func (repo *RemoteRepo) Decode(input []byte) error + func (repo *RemoteRepo) Download(progress aptly.Progress, d aptly.Downloader, ...) error + func (repo *RemoteRepo) Encode() []byte + func (repo *RemoteRepo) Fetch(d aptly.Downloader, verifier utils.Verifier) error + func (repo *RemoteRepo) FlatBinaryURL() *url.URL + func (repo *RemoteRepo) FlatSourcesURL() *url.URL + func (repo *RemoteRepo) IsFlat() bool + func (repo *RemoteRepo) Key() []byte + func (repo *RemoteRepo) NumPackages() int + func (repo *RemoteRepo) PackageURL(filename string) *url.URL + func (repo *RemoteRepo) RefKey() []byte + func (repo *RemoteRepo) RefList() *PackageRefList + func (repo *RemoteRepo) ReleaseURL(name string) *url.URL + func (repo *RemoteRepo) SourcesURL(component string) *url.URL + func (repo *RemoteRepo) String() string + type RemoteRepoCollection struct + func NewRemoteRepoCollection(db database.Storage) *RemoteRepoCollection + func (collection *RemoteRepoCollection) Add(repo *RemoteRepo) error + func (collection *RemoteRepoCollection) ByName(name string) (*RemoteRepo, error) + func (collection *RemoteRepoCollection) ByUUID(uuid string) (*RemoteRepo, error) + func (collection *RemoteRepoCollection) Drop(repo *RemoteRepo) error + func (collection *RemoteRepoCollection) ForEach(handler func(*RemoteRepo) error) error + func (collection *RemoteRepoCollection) Len() int + func (collection *RemoteRepoCollection) LoadComplete(repo *RemoteRepo) error + func (collection *RemoteRepoCollection) Update(repo *RemoteRepo) error + type Snapshot struct + CreatedAt time.Time + Description string + Name string + SourceIDs []string + SourceKind string + UUID string + func NewSnapshotFromLocalRepo(name string, repo *LocalRepo) (*Snapshot, error) + func NewSnapshotFromPackageList(name string, sources []*Snapshot, list *PackageList, description string) *Snapshot + func NewSnapshotFromRefList(name string, sources []*Snapshot, list *PackageRefList, description string) *Snapshot + func NewSnapshotFromRepository(name string, repo *RemoteRepo) (*Snapshot, error) + func (s *Snapshot) Decode(input []byte) error + func (s *Snapshot) Encode() []byte + func (s *Snapshot) Key() []byte + func (s *Snapshot) NumPackages() int + func (s *Snapshot) RefKey() []byte + func (s *Snapshot) RefList() *PackageRefList + func (s *Snapshot) String() string + type SnapshotCollection struct + func NewSnapshotCollection(db database.Storage) *SnapshotCollection + func (collection *SnapshotCollection) Add(snapshot *Snapshot) error + func (collection *SnapshotCollection) ByLocalRepoSource(repo *LocalRepo) []*Snapshot + func (collection *SnapshotCollection) ByName(name string) (*Snapshot, error) + func (collection *SnapshotCollection) ByRemoteRepoSource(repo *RemoteRepo) []*Snapshot + func (collection *SnapshotCollection) BySnapshotSource(snapshot *Snapshot) []*Snapshot + func (collection *SnapshotCollection) ByUUID(uuid string) (*Snapshot, error) + func (collection *SnapshotCollection) Drop(snapshot *Snapshot) error + func (collection *SnapshotCollection) ForEach(handler func(*Snapshot) error) error + func (collection *SnapshotCollection) Len() int + func (collection *SnapshotCollection) LoadComplete(snapshot *Snapshot) error + func (collection *SnapshotCollection) Update(snapshot *Snapshot) error + type Stanza map[string]string + func GetControlFileFromDeb(packageFile string) (Stanza, error) + func GetControlFileFromDsc(dscFile string, verifier utils.Verifier) (Stanza, error) + func (s Stanza) Copy() (result Stanza) + func (s Stanza) WriteTo(w *bufio.Writer) error