Documentation
¶
Index ¶
- Constants
- func Supported() bool
- type DpkgSource
- func (s *DpkgSource) Contexts() []string
- func (s *DpkgSource) Find(ctx context.Context, itemContext string) ([]*sdp.Item, error)
- func (s *DpkgSource) Get(ctx context.Context, itemContext string, query string) (*sdp.Item, error)
- func (s *DpkgSource) Name() string
- func (s *DpkgSource) Search(ctx context.Context, itemContext string, query string) ([]*sdp.Item, error)
- func (s *DpkgSource) Supported() bool
- func (s *DpkgSource) Type() string
- func (s *DpkgSource) Weight() int
- type NotFoundError
- type Package
Constants ¶
const QueryFormat = `` /* 188-byte string literal not displayed */
QueryFormat is used when querying the dpkg database
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DpkgSource ¶
type DpkgSource struct{}
DpkgSource struct on which all methods are registered
func (*DpkgSource) Contexts ¶
func (s *DpkgSource) Contexts() []string
List of contexts that this source is capable of find items for
func (*DpkgSource) Find ¶
func (s *DpkgSource) Find(ctx context.Context, itemContext string) ([]*sdp.Item, error)
Find Gets information about all item that the source can possibly find. If nothing is found then just return an empty list (Required)
func (*DpkgSource) Get ¶
Get takes the UniqueAttribute value as a parameter (also referred to as the "name" of the item) and returns a full item will all details. This function must return an item whose UniqueAttribute value exactly matches the supplied parameter. If the item cannot be found it should return an ItemNotFoundError (Required)
func (*DpkgSource) Name ¶
func (s *DpkgSource) Name() string
Descriptive name for the source, used in logging and metadata
func (*DpkgSource) Search ¶
func (s *DpkgSource) Search(ctx context.Context, itemContext string, query string) ([]*sdp.Item, error)
Search takes a file name or binary name and runs this through rpm -q --whatprovides
func (*DpkgSource) Supported ¶
func (s *DpkgSource) Supported() bool
func (*DpkgSource) Type ¶
func (s *DpkgSource) Type() string
Type is the type of items that this returns (Required)
type NotFoundError ¶
type NotFoundError struct {
Message string
}
NotFoundError will be returned when the dpkg wasn't installed
func (NotFoundError) Error ¶
func (m NotFoundError) Error() string
type Package ¶
type Package struct { Name string Status string Priority string Section string InstalledSize int Maintainer string Architecture string Version string Homepage *url.URL Summary string Description string }
Package represents information about an dpkg package