models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2018 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckRequest

type CheckRequest struct {
	Source  Source  `json:"source"`
	Version Version `json:"version"`
}

CheckRequest ...

type CheckResponse

type CheckResponse []Version

CheckResponse ...

func (CheckResponse) Len

func (p CheckResponse) Len() int

func (CheckResponse) Less

func (p CheckResponse) Less(i, j int) bool

func (CheckResponse) Swap

func (p CheckResponse) Swap(i, j int)

type Commit

type Commit struct {
	ID         string
	OID        string
	PushedDate githubv4.DateTime
	Message    string
	Author     struct {
		User struct {
			Login string
		}
	}
}

Commit represents the GraphQL commit node. https://developer.github.com/v4/object/commit/

type GetParameters

type GetParameters struct{}

GetParameters for the resource.

func (*GetParameters) Validate

func (p *GetParameters) Validate() error

Validate the get parameters.

type GetRequest

type GetRequest struct {
	Source  Source        `json:"source"`
	Version Version       `json:"version"`
	Params  GetParameters `json:"params"`
}

GetRequest ...

type GetResponse

type GetResponse struct {
	Version  Version    `json:"version"`
	Metadata []Metadata `json:"metadata,omitempty"`
}

GetResponse ...

type Metadata

type Metadata struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Metadata for the resource.

type PullRequest

type PullRequest struct {
	ID          string
	Number      int
	Title       string
	URL         string
	BaseRefName string
	HeadRefName string
}

PullRequest represents the GraphQL commit node. https://developer.github.com/v4/object/commit/

type PullRequestCommits

type PullRequestCommits struct {
	PullRequest
	Commits struct {
		Edges []struct {
			Node struct {
				Commit Commit
			}
		}
	} `graphql:"commits(last:$commitsLast)"`
}

PullRequestCommits represents the GraphQL node with PR/Commit. https://developer.github.com/v4/object/pullrequest/

func (*PullRequestCommits) GetLastCommit

func (p *PullRequestCommits) GetLastCommit() (Commit, bool)

GetLastCommit returns the last commit in a PullRequestAndCommits

type PutParameters

type PutParameters struct {
	Path        string `json:"path"`
	Context     string `json:"context"`
	Status      string `json:"status"`
	CommentFile string `json:"comment_file"`
	Comment     string `json:"comment"`
}

PutParameters for the resource.

func (*PutParameters) Validate

func (p *PutParameters) Validate() error

Validate the put parameters.

type PutRequest

type PutRequest struct {
	Source Source        `json:"source"`
	Params PutParameters `json:"params"`
}

PutRequest ...

type PutResponse

type PutResponse struct {
	Version  Version    `json:"version"`
	Metadata []Metadata `json:"metadata,omitempty"`
}

PutResponse ...

type Source

type Source struct {
	Repository    string `json:"repository"`
	AccessToken   string `json:"access_token"`
	Path          string `json:"path"`
	IgnorePath    string `json:"ignore_path"`
	DisableCISkip string `json:"disable_ci_skip"`
}

Source represents the configuration for the resource.

func (*Source) Validate

func (s *Source) Validate() error

Validate the source configuration.

type Version

type Version struct {
	PR         string    `json:"pr"`
	Commit     string    `json:"commit"`
	PushedDate time.Time `json:"pushed,omitempty"`
}

Version for the resource. ID is the Github Global ID.

Jump to

Keyboard shortcuts

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