templating

package
v0.0.0-...-305df0d Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(name string, value string, args interface{}) (string, error)

Execute a template with the given args

func New

func New(name string) *template.Template

New creates a Go template with Sprig loaded

Types

type Args

type Args struct {
	EventType string

	BuildID *int

	BuildNumber *string

	PullRequestID *int

	ProjectName *string

	ResourceURL *string

	StartTime *time.Time

	FinishTime *time.Time

	ResourceName string

	Status *string

	Reason *string

	ServiceHook azuredevops.ServiceHook
}

Args holds all of the values available to go templating at runtime

func NewArgsFromServiceHook

func NewArgsFromServiceHook(serviceHook azuredevops.ServiceHook) Args

NewArgsFromServiceHook creates an Args from a Service Hook request

Jump to

Keyboard shortcuts

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