api

package
v14.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProjectInfoApiPath  = "/api/v4/internal/kubernetes/project_info"
	ProjectIdQueryParam = "id"
)
View Source
const (
	AgentInfoApiPath = "/api/v4/internal/kubernetes/agent_info"
)
View Source
const (
	AllowedAgentsApiPath = "/api/v4/job/allowed_agents"
)
View Source
const (
	ModuleRequestApiPath = "/api/v4/internal/kubernetes/modules/"
)
View Source
const (
	UsagePingApiPath = "/api/v4/internal/kubernetes/usage_metrics"
)

Variables

This section is empty.

Functions

func GetAgentInfo

func GetAgentInfo(ctx context.Context, client gitlab.ClientInterface, agentToken api.AgentToken) (*api.AgentInfo, error)

func GetProjectInfo added in v14.1.1

func GetProjectInfo(ctx context.Context, client gitlab.ClientInterface, agentToken api.AgentToken, projectId string) (*api.ProjectInfo, error)

func MakeModuleRequest added in v14.1.1

func MakeModuleRequest(ctx context.Context, client gitlab.ClientInterface, agentToken api.AgentToken, moduleName, method, urlPath string, query url.Values, header http.Header, body io.Reader) (*http.Response, error)

func SendUsagePing added in v14.1.1

func SendUsagePing(ctx context.Context, client gitlab.ClientInterface, counters map[string]int64) error

Types

type AllowedAgent added in v14.1.1

type AllowedAgent struct {
	Id            int64         `json:"id"`
	ConfigProject ConfigProject `json:"config_project"`
}

type AllowedAgentsForJob added in v14.1.1

type AllowedAgentsForJob struct {
	AllowedAgents []AllowedAgent `json:"allowed_agents"`
	Job           Job            `json:"job"`
	Pipeline      Pipeline       `json:"pipeline"`
	Project       Project        `json:"project"`
	User          User           `json:"user"`
}

func GetAllowedAgentsForJob added in v14.1.1

func GetAllowedAgentsForJob(ctx context.Context, client gitlab.ClientInterface, jobToken string) (*AllowedAgentsForJob, error)

type ConfigProject added in v14.1.1

type ConfigProject struct {
	Id int64 `json:"id"`
}

type Job added in v14.1.1

type Job struct {
	Id int64 `json:"id"`
}

type Pipeline added in v14.1.1

type Pipeline struct {
	Id int64 `json:"id"`
}

type Project added in v14.1.1

type Project struct {
	Id int64 `json:"id"`
}

type ProjectInfoResponse added in v14.1.1

type ProjectInfoResponse struct {
	ProjectId        int64                   `json:"project_id"`
	GitalyInfo       gitlab.GitalyInfo       `json:"gitaly_info"`
	GitalyRepository gitlab.GitalyRepository `json:"gitaly_repository"`
}

type User added in v14.1.1

type User struct {
	Id       int64  `json:"id"`
	Username string `json:"username"`
}

Jump to

Keyboard shortcuts

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