pkg

package
v0.0.0-...-833629d Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const API_VERSION = "2020-05-07"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	SubscriptionId string
	TenantId       string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(subscriptionId, tenantId string, ctx context.Context) (*Client, error)

func (*Client) GetRunnerPool

func (c *Client) GetRunnerPool(resourceGroupName, poolName string) (*RunnerPool, error)

func (*Client) GetRunners

func (c *Client) GetRunners(resourceGroupName, poolName string) ([]*Runner, error)

func (*Client) ListPools

func (c *Client) ListPools() (*PoolsResponse, error)

func (*Client) PurgeRunner

func (c *Client) PurgeRunner(resourceGroupName, poolName, runnerId string) error

func (*Client) UpgradePoolTags

func (c *Client) UpgradePoolTags(pool Pool, tags map[string]any) error

type Pool

type Pool struct {
	Name          string         `json:"name"`
	ResourceGroup string         `json:"resourceGroup"`
	Location      string         `json:"location"`
	Id            string         `json:"id"`
	Tags          map[string]any `json:"tags"`
}

type PoolsResponse

type PoolsResponse struct {
	Data []Pool
}

type ResourceClient

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

func NewResourceClient

func NewResourceClient(credential azcore.TokenCredential, opt *arm.ClientOptions) (*ResourceClient, error)

func (*ResourceClient) Action

func (client *ResourceClient) Action(ctx context.Context, resourceID string, action string, apiVersion string, method string, header *http.Header, body interface{}) (interface{}, error)

func (*ResourceClient) CreateOrUpdate

func (client *ResourceClient) CreateOrUpdate(ctx context.Context, resourceID string, apiVersion string, body interface{}) (interface{}, error)

func (*ResourceClient) Delete

func (client *ResourceClient) Delete(ctx context.Context, resourceID string, apiVersion string) (interface{}, error)

func (*ResourceClient) Get

func (client *ResourceClient) Get(ctx context.Context, resourceID string, apiVersion string, body any) (interface{}, error)

func (*ResourceClient) List

func (client *ResourceClient) List(ctx context.Context, url string, apiVersion string) (interface{}, error)

type Runner

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

type RunnerPool

type RunnerPool struct {
	Id       string            `json:"id"`
	Name     string            `json:"name"`
	Location string            `json:"location"`
	Tags     map[string]string `json:"tags"`
}

Jump to

Keyboard shortcuts

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