runner

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package runner package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateRunnerInput

type CreateRunnerInput struct {
	Name        string
	Description string
	GroupID     string
}

CreateRunnerInput is the input for creating a new runner

type GetRunnersInput

type GetRunnersInput struct {
	// Sort specifies the field to sort on and direction
	Sort *db.RunnerSortableField
	// PaginationOptions supports cursor based pagination
	PaginationOptions *pagination.Options
	// NamespacePath is the namespace to return runners for
	NamespacePath string
	// IncludeInherited includes inherited runners in the result
	IncludeInherited bool
}

GetRunnersInput is the input for querying a list of runners

type Service

type Service interface {
	GetRunnerByPath(ctx context.Context, path string) (*models.Runner, error)
	GetRunnerByID(ctx context.Context, id string) (*models.Runner, error)
	GetRunners(ctx context.Context, input *GetRunnersInput) (*db.RunnersResult, error)
	GetRunnersByIDs(ctx context.Context, idList []string) ([]models.Runner, error)
	CreateRunner(ctx context.Context, input *CreateRunnerInput) (*models.Runner, error)
	UpdateRunner(ctx context.Context, runner *models.Runner) (*models.Runner, error)
	DeleteRunner(ctx context.Context, runner *models.Runner) error
	AssignServiceAccountToRunner(ctx context.Context, serviceAccountID string, runnerID string) error
	UnassignServiceAccountFromRunner(ctx context.Context, serviceAccountID string, runnerID string) error
}

Service implements all runner related functionality

func NewService

func NewService(
	logger logger.Logger,
	dbClient *db.Client,
	limitChecker limits.LimitChecker,
	activityService activityevent.Service,
) Service

NewService creates an instance of Service

Jump to

Keyboard shortcuts

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