client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 14 Imported by: ? 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 ActionClient

type ActionClient interface {
	GetRunner(ctx context.Context, runnerURL string, runnerID int64) (Runner, error)
	CreateRunnerToken(ctx context.Context, runnerURL string) (RunnerToken, error)
}

type Client

type Client struct {
	*github.Client
}

func New

func New(opts ...ClientOption) (*Client, error)

func (*Client) CreateRunnerToken

func (gh *Client) CreateRunnerToken(ctx context.Context, runnerURL string) (RunnerToken, error)

func (*Client) GetRunner

func (gh *Client) GetRunner(ctx context.Context, runnerURL string, runnerID int64) (Runner, error)

type ClientOption

type ClientOption func(o *Opts)

func WithAppID

func WithAppID(id int64) ClientOption

func WithAppPrivateKey

func WithAppPrivateKey(key string) ClientOption

func WithEndpoint

func WithEndpoint(endpoint string) ClientOption

func WithInstallationID

func WithInstallationID(id string) ClientOption

func WithPersonalAccessToken

func WithPersonalAccessToken(token string) ClientOption

type Opts

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

type Runner

type Runner interface {
	GetName() string
	GetBusy() bool
	GetOS() string
	GetStatus() string
}

type RunnerToken

type RunnerToken interface {
	GetToken() string
	GetExpiresAt() github.Timestamp
}

Directories

Path Synopsis
Package mock_github is a generated GoMock package.
Package mock_github is a generated GoMock package.

Jump to

Keyboard shortcuts

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