Documentation
¶
Index ¶
- type Client
- type ClientCredential
- type ClientFactory
- type FakeClient
- func (c *FakeClient) CreateRegistrationToken(ctx context.Context, owner, repo string) (*github.RegistrationToken, error)
- func (c *FakeClient) ListRunners(ctx context.Context, owner, repo string, labels []string) ([]*Runner, error)
- func (c *FakeClient) RemoveRunner(ctx context.Context, owner, repo string, runnerID int64) error
- type FakeClientFactory
- func (f *FakeClientFactory) ListRunners(ctx context.Context, owner, repo string, labels []string) ([]*Runner, error)
- func (f *FakeClientFactory) New(_ *ClientCredential) (Client, error)
- func (f *FakeClientFactory) RemoveRunner(ctx context.Context, owner, repo string, runnerID int64) error
- func (f *FakeClientFactory) SetExpiredAtDuration(d time.Duration)
- func (f *FakeClientFactory) SetRunners(runners map[string][]*Runner)
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { CreateRegistrationToken(context.Context, string, string) (*github.RegistrationToken, error) ListRunners(context.Context, string, string, []string) ([]*Runner, error) RemoveRunner(context.Context, string, string, int64) error }
Client generates token for GitHub Action selfhosted runner
type ClientCredential ¶ added in v0.6.0
type ClientFactory ¶ added in v0.6.0
type ClientFactory interface {
New(*ClientCredential) (Client, error)
}
ClientFactory is a factory of Clients.
func NewFactory ¶ added in v0.6.0
func NewFactory() ClientFactory
type FakeClient ¶
type FakeClient struct {
// contains filtered or unexported fields
}
FakeClient is a fake client
func (*FakeClient) CreateRegistrationToken ¶
func (c *FakeClient) CreateRegistrationToken(ctx context.Context, owner, repo string) (*github.RegistrationToken, error)
CreateRegistrationToken returns dummy token.
func (*FakeClient) ListRunners ¶
func (c *FakeClient) ListRunners(ctx context.Context, owner, repo string, labels []string) ([]*Runner, error)
ListRunners returns dummy list.
func (*FakeClient) RemoveRunner ¶
RemoveRunner does not delete anything and returns success.
type FakeClientFactory ¶ added in v0.6.0
type FakeClientFactory struct {
// contains filtered or unexported fields
}
func NewFakeClientFactory ¶ added in v0.6.0
func NewFakeClientFactory() *FakeClientFactory
func (*FakeClientFactory) ListRunners ¶ added in v0.6.0
func (f *FakeClientFactory) ListRunners(ctx context.Context, owner, repo string, labels []string) ([]*Runner, error)
ListRunners returns dummy list.
func (*FakeClientFactory) New ¶ added in v0.6.0
func (f *FakeClientFactory) New(_ *ClientCredential) (Client, error)
func (*FakeClientFactory) RemoveRunner ¶ added in v0.6.0
func (f *FakeClientFactory) RemoveRunner(ctx context.Context, owner, repo string, runnerID int64) error
RemoveRunner does not delete anything and returns success.
func (*FakeClientFactory) SetExpiredAtDuration ¶ added in v0.6.0
func (f *FakeClientFactory) SetExpiredAtDuration(d time.Duration)
func (*FakeClientFactory) SetRunners ¶ added in v0.6.0
func (f *FakeClientFactory) SetRunners(runners map[string][]*Runner)
Click to show internal directories.
Click to hide internal directories.