github

package
v0.0.0-...-9ca121a Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2016 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client    *http.Client
	Token     string
	UserAgent string
}

func (*Client) CreateHook

func (c *Client) CreateHook(hooksURL string, hook Hook) error

func (*Client) GetHooks

func (c *Client) GetHooks(hooksURL string) ([]*Hook, error)

func (*Client) GetIssue

func (c *Client) GetIssue(issueURL string) (*Issue, error)

func (*Client) ListRepositories

func (c *Client) ListRepositories(organization string) ([]*Repository, error)

func (*Client) UpdateIssue

func (c *Client) UpdateIssue(issueURL string, update IssueUpdate) error

type Hook

type Hook struct {
	Name   string     `json:"name"`
	Active bool       `json:"active"`
	Events []string   `json:"events"`
	Config HookConfig `json:"config"`
}

type HookConfig

type HookConfig struct {
	URL         string `json:"url"`
	ContentType string `json:"content_type"`
	Secret      string `json:"secret"`
}

type Issue

type Issue struct {
	URL    string   `json:"url"`
	ID     int      `json:"id"`
	Number int      `json:"number"`
	Title  string   `json:"title"`
	Labels []*Label `json:"labels"`
	State  string   `json:"state"`
	Body   string   `json:"body"`
}

type IssueEvent

type IssueEvent struct {
	Action     string      `json:"action"`
	Issue      *Issue      `json:"issue"`
	Repository *Repository `json:"repository"`
	Label      *Label      `json:"label"`
}

type IssueUpdate

type IssueUpdate struct {
	Body string `json:"body"`
}

type Label

type Label struct {
	URL   string `json:"url"`
	Name  string `json:"name"`
	Color string `json:"color"`
}

type Owner

type Owner struct {
	Login string `json:"login"`
}

type Repository

type Repository struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	FullName string `json:"full_name"`
	Owner    *Owner `json:"owner"`
	HooksURL string `json:"hooks_url"`
}

Jump to

Keyboard shortcuts

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