jetbrains

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ReleasesAPI is the format string for the JetBrains Releases API
	ReleasesAPI = "https://data.services.jetbrains.com/products/releases?code=%s"
	// LatestAPI is the format string for the JetBrains Releases API when asking for latest
	LatestAPI = "https://data.services.jetbrains.com/products/releases?code=%s&latest=true"
)

Variables

View Source
var ReleaseCodes = map[string]string{
	"appcode":              "AC",
	"clion":                "CL",
	"datagrip":             "DG",
	"goglang":              "GO",
	"ideaiu":               "IIU",
	"ideaic":               "IIC",
	"phpstorm":             "PS",
	"pycharm-professional": "PCP",
	"pycharm-ce":           "PCC",
	"pycharm-community":    "PCC",
	"pycharm-edu":          "PCE",
	"rider":                "RD",
	"rubymine":             "RM",
	"upsource":             "US",
	"webstorm":             "WS",
}

ReleaseCodes provides a mapping between JetBrains products and their API codename

View Source
var SourceRegex = regexp.MustCompile("https?://download.jetbrains.com/.+?/(.+?)-\\d.*")

SourceRegex matches JetBrains sources

Functions

This section is empty.

Types

type Download

type Download struct {
	ChecksumLink string `json:"checksumLink"`
	Link         string `json:"link"`
	Size         uint64 `json:"size"`
}

Download is a JSON representation of a JetBrains downloadable source

type Provider

type Provider struct{}

Provider is the upstream provider interface for JetBrains

func (Provider) Latest

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

Latest finds the newest release for a JetBrains 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 JetBrains package

type Release

type Release struct {
	Build        string              `json:"build"`
	Date         string              `json:"date"`
	Downloads    map[string]Download `json:"downloads"`
	Notes        string              `json:"notesLink"`
	Type         string              `json:"type"`
	MajorVersion string              `json:"majorVersion"`
	Version      string              `json:"version"`
}

Release is a JSON representation of a JetBrains release

func (Release) Convert

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

Convert turns a JetBrains release into a Cuppa result

type Releases

type Releases map[string][]Release

Releases is a collection of JetBrains releases

func (Releases) Convert

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

Convert turns JetBrains releases into a Cuppa result set

Jump to

Keyboard shortcuts

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