github

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	BrowserDownloadURL string `json:"browser_download_url"`
	ID                 int
	Name               string
	Label              string
	State              string
	ContentType        string `json:"content_type"`
	Size               int
	DownloadCount      int       `json:"download_count"`
	Created            time.Time `json:"created_at"`
	Updated            time.Time `json:"updated_at"`
	Uploader           User
}

type Issue

type Issue struct {
	ID          int
	URL         string
	HTMLURL     string `json:"html_url"`
	Number      int
	State       string
	Title       string
	Body        string
	User        User
	Labels      []Label
	Assignee    User
	Milestone   Milestone
	PullRequest struct {
		URL string
	} `json:"pull_request"`
	Closed  *time.Time `json:"closed_at"` // nil for open issues
	Created time.Time  `json:"created_at"`
	Updated time.Time  `json:"updated_at"`
}

func LoadIssues

func LoadIssues(repo string, query url.Values) ([]Issue, error)

func (Issue) BodyHTML

func (i Issue) BodyHTML() template.HTML

func (Issue) Type

func (i Issue) Type() string

type Label

type Label struct {
	Name  string
	Color string
}

type Milestone

type Milestone struct {
	URL         string
	HTMLURL     string `json:"html_url"`
	ID          int
	Number      int
	State       string
	Title       string
	Description string
	Creator     User
	Due         *time.Time `json:"due_on"`
	Closed      *time.Time `json:"closed_at"` // nil for open milestones
	Created     time.Time  `json:"created_at"`
	Updated     time.Time  `json:"updated_at"`
}

func LoadMilestones

func LoadMilestones(repo string, query url.Values) ([]Milestone, error)

type Release

type Release struct {
	ID         int
	TagName    string `json:"tag_name"`
	Name       string
	Body       string
	Draft      bool
	Prerelease bool
	Created    time.Time `json:"created_at"`
	Published  time.Time `json:"published_at"`
	Author     User
	Assets     []Asset
}

func LoadReleases

func LoadReleases(repo string) ([]Release, error)

type User

type User struct {
	Login string
	ID    int
}

Jump to

Keyboard shortcuts

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