Documentation
¶
Index ¶
- func AddBearer(header http.Header, token string)
- func AddContentType(header http.Header, apiversion string)
- func AddHeaders(header http.Header)
- type ActionStep
- type ActionStepDefinitionReference
- type ActionsEnvironmentReference
- type AgentJobRequestMessage
- type AgentLabel
- type AgentMessageConnection
- type BufferedLiveLogger
- type ConnectionData
- type DictionaryContextDataPair
- type GitHubAuthResult
- type GitHubRunnerRegisterToken
- type Issue
- type JobAuthorization
- type JobEndpoint
- type JobEvent
- type JobLogger
- func (logger *JobLogger) Append(record TimelineRecord) *TimelineRecord
- func (logger *JobLogger) Current() *TimelineRecord
- func (logger *JobLogger) Finish()
- func (logger *JobLogger) Insert(record TimelineRecord) *TimelineRecord
- func (logger *JobLogger) Log(lines string)
- func (logger *JobLogger) MoveNext() *TimelineRecord
- func (logger *JobLogger) Update() error
- func (logger *JobLogger) Write(p []byte) (n int, err error)
- type JobResources
- type LiveLogger
- type LocationServiceData
- type MapEntry
- type MaskHint
- type PipelineContextData
- type RenewAgent
- type RunnerAddRemove
- type ServiceDefinition
- type TaskAgent
- type TaskAgentAuthorization
- type TaskAgentMessage
- type TaskAgentPool
- type TaskAgentPoolReference
- type TaskAgentPools
- type TaskAgentPublicKey
- type TaskAgentSession
- type TaskAgentSessionKey
- type TaskAgents
- type TaskLog
- type TaskLogReference
- type TaskOrchestrationPlanReference
- type TemplateToken
- type TimeLineReference
- type TimelineAttempt
- type TimelineRecord
- type TimelineRecordFeedLinesWrapper
- type TimelineRecordWrapper
- type VariableValue
- type VssConnection
- func (vssConnection *VssConnection) BuildURL(relativePath string, ppath map[string]string, query map[string]string) (string, error)
- func (vssConnection *VssConnection) CreateSession() (*AgentMessageConnection, error)
- func (vssConnection *VssConnection) DeleteAgent(taskAgent *TaskAgent) error
- func (vssConnection *VssConnection) FinishJob(e *JobEvent, plan *TaskOrchestrationPlanReference) error
- func (vssConnection *VssConnection) GetAgentPools() (*TaskAgentPools, error)
- func (vssConnection *VssConnection) GetConnectionData() *ConnectionData
- func (vssConnection *VssConnection) GetServiceURL(ctx context.Context, serviceID string, urlParameter map[string]string, ...) (string, error)
- func (vssConnection *VssConnection) LoadSession(session *TaskAgentSession) (*AgentMessageConnection, error)
- func (vssConnection *VssConnection) Request(serviceID string, protocol string, method string, ...) error
- func (vssConnection *VssConnection) RequestWithContext(ctx context.Context, serviceID string, protocol string, method string, ...) error
- func (vssConnection *VssConnection) RequestWithContext2(ctx context.Context, method string, url string, protocol string, ...) error
- func (vssConnection *VssConnection) SendLogLines(plan *TaskOrchestrationPlanReference, timelineID string, ...) error
- func (vssConnection *VssConnection) UpdateTimeLine(timelineID string, jobreq *AgentJobRequestMessage, wrap *TimelineRecordWrapper) error
- func (vssConnection *VssConnection) UploadLogFile(timelineID string, jobreq *AgentJobRequestMessage, logContent string) (int, error)
- type VssLiveLogger
- type VssOAuthTokenResponse
- type WebsocketLivelogger
- type WebsocketLiveloggerWithFallback
- type WorkspaceOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddContentType ¶
func AddHeaders ¶
Types ¶
type ActionStep ¶
type ActionStep struct {
Type string
Reference ActionStepDefinitionReference
DisplayNameToken *TemplateToken
ContextName string
Environment *TemplateToken
Inputs *TemplateToken
Condition string
ContinueOnError *TemplateToken
TimeoutInMinutes *TemplateToken
}
type AgentJobRequestMessage ¶
type AgentJobRequestMessage struct {
MessageType string
Plan *TaskOrchestrationPlanReference
Timeline *TimeLineReference
JobID string
JobDisplayName string
JobName string
JobContainer *TemplateToken
JobServiceContainers *TemplateToken
JobOutputs *TemplateToken
RequestID int64
LockedUntil string
Resources *JobResources
ContextData map[string]PipelineContextData
Workspace *WorkspaceOptions
MaskHints []MaskHint `json:"mask"`
EnvironmentVariables []TemplateToken
Defaults []TemplateToken
ActionsEnvironment *ActionsEnvironmentReference
Variables map[string]VariableValue
Steps []ActionStep
FileTable []string
}
func (*AgentJobRequestMessage) GetConnection ¶ added in v0.3.0
func (jobreq *AgentJobRequestMessage) GetConnection(name string) (*VssConnection, map[string]string, error)
type AgentLabel ¶
type AgentMessageConnection ¶
type AgentMessageConnection struct {
VssConnection *VssConnection
TaskAgentSession *TaskAgentSession
Block cipher.Block
}
func (*AgentMessageConnection) Delete ¶
func (session *AgentMessageConnection) Delete() error
func (*AgentMessageConnection) DeleteMessage ¶
func (session *AgentMessageConnection) DeleteMessage(message *TaskAgentMessage) error
func (*AgentMessageConnection) GetNextMessage ¶
func (session *AgentMessageConnection) GetNextMessage(ctx context.Context) (*TaskAgentMessage, error)
type BufferedLiveLogger ¶ added in v0.3.0
type BufferedLiveLogger struct {
LiveLogger
// contains filtered or unexported fields
}
func (*BufferedLiveLogger) Close ¶ added in v0.3.0
func (logger *BufferedLiveLogger) Close() error
func (*BufferedLiveLogger) SendLog ¶ added in v0.3.0
func (logger *BufferedLiveLogger) SendLog(wrapper *TimelineRecordFeedLinesWrapper) error
type ConnectionData ¶
type ConnectionData struct {
LocationServiceData LocationServiceData
}
func (*ConnectionData) GetServiceDefinition ¶
func (connectionData *ConnectionData) GetServiceDefinition(id string) *ServiceDefinition
type DictionaryContextDataPair ¶
type DictionaryContextDataPair struct {
Key string `json:"k"`
Value PipelineContextData `json:"v"`
}
type GitHubAuthResult ¶
type JobAuthorization ¶
type JobEndpoint ¶
type JobEvent ¶
type JobEvent struct {
Name string
JobID string
RequestID int64
Result string
Outputs *map[string]VariableValue `json:",omitempty"`
ActionsEnvironment *ActionsEnvironmentReference `json:",omitempty"`
}
type JobLogger ¶ added in v0.3.0
type JobLogger struct {
JobRequest *AgentJobRequestMessage
Connection *VssConnection
TimelineRecords *TimelineRecordWrapper
CurrentRecord int64
CurrentLine int64
JobBuffer bytes.Buffer
CurrentBuffer bytes.Buffer
Logger LiveLogger
// contains filtered or unexported fields
}
func (*JobLogger) Append ¶ added in v0.3.0
func (logger *JobLogger) Append(record TimelineRecord) *TimelineRecord
func (*JobLogger) Current ¶ added in v0.3.0
func (logger *JobLogger) Current() *TimelineRecord
func (*JobLogger) Insert ¶ added in v0.3.0
func (logger *JobLogger) Insert(record TimelineRecord) *TimelineRecord
func (*JobLogger) MoveNext ¶ added in v0.3.0
func (logger *JobLogger) MoveNext() *TimelineRecord
type JobResources ¶
type JobResources struct {
Endpoints []JobEndpoint
}
type LiveLogger ¶ added in v0.3.0
type LiveLogger interface {
io.Closer
SendLog(lines *TimelineRecordFeedLinesWrapper) error
}
type LocationServiceData ¶
type LocationServiceData struct {
ServiceDefinitions []ServiceDefinition
}
type MapEntry ¶
type MapEntry struct {
Key *TemplateToken
Value *TemplateToken
}
type PipelineContextData ¶
type PipelineContextData struct {
Type *int32 `json:"t,omitempty"`
BoolValue *bool `json:"b,omitempty"`
NumberValue *float64 `json:"n,omitempty"`
StringValue *string `json:"s,omitempty"`
ArrayValue *[]PipelineContextData `json:"a,omitempty"`
DictionaryValue *[]DictionaryContextDataPair `json:"d,omitempty"`
}
func (PipelineContextData) ToRawObject ¶
func (ctx PipelineContextData) ToRawObject() interface{}
func (*PipelineContextData) UnmarshalJSON ¶
func (ctx *PipelineContextData) UnmarshalJSON(data []byte) error
type RenewAgent ¶
type RenewAgent struct {
RequestID int64
}
type RunnerAddRemove ¶
type ServiceDefinition ¶
type TaskAgent ¶
type TaskAgent struct {
Authorization TaskAgentAuthorization
Labels []AgentLabel
MaxParallelism int
ID int
Name string
Version string
OSDescription string
Enabled *bool `json:",omitempty"`
ProvisioningState string
AccessPoint string `json:",omitempty"`
CreatedOn string
Ephemeral bool `json:",omitempty"`
}
type TaskAgentAuthorization ¶
type TaskAgentAuthorization struct {
AuthorizationURL string `json:",omitempty"`
ClientID string `json:",omitempty"`
PublicKey TaskAgentPublicKey
}
type TaskAgentMessage ¶
type TaskAgentPool ¶
type TaskAgentPool struct {
TaskAgentPoolReference
}
type TaskAgentPoolReference ¶
type TaskAgentPools ¶
type TaskAgentPools struct {
Count int64
Value []TaskAgentPool
}
type TaskAgentPublicKey ¶
type TaskAgentSession ¶
type TaskAgentSession struct {
SessionID string `json:",omitempty"`
EncryptionKey TaskAgentSessionKey
OwnerName string
Agent TaskAgent
UseFipsEncryption bool
}
func (*TaskAgentSession) GetSessionKey ¶
func (session *TaskAgentSession) GetSessionKey(key *rsa.PrivateKey) (cipher.Block, error)
type TaskAgentSessionKey ¶
type TaskAgents ¶
type TaskLogReference ¶
type TemplateToken ¶
type TemplateToken struct {
FileID *int32
Line *int32
Column *int32
Type int32
Bool *bool
Num *float64
Lit *string
Expr *string
Directive *string
Seq *[]TemplateToken
Map *[]MapEntry
}
func (*TemplateToken) FromRawObject ¶
func (token *TemplateToken) FromRawObject(value interface{})
func (*TemplateToken) ToJSONRawObject ¶ added in v0.3.0
func (token *TemplateToken) ToJSONRawObject() interface{}
func (*TemplateToken) ToRawObject ¶
func (token *TemplateToken) ToRawObject() interface{}
func (*TemplateToken) ToYamlNode ¶
func (token *TemplateToken) ToYamlNode() *yaml.Node
func (*TemplateToken) UnmarshalJSON ¶
func (token *TemplateToken) UnmarshalJSON(data []byte) error
type TimeLineReference ¶
type TimelineAttempt ¶
type TimelineAttempt struct {
}
type TimelineRecord ¶
type TimelineRecord struct {
ID string
TimelineID string
ParentID string
Type string
Name string
StartTime string
FinishTime *string
CurrentOperation *string
PercentComplete int32
State string
Result *string
ResultCode *string
ChangeID int32
LastModified string
WorkerName string
Order int32
RefName string
Log *TaskLogReference
Details *TimeLineReference
ErrorCount int
WarningCount int
Issues []Issue
Location string
Attempt int32
Identifier *string
AgentPlatform string
PreviousAttempts []TimelineAttempt
Variables map[string]VariableValue
}
func CreateTimelineEntry ¶
func CreateTimelineEntry(parent string, refname string, name string) TimelineRecord
func (*TimelineRecord) Complete ¶
func (rec *TimelineRecord) Complete(res string)
func (*TimelineRecord) Start ¶
func (rec *TimelineRecord) Start()
type TimelineRecordWrapper ¶
type TimelineRecordWrapper struct {
Count int64
Value []*TimelineRecord
}
type VariableValue ¶
type VssConnection ¶
type VssConnection struct {
Client *http.Client
TenantURL string
Token string
PoolID int64
TaskAgent *TaskAgent
Key *rsa.PrivateKey
Trace bool
// contains filtered or unexported fields
}
func (*VssConnection) CreateSession ¶
func (vssConnection *VssConnection) CreateSession() (*AgentMessageConnection, error)
func (*VssConnection) DeleteAgent ¶
func (vssConnection *VssConnection) DeleteAgent(taskAgent *TaskAgent) error
func (*VssConnection) FinishJob ¶
func (vssConnection *VssConnection) FinishJob(e *JobEvent, plan *TaskOrchestrationPlanReference) error
func (*VssConnection) GetAgentPools ¶
func (vssConnection *VssConnection) GetAgentPools() (*TaskAgentPools, error)
func (*VssConnection) GetConnectionData ¶
func (vssConnection *VssConnection) GetConnectionData() *ConnectionData
func (*VssConnection) GetServiceURL ¶ added in v0.3.0
func (*VssConnection) LoadSession ¶
func (vssConnection *VssConnection) LoadSession(session *TaskAgentSession) (*AgentMessageConnection, error)
func (*VssConnection) RequestWithContext ¶
func (*VssConnection) RequestWithContext2 ¶ added in v0.3.0
func (*VssConnection) SendLogLines ¶ added in v0.3.0
func (vssConnection *VssConnection) SendLogLines(plan *TaskOrchestrationPlanReference, timelineID string, lines *TimelineRecordFeedLinesWrapper) error
func (*VssConnection) UpdateTimeLine ¶
func (vssConnection *VssConnection) UpdateTimeLine(timelineID string, jobreq *AgentJobRequestMessage, wrap *TimelineRecordWrapper) error
func (*VssConnection) UploadLogFile ¶
func (vssConnection *VssConnection) UploadLogFile(timelineID string, jobreq *AgentJobRequestMessage, logContent string) (int, error)
type VssLiveLogger ¶ added in v0.3.0
type VssLiveLogger struct {
JobRequest *AgentJobRequestMessage
Connection *VssConnection
}
func (*VssLiveLogger) Close ¶ added in v0.3.0
func (*VssLiveLogger) Close() error
func (*VssLiveLogger) SendLog ¶ added in v0.3.0
func (logger *VssLiveLogger) SendLog(wrapper *TimelineRecordFeedLinesWrapper) error
type VssOAuthTokenResponse ¶
type WebsocketLivelogger ¶ added in v0.3.0
type WebsocketLivelogger struct {
JobRequest *AgentJobRequestMessage
Connection *VssConnection
FeedStreamUrl string
// contains filtered or unexported fields
}
func (*WebsocketLivelogger) Close ¶ added in v0.3.0
func (logger *WebsocketLivelogger) Close() error
func (*WebsocketLivelogger) Connect ¶ added in v0.3.0
func (logger *WebsocketLivelogger) Connect() error
func (*WebsocketLivelogger) SendLog ¶ added in v0.3.0
func (logger *WebsocketLivelogger) SendLog(lines *TimelineRecordFeedLinesWrapper) error
type WebsocketLiveloggerWithFallback ¶ added in v0.3.0
type WebsocketLiveloggerWithFallback struct {
JobRequest *AgentJobRequestMessage
Connection *VssConnection
FeedStreamUrl string
// contains filtered or unexported fields
}
func (*WebsocketLiveloggerWithFallback) Close ¶ added in v0.3.0
func (logger *WebsocketLiveloggerWithFallback) Close() error
func (*WebsocketLiveloggerWithFallback) Initialize ¶ added in v0.3.0
func (logger *WebsocketLiveloggerWithFallback) Initialize()
func (*WebsocketLiveloggerWithFallback) InitializeVssLogger ¶ added in v0.3.0
func (logger *WebsocketLiveloggerWithFallback) InitializeVssLogger()
func (*WebsocketLiveloggerWithFallback) SendLog ¶ added in v0.3.0
func (logger *WebsocketLiveloggerWithFallback) SendLog(wrapper *TimelineRecordFeedLinesWrapper) error
type WorkspaceOptions ¶
type WorkspaceOptions struct {
Clean *string `json:",omitempty"`
}
Click to show internal directories.
Click to hide internal directories.