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: 0

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