launchpad

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FilesAPI is the format string for the Launchpad Files API
	FilesAPI = "https://api.launchpad.net/1.0/%s/%s/%s/files"
	// ReleasesAPI is the format string for the Launchpad Releases API
	ReleasesAPI = "https://api.launchpad.net/1.0/%s/%s/releases"
	// SeriesAPI is the format string for the Launchpad Series API
	SeriesAPI = "https://api.launchpad.net/1.0/%s/series"
	// SourceFormat is the format string for Launchpad tarballs
	SourceFormat = "https://launchpad.net/%s/%s/%s/+download/%s-%s.tar.gz"
)

Variables

View Source
var SourceRegex = regexp.MustCompile("https?://launchpad.net/(.*)/.*/.*/\\+download/.*.tar.gz")

SourceRegex matches Launchpad source tarballs

Functions

This section is empty.

Types

type File

type File struct {
	Link     string `json:"file_link"`
	Type     string `json:"file_type"`
	Uploaded string `json:"date_uploaded"`
}

File is a JSON representation of a Launchpad File

type FileList

type FileList struct {
	Files []File `json:"entries"`
}

FileList holds one or more Launchpad Files

type Provider

type Provider struct{}

Provider is the upstream provider interface for launchpad

func (Provider) Latest

func (c Provider) Latest(name string) (r *results.Result, s results.Status)

Latest finds the newest release for a launchpad package

func (Provider) Match

func (c Provider) Match(query string) string

Match checks to see if this provider can handle this kind of query

func (Provider) Name

func (c Provider) Name() string

Name gives the name of this provider

func (Provider) Releases

func (c Provider) Releases(name string) (rs *results.ResultSet, s results.Status)

Releases finds all matching releases for a launchpad package

type Release

type Release struct {
	// contains filtered or unexported fields
}

Release is an internal representation of a Launchpad Release

func (*Release) Convert

func (lr *Release) Convert() *results.Result

Convert turns a Launchpad release into a Cuppa result

type Releases

type Releases []Release

Releases holds one or more Launchpad Releases

func (Releases) Convert

func (lrs Releases) Convert(name string) *results.ResultSet

Convert turns a Launchpad result set to a Cuppa result set

type Series

type Series struct {
	Active bool   `json:"active"`
	Name   string `json:"name"`
	Status string `json:"status"`
}

Series is a JSON representation of a Launchpad Series

type SeriesList

type SeriesList struct {
	Entries []Series `json:"entries"`
}

SeriesList holds one or more Launchpad Series

type Version

type Version struct {
	Number string `json:"version"`
}

Version is a JSON representation of a Launchpad Version

type VersionList

type VersionList struct {
	Versions []Version `json:"entries"`
}

VersionList holds one or more Launchpad Version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL