travis

package
v0.0.0-...-7b9c6a0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 10 Imported by: 0

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"`
	State        string        `json:"state"`
	LastUpdated  time.Time     `json:"last_updated"`
	CommitsURL   string        `json:"commits_url"`
	CommitURL    string        `json:"commit_url"`
	StatusChecks []StatusCheck `json:"status_checks"`
	SHA          string        `json:"sha"`
}

type Build

type Build struct {
	Id                int
	Number            string `json:"number"`
	EventType         string
	PullRequest       bool   `json:"pull_request"`
	PullRequestTitle  string `json:"pull_request_title"`
	PullRequestNumber int
	State             string `json:"state"`
	Duration          int
	StartedAt         time.Time `json:"started_at"`
	FinishedAt        time.Time `json:"finished_at"`
}

type BuildsResp

type BuildsResp struct {
	Builds  []Build
	Commits []TravisCommit
}

type ByTime

type ByTime []Branch

func (ByTime) Len

func (b ByTime) Len() int

func (ByTime) Less

func (b ByTime) Less(i, j int) bool

func (ByTime) Swap

func (b ByTime) Swap(i, j int)

type Client

type Client struct {
	Org               string
	Repo              string
	GitHubAccessToken string
}

func (*Client) Branches

func (t *Client) Branches() ([]Branch, error)

func (*Client) Repository

func (t *Client) Repository() (Repo, error)

type Repo

type Repo struct {
	Branches    []Branch `json:"branches"`
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Website     string   `json:"website"`
	GitHubURL   string   `json:"github_url"`
}

type StatusCheck

type StatusCheck struct {
	State       string `json:"state"`
	Description string `json:"description"`
	StatusURL   string `json:"status_url"`
}

type TravisBranch

type TravisBranch struct {
	Id                int
	Number            string
	EventType         string
	PullRequest       bool
	PullRequestTitle  string
	PullRequestNumber int
	State             string `json:"state"`
	Duration          int
	StartedAt         time.Time `json:"started_at"`
	FinishedAt        time.Time `json:"finished_at"`
}

type TravisBranchResp

type TravisBranchResp struct {
	Branch TravisBranch
	Commit TravisCommit
}

type TravisCommit

type TravisCommit struct {
	Id     int
	Sha    string
	Branch string
}

type Updater

type Updater struct {
	GitHubAccessToken string
	RedisURL          string
}

func (Updater) GetRepo

func (u Updater) GetRepo(repoSlug string) (Repo, error)

func (Updater) Run

func (u Updater) Run()

func (Updater) SubscribeRepo

func (u Updater) SubscribeRepo(repoSlug string)

Jump to

Keyboard shortcuts

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