api

package
v14.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectAgentMD

func InjectAgentMD(ctx context.Context, agentMD *AgentMD) context.Context

InjectAgentMD injects AgentMD into a context.

Types

type AgentInfo

type AgentInfo struct {
	// Id is the agent's id in the database.
	Id int64
	// ProjectId is the id of the configuration project of the agent.
	ProjectId int64

	// Name is the agent's name.
	// Can contain only /a-z\d-/
	Name       string
	GitalyInfo GitalyInfo
	Repository *gitalypb.Repository
}

AgentInfo contains information about an agentk.

type AgentMD

type AgentMD struct {
	Token AgentToken
}

AgentMD contains gRPC metadata received from agentk with a request.

func AgentMDFromContext

func AgentMDFromContext(ctx context.Context) *AgentMD

AgentMDFromContext extracts AgentMD from a context.

type AgentToken

type AgentToken string

AgentToken is agentk's bearer access token.

func AgentTokenFromContext

func AgentTokenFromContext(ctx context.Context) AgentToken

AgentTokenFromContext extracts the agent token from the given context

type GitalyInfo

type GitalyInfo struct {
	Address  string
	Token    string
	Features map[string]string
}

type ProjectInfo

type ProjectInfo struct {
	ProjectId  int64
	GitalyInfo GitalyInfo
	Repository *gitalypb.Repository
}

Jump to

Keyboard shortcuts

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