scripttype

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2022 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RangesMap = map[Variant]*ScriptDefault{
		Invalid: {
			ScriptType:    Invalid,
			IsImplemented: false,
		},
		Default: {
			ScriptType:  Default,
			ProcessName: "",
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: false,
		},
		Shell: {
			ScriptType:  Shell,
			ProcessName: constants.BinShellCmd,
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: true,
		},
		Bash: {
			ScriptType:  Bash,
			ProcessName: constants.BashDefaultPath,
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: true,
		},
		Perl: {
			ScriptType:  Perl,
			ProcessName: "perl",
			DefaultArguments: []string{
				constants.NonInteractivePerlFlag,
			},
			IsImplemented: true,
		},
		Python: {
			ScriptType:  Python,
			ProcessName: "python",
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: false,
		},
		Python2: {
			ScriptType:  Python2,
			ProcessName: "python2",
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: false,
		},
		Python3: {
			ScriptType:  Python3,
			ProcessName: "python3",
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: true,
		},
		CLang: {
			ScriptType:  CLang,
			ProcessName: "gcc",
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: false,
		},
		MakeScript: {
			ScriptType:  MakeScript,
			ProcessName: "python3",
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: true,
		},
		Powershell: {
			ScriptType:  Powershell,
			ProcessName: "pwsh",
			DefaultArguments: []string{
				constants.NonInteractiveFlag,
			},
			IsImplemented: true,
		},
		Cmd: {
			ScriptType:  Cmd,
			ProcessName: "cmd",
			DefaultArguments: []string{
				constants.NonInteractiveCmdFlag,
			},
			IsImplemented: true,
		},
	}

	BasicEnumImpl = enumimpl.New.BasicByte.UsingTypeSlice(
		coredynamic.TypeName(Invalid),
		scriptTypeStringRanges[:])
)

Functions

This section is empty.

Types

type ScriptDefault

type ScriptDefault struct {
	ScriptType       Variant
	IsImplemented    bool
	ProcessName      string
	DefaultArguments []string
}

func DefaultOsScript

func DefaultOsScript() *ScriptDefault

func (*ScriptDefault) String

func (it *ScriptDefault) String() string

type Variant

type Variant byte
const (
	Invalid Variant = iota
	Default
	Shell
	Bash
	Perl
	Python
	Python2
	Python3
	CLang
	MakeScript
	Powershell
	Cmd
)

func (Variant) AllNameValues added in v0.0.4

func (it Variant) AllNameValues() []string

func (Variant) AsBasicByteEnumContractsBinder

func (it Variant) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder

func (Variant) AsBasicEnumContractsBinder

func (it Variant) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder

func (Variant) EnumType added in v0.0.4

func (it Variant) EnumType() enuminf.EnumTyper

func (Variant) Format added in v0.0.4

func (it Variant) Format(format string) (compiled string)

func (Variant) IntegerEnumRanges added in v0.0.4

func (it Variant) IntegerEnumRanges() []int

func (Variant) IsAnyNamesOf added in v0.0.4

func (it Variant) IsAnyNamesOf(names ...string) bool

func (Variant) IsAnyOf

func (it Variant) IsAnyOf(anyOfItems ...Variant) bool

func (Variant) IsAnyPython

func (it Variant) IsAnyPython() bool

func (Variant) IsAnyValuesEqual added in v0.0.4

func (it Variant) IsAnyValuesEqual(anyByteValues ...byte) bool

func (Variant) IsBash

func (it Variant) IsBash() bool

func (Variant) IsByteValueEqual added in v0.0.4

func (it Variant) IsByteValueEqual(value byte) bool

func (Variant) IsCLang

func (it Variant) IsCLang() bool

func (Variant) IsCmd

func (it Variant) IsCmd() bool

func (Variant) IsCmdOrPowerShell

func (it Variant) IsCmdOrPowerShell() bool

func (Variant) IsDefault

func (it Variant) IsDefault() bool

func (Variant) IsInvalid added in v0.0.4

func (it Variant) IsInvalid() bool

func (Variant) IsMakeScript

func (it Variant) IsMakeScript() bool

func (Variant) IsNameEqual added in v0.0.4

func (it Variant) IsNameEqual(name string) bool

func (Variant) IsPerl

func (it Variant) IsPerl() bool

func (Variant) IsPowershell

func (it Variant) IsPowershell() bool

func (Variant) IsPython

func (it Variant) IsPython() bool

func (Variant) IsPython2

func (it Variant) IsPython2() bool

func (Variant) IsPython3

func (it Variant) IsPython3() bool

func (Variant) IsShell

func (it Variant) IsShell() bool

func (Variant) IsUninitialized

func (it Variant) IsUninitialized() bool

func (Variant) IsValid added in v0.0.4

func (it Variant) IsValid() bool

func (Variant) IsValueEqual added in v0.0.4

func (it Variant) IsValueEqual(value byte) bool

func (*Variant) MarshalJSON

func (it *Variant) MarshalJSON() ([]byte, error)

func (*Variant) MaxByte

func (it *Variant) MaxByte() byte

func (Variant) MaxInt added in v0.0.4

func (it Variant) MaxInt() int

func (Variant) MaxMaxAny added in v0.0.4

func (it Variant) MaxMaxAny() (min, max interface{})

func (Variant) MaxValueString added in v0.0.4

func (it Variant) MaxValueString() string

func (*Variant) MinByte

func (it *Variant) MinByte() byte

func (Variant) MinInt added in v0.0.4

func (it Variant) MinInt() int

func (Variant) MinValueString added in v0.0.4

func (it Variant) MinValueString() string

func (Variant) Name

func (it Variant) Name() string

func (Variant) NameValue

func (it Variant) NameValue() string

func (Variant) OnlySupportedErr added in v0.0.4

func (it Variant) OnlySupportedErr(names ...string) error

func (Variant) OnlySupportedMsgErr added in v0.0.4

func (it Variant) OnlySupportedMsgErr(message string, names ...string) error

func (Variant) RangeNamesCsv

func (it Variant) RangeNamesCsv() string

func (*Variant) RangesByte

func (it *Variant) RangesByte() []byte

func (Variant) RangesDynamicMap added in v0.0.4

func (it Variant) RangesDynamicMap() map[string]interface{}

func (*Variant) RangesVariants

func (it *Variant) RangesVariants() []Variant

func (*Variant) ScriptDefault

func (it *Variant) ScriptDefault() *ScriptDefault

func (Variant) String

func (it Variant) String() string

func (*Variant) ToNumberString

func (it *Variant) ToNumberString() string

func (Variant) ToPtr added in v0.0.4

func (it Variant) ToPtr() *Variant

func (Variant) TypeName

func (it Variant) TypeName() string

func (*Variant) UnmarshalJSON

func (it *Variant) UnmarshalJSON(data []byte) error

func (*Variant) UnmarshallEnumToValue

func (it *Variant) UnmarshallEnumToValue(
	jsonUnmarshallingValue []byte,
) (byte, error)

func (Variant) ValueByte

func (it Variant) ValueByte() byte

func (Variant) ValueInt added in v0.0.4

func (it Variant) ValueInt() int

func (Variant) ValueInt16 added in v0.0.4

func (it Variant) ValueInt16() int16

func (Variant) ValueInt32 added in v0.0.4

func (it Variant) ValueInt32() int32

func (Variant) ValueInt8 added in v0.0.4

func (it Variant) ValueInt8() int8

func (Variant) ValueString added in v0.0.4

func (it Variant) ValueString() string

func (Variant) ValueUInt16 added in v0.0.4

func (it Variant) ValueUInt16() uint16

Jump to

Keyboard shortcuts

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