github

package
v0.0.0-...-bee9f94 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIGetRequest

func APIGetRequest(url string) (*http.Response, error)

func Download

func Download(url string, f io.Writer) error

func TokenHas

func TokenHas(scope string) (bool, error)

TokenHas returns a bool if the token in use has the scope passed

func TokenScopes

func TokenScopes() ([]string, error)

TokenScopes returns the scopes of token in the eviroment

Types

type Actor

type Actor struct {
	Login string `json:"login"`
	ID    int64  `json:"id"`
	Type  string `json:"type"`
	URL   string `json:"url"`
}

type Artifact

type Artifact struct {
	ID        int       `json:"id"`
	Name      string    `json:"name"`
	Size      int       `json:"size_in_bytes"`
	URL       string    `json:"archive_download_url"`
	Expired   bool      `json:"expired"`
	UpdatedAt time.Time `json:"updated_at"`
}

Artifact is the artifact structure returned by the API

type Run

type Run struct {
	ID              int64  `json:"id"`
	Status          string `json:"status"`
	Conclusion      string `json:"conclusion"`
	HeadBranch      string `json:"head_branch"`
	HeadSHA         string `json:"head_sha"`
	Path            string `json:"path"`
	RunNumber       int64  `json:"run_number"`
	WorkFlowID      int64  `json:"workflow_id"`
	CreatedAt       string `json:"created_at"`
	UpdatedAt       string `json:"updated_at"`
	LogsURL         string `json:"logs_url"`
	Actor           Actor  `json:"actor"`
	TriggeringActor Actor  `json:"triggering_actor"`
}

Jump to

Keyboard shortcuts

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