tasks

package
v1.7.4-rc.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseTaskConfiguration

type BaseTaskConfiguration struct {
	Type         *string              `json:"type,omitempty" validate:"omitempty,eq=shell|eq=process"`
	Command      *string              `json:"command,omitempty"`
	IsBackground *bool                `json:"isBackground,omitempty"`
	Options      *CommandOptions      `json:"options,omitempty"`
	Args         []string             `json:"args,omitempty"`
	Presentation *PresentationOptions `json:"presentation,omitempty"`
	// ProblemMatcher struct{}           `json:"problemMatcher,omitempty"`
	Tasks []TaskDescription `json:"tasks,omitempty"`
}

type CommandOptions

type CommandOptions struct {
	Cwd   string            `json:"cwd,omitempty"`
	Env   map[string]string `json:"env,omitempty"`
	Shell *struct {
		Executable string   `json:"executable" validate:"required"`
		Args       []string `json:"args,omitempty"`
	} `json:"shell,omitempty"`
}

type PresentationOptions

type PresentationOptions struct {
	Reveal           *string `json:"reveal" validate:"eq=never|eq=silent|eq=always"`
	Echo             *bool   `json:"echo"`
	Focus            *bool   `json:"focus"`
	Panel            *string `json:"panel" validate:"eq=shared|eq=dedicated|eq=new"`
	ShowReuseMessage *bool   `json:"showReuseMessage"`
	Clear            *bool   `json:"clear"`
	Group            *string `json:"group"`
}

type ShellCommandOpts

type ShellCommandOpts struct {
	Cwd string
	Env map[string]string
}

type TaskConfiguration

type TaskConfiguration struct {
	BaseTaskConfiguration

	Version string                 `json:"version" validate:"eq=2.0.0"`
	Windows *BaseTaskConfiguration `json:"windows,omitempty"`
	OSX     *BaseTaskConfiguration `json:"osx,omitempty"`
	Linux   *BaseTaskConfiguration `json:"linux,omitempty"`
}

func Generate

func Generate(descriptions ...TaskDescription) (*TaskConfiguration, error)

func GenerateFromShellCommand

func GenerateFromShellCommand(name, command string, opts *ShellCommandOpts) (*TaskConfiguration, error)

type TaskDescription

type TaskDescription struct {
	Label        string               `json:"label" validate:"required"`
	Type         string               `json:"type,omitempty" validate:"eq=shell|eq=process"`
	Command      string               `json:"command" validate:"required"`
	IsBackground bool                 `json:"isBackground,omitempty"`
	Options      *CommandOptions      `json:"options,omitempty"`
	Args         []string             `json:"args,omitempty"`
	Group        string               `json:"group"`
	Presentation *PresentationOptions `json:"presentation,omitempty"`
}

Jump to

Keyboard shortcuts

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