structure

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2022 License: MPL-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubRepositoryStructure

type GitHubRepositoryStructure struct {
	// Name of repository.
	Name string `json:"name,omitempty"`
	// URL link to repository's website.
	Site string `json:"site,omitempty"`
	// Does this repository is fork from other.
	IsFork bool `json:"is_fork"`
	// Does this repository set as archive state.
	IsArchive bool `json:"is_archive"`
	// Count of repository starred.
	Starred uint64 `json:"starred,string"`
	// Count of repository watched.
	Watched uint64 `json:"watched,string"`
	// Count of reposiotry has been forked.
	Forked uint64 `json:"forked,string"`
	// Count of issues currently opened in this repository.
	OpenedIssue uint64 `json:"opened_issue,string"`
	// Programming language uses in this repository.
	//
	// It possibility returns "Other" when GitHub API returns null in this field.
	Language string `json:"language,omitempty"`
	// License uses in this repository.
	//
	// It returns "None" if GitHub API return null in this field.
	License string `json:"license,omitempty"`
	// An array of string which indicate topic of this repository.
	//
	// It should be an empty array if no topic is defined.
	Topics []string `json:"topics"`
}

Simplified structure repersenting a single repository data from GitHub repository API.

func ParseFromRESTMap

func ParseFromRESTMap(rest map[string]interface{}) (*GitHubRepositoryStructure, error)

Parse a single node of GitHub repository API data to Go's structure.

The rest parameter must be came form `json.Decode` with `UseNumber()` invoked.

Jump to

Keyboard shortcuts

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