githubapi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpClient

type HttpClient interface {
	Do(req *http.Request) (*http.Response, error)
}

type IRunnerApi

type IRunnerApi interface {
	GetOrgRunners(organization string, token string) (Runners, error)
}

type Runner

type Runner struct {
	Id     uint   `json:"id"`
	Name   string `json:"name"`
	Os     string `json:"os"`
	Status string `json:"status"`
}

types from api

type RunnerApi

type RunnerApi struct {
	// contains filtered or unexported fields
}

func DefaultRunnerAPI

func DefaultRunnerAPI() RunnerApi

func NewRunnerApi

func NewRunnerApi(client HttpClient, baseUrl string) RunnerApi

func (RunnerApi) GetOrgRunners

func (r RunnerApi) GetOrgRunners(organization string, token string) (Runners, error)

type Runners

type Runners struct {
	TotalCount int      `json:"total_count"`
	Runners    []Runner `json:"runners"`
}

func (Runners) ByStatus

func (r Runners) ByStatus(status string) []Runner

Jump to

Keyboard shortcuts

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