shared

package
v0.0.0-...-924aaf8 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailOnError

func FailOnError(err error, msg string)

func IsVariable

func IsVariable(value string) (is bool)

This is treated so special to be kept in sync everywhere we want to check if a field in the task body of a pipeline task is set to a variable IsVariable checks if the value is a pipeline variable

Types

type AuthHelper

type AuthHelper struct {
	HttpHelper HttpHelper
	// contains filtered or unexported fields
}

func (*AuthHelper) GetToken

func (aus *AuthHelper) GetToken() (token string, err error)

func (*AuthHelper) Register

func (aus *AuthHelper) Register() (err error)

type FormattedError

type FormattedError struct {
	Inner      error
	Message    string
	StackTrace string
	Misc       map[string]interface{}
}

func (*FormattedError) WrapError

func (fe *FormattedError) WrapError(err error, msgFormat string, msgArgs ...interface{})
type Header struct {
	Key   string
	Value string
}

type HttpClient

type HttpClient interface {
	Do(req *http.Request) (resp *http.Response, err error)
}

func NewHttpClient

func NewHttpClient() HttpClient

type HttpHelper

type HttpHelper interface {
	HttpRequest(method string, url string, body io.Reader, headers []Header, timeout time.Duration) (out []byte, err error, statusCode int)
}

func NewHttpHelper

func NewHttpHelper(client HttpClient) HttpHelper

type LineCount

type LineCount struct {
	Lock    sync.RWMutex
	Counter map[string]int16
}

type LogHelper

type LogHelper interface {
	Log(line string, isLastLine bool, taskId string) (jobId string, err error)
}

func NewLogHelper

func NewLogHelper(authHelper AuthHelper, httpHelper HttpHelper) LogHelper

type LogMessage

type LogMessage struct {
	JobId      string `json:"jobId"`
	LineNumber int16  `json:"lineNumber"`
	Payload    string `json:"payload"`
	IsLastLine bool   `json:"isLastLine"`
}

Jump to

Keyboard shortcuts

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