api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type License

type License struct {
	Key            string   `json:"key"`            // The license key (e.g. "mit")
	Name           string   `json:"name"`           // The license name (e.g. "MIT License")
	Spdx_id        string   `json:"spdx_id"`        // The license SPDX ID (e.g. "MIT")
	Url            string   `json:"url"`            // The URL to the license on the web
	Node_id        string   `json:"node_id"`        // The node ID for the license
	Html_url       string   `json:"html_url"`       // The URL to the license on the web
	Description    string   `json:"description"`    // The description of the license
	Implementation string   `json:"implementation"` // The implementation of the license
	Permissions    []string `json:"permissions"`    // The permissions granted by the license
	Limitations    []string `json:"limitations"`    // The limitations of the license
	Conditions     []string `json:"conditions"`     // The conditions of the license
	Body           string   `json:"body"`           // The full text of the license
	Featured       bool     `json:"featured"`       // Whether or not the license is featured
}

Details of a particular license from the GitHub API

func GetLicense

func GetLicense(license string) (License, error)

Fetch a license from the GitHub API

type LicenseSimple

type LicenseSimple struct {
	Key     string `json:"key"`     // The license key (e.g. "mit")
	Name    string `json:"name"`    // The license name (e.g. "MIT License")
	Spdx_id string `json:"spdx_id"` // The license SPDX ID (e.g. "MIT")
	Url     string `json:"url"`     // The URL to the license on the web
	Node_id string `json:"node_id"` // The node ID for the license
}

Simplified details of a particular license from the GitHub API

func ListLicenses

func ListLicenses() ([]LicenseSimple, error)

Fetch the list of all licenses from the GitHub API

Jump to

Keyboard shortcuts

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