aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/google/go-github/github/licenses.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/google/go-github/github/licenses.go')
-rw-r--r--vendor/github.com/google/go-github/github/licenses.go31
1 files changed, 26 insertions, 5 deletions
diff --git a/vendor/github.com/google/go-github/github/licenses.go b/vendor/github.com/google/go-github/github/licenses.go
index 35cd234..0b5e8b3 100644
--- a/vendor/github.com/google/go-github/github/licenses.go
+++ b/vendor/github.com/google/go-github/github/licenses.go
@@ -10,23 +10,44 @@ import "fmt"
// LicensesService handles communication with the license related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/pulls/
+// GitHub API docs: https://developer.github.com/v3/licenses/
type LicensesService service
+// RepositoryLicense represents the license for a repository.
+type RepositoryLicense struct {
+ Name *string `json:"name,omitempty"`
+ Path *string `json:"path,omitempty"`
+
+ SHA *string `json:"sha,omitempty"`
+ Size *int `json:"size,omitempty"`
+ URL *string `json:"url,omitempty"`
+ HTMLURL *string `json:"html_url,omitempty"`
+ GitURL *string `json:"git_url,omitempty"`
+ DownloadURL *string `json:"download_url,omitempty"`
+ Type *string `json:"type,omitempty"`
+ Content *string `json:"content,omitempty"`
+ Encoding *string `json:"encoding,omitempty"`
+ License *License `json:"license,omitempty"`
+}
+
+func (l RepositoryLicense) String() string {
+ return Stringify(l)
+}
+
// License represents an open source license.
type License struct {
Key *string `json:"key,omitempty"`
Name *string `json:"name,omitempty"`
URL *string `json:"url,omitempty"`
+ SPDXID *string `json:"spdx_id,omitempty"`
HTMLURL *string `json:"html_url,omitempty"`
Featured *bool `json:"featured,omitempty"`
Description *string `json:"description,omitempty"`
- Category *string `json:"category,omitempty"`
Implementation *string `json:"implementation,omitempty"`
- Required *[]string `json:"required,omitempty"`
- Permitted *[]string `json:"permitted,omitempty"`
- Forbidden *[]string `json:"forbidden,omitempty"`
+ Permissions *[]string `json:"permissions,omitempty"`
+ Conditions *[]string `json:"conditions,omitempty"`
+ Limitations *[]string `json:"limitations,omitempty"`
Body *string `json:"body,omitempty"`
}