models

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2017 License: MIT Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Name string `json:"name"`
}

Branch struct

type Comment added in v0.9.1

type Comment struct {
	Content   CommentContent `json:"content"`
	CreatedOn time.Time      `json:"created_on"`
	UpdatedOn time.Time      `json:"updated_on"`
	User      User           `json:"user"`
}

Comment struct

func (Comment) ToString added in v0.9.1

func (c Comment) ToString() string

ToString returns the description of a comment

type CommentContent added in v0.9.1

type CommentContent struct {
	Raw string `json:"raw"`
}

CommentContent struct

type Commit

type Commit struct {
	Branch Branch     `json:"branch"`
	Commit CommitInfo `json:"commit"`
}

Commit struct

type CommitInfo added in v0.9.1

type CommitInfo struct {
	Hash string `json:"hash"`
}

CommitInfo struct

type PullRequest

type PullRequest interface {
	ToString() string
}

PullRequest interface

type PullRequestActivity added in v0.9.1

type PullRequestActivity struct {
	Update  Update  `json:"update,omitempty"`
	Comment Comment `json:"comment,omitempty"`
}

PullRequestActivity struct

type PullRequestDetail

type PullRequestDetail struct {
	PullRequestInfo
	Participants []Reviewer `json:"participants"`
}

PullRequestDetail struct

func (PullRequestDetail) IsApproved

func (pr PullRequestDetail) IsApproved(username string) bool

IsApproved checks the pull request has been approved by user with the specified username

func (PullRequestDetail) ToString

func (pr PullRequestDetail) ToString() string

ToString returns the description of a pull request

type PullRequestInfo

type PullRequestInfo struct {
	ID          int       `json:"id"`
	Title       string    `json:"title"`
	CreatedOn   time.Time `json:"created_on"`
	UpdatedOn   time.Time `json:"updated_on"`
	Author      User      `json:"author"`
	Destination Commit    `json:"destination"`
	Source      Commit    `json:"source"`
	Description string    `json:"description"`
}

PullRequestInfo struct

func (PullRequestInfo) ToString

func (pr PullRequestInfo) ToString() string

ToString returns the description of a pull request

type PullRequestList

type PullRequestList struct {
	PageLen int               `json:"pagelen"`
	Page    int               `json:"page"`
	Size    int               `json:"size"`
	Items   []PullRequestInfo `json:"values"`
}

PullRequestList struct

type Repository

type Repository struct {
	Org  string
	Name string
}

Repository struct

type Reviewer

type Reviewer struct {
	User     User `json:"user"`
	Approved bool `json:"approved"`
}

Reviewer struct

type Update added in v0.9.1

type Update struct {
	Date   time.Time `json:"date"`
	Source Commit    `json:"source"`
	Author User      `json:"author"`
}

Update struct

func (Update) ToString added in v0.9.1

func (c Update) ToString() string

ToString returns the description of an update

type User

type User struct {
	Username    string `json:"username"`
	DisplayName string `json:"display_name"`
}

User struct

type UserCredential

type UserCredential struct {
	Username string
	Password string
}

UserCredential struct

Jump to

Keyboard shortcuts

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