Documentation ¶
Index ¶
- Constants
- Variables
- func RangesInvalidErr() error
- type ExitCode
- func (it ExitCode) AllNameValues() []string
- func (it ExitCode) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder
- func (it ExitCode) AsBasicByteEnumContractsDelegateBinder() enuminf.BasicByteEnumContractsDelegateBinder
- func (it ExitCode) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder
- func (it ExitCode) AsJsonMarshaller() corejson.JsonMarshaller
- func (it ExitCode) EnumType() enuminf.EnumTyper
- func (it ExitCode) Format(format string) (compiled string)
- func (it ExitCode) IntegerEnumRanges() []int
- func (it ExitCode) IsActiveRunning() bool
- func (it ExitCode) IsAllOf(codes ...int) bool
- func (it ExitCode) IsAnyNamesOf(names ...string) bool
- func (it ExitCode) IsAnyOf(codes ...int) bool
- func (it ExitCode) IsAnyOfExitCode(anyOfItems ...ExitCode) bool
- func (it ExitCode) IsAnyValuesEqual(anyByteValues ...byte) bool
- func (it ExitCode) IsByteValueEqual(value byte) bool
- func (it ExitCode) IsDeadButPidExists() bool
- func (it ExitCode) IsDeadButVarLockFileExists() bool
- func (it ExitCode) IsDefined() bool
- func (it ExitCode) IsEqual(code int) bool
- func (it ExitCode) IsFailed() bool
- func (it ExitCode) IsInvalid() bool
- func (it ExitCode) IsInvalidCode() bool
- func (it ExitCode) IsInvalidService() bool
- func (it ExitCode) IsNameEqual(name string) bool
- func (it ExitCode) IsNameOf(anyNames ...string) bool
- func (it ExitCode) IsNotRunning() bool
- func (it ExitCode) IsSuccess() bool
- func (it ExitCode) IsUndefined() bool
- func (it ExitCode) IsUnknownService() bool
- func (it ExitCode) IsValid() bool
- func (it ExitCode) IsValueEqual(value byte) bool
- func (it ExitCode) MarshalJSON() ([]byte, error)
- func (it ExitCode) MaxByte() byte
- func (it ExitCode) MaxInt() int
- func (it ExitCode) MaxMaxAny() (min, max interface{})
- func (it ExitCode) MaxValueString() string
- func (it ExitCode) MinByte() byte
- func (it ExitCode) MinInt() int
- func (it ExitCode) MinValueString() string
- func (it ExitCode) Name() string
- func (it ExitCode) NameValue() string
- func (it ExitCode) OnlySupportedErr(names ...string) error
- func (it ExitCode) OnlySupportedMsgErr(message string, names ...string) error
- func (it ExitCode) RangeNamesCsv() string
- func (it ExitCode) RangesByte() []byte
- func (it ExitCode) RangesDynamicMap() map[string]interface{}
- func (it ExitCode) String() string
- func (it ExitCode) ToByteEnumString(input byte) string
- func (it ExitCode) ToNumberString() string
- func (it ExitCode) ToPtr() *ExitCode
- func (it ExitCode) TypeName() string
- func (it *ExitCode) UnmarshalJSON(data []byte) error
- func (it ExitCode) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)
- func (it ExitCode) Value() byte
- func (it ExitCode) ValueByte() byte
- func (it ExitCode) ValueInt() int
- func (it ExitCode) ValueInt16() int16
- func (it ExitCode) ValueInt32() int32
- func (it ExitCode) ValueInt8() int8
- func (it ExitCode) ValueString() string
- func (it ExitCode) ValueUInt16() uint16
Constants ¶
View Source
const (
InvalidExitCode = constants.MinInt
)
Variables ¶
View Source
var ( Ranges = [...]byte{ Invalid: Invalid.ValueByte(), ActiveRunning: ActiveRunning.ValueByte(), DeadButPidExists: DeadButPidExists.ValueByte(), DeadButVarLockFileExists: DeadButVarLockFileExists.ValueByte(), NotRunning: NotRunning.ValueByte(), UnknownService: UnknownService.ValueByte(), InvalidService: InvalidService.ValueByte(), InvalidCode: InvalidCode.ValueByte(), } StringRanges = [...]string{ Invalid: "Invalid", ActiveRunning: "ActiveRunning", DeadButPidExists: "DeadButPidExists", DeadButVarLockFileExists: "DeadButVarLockFileExists", NotRunning: "NotRunning", UnknownService: "UnknownService", InvalidService: "InvalidService", InvalidCode: "InvalidCode", } // RawMapping // // Reference : // https://gitlab.com/evatix-go/os-manuals/uploads/a3fc906f4ea29a59ebf29490391d0f86/image.png // https://t.ly/3jkY RawMapping = [...]ExitCode{ 0: ActiveRunning, 1: DeadButPidExists, 2: DeadButVarLockFileExists, 3: NotRunning, 4: UnknownService, 5: UnknownService, } BasicEnumImpl = enumimpl.New.BasicByte.UsingTypeSlice( coredynamic.TypeName(ActiveRunning), StringRanges[:]) )
Functions ¶
func RangesInvalidErr ¶
func RangesInvalidErr() error
Types ¶
type ExitCode ¶
type ExitCode byte
ExitCode
ActiveRunning, DeadButPidExists, DeadButVarLockFileExists, NotRunning, UnknownService What code means? - Invalid (0): Created by us, actually its value 0 but here we are considered for parsing issue - ActiveRunning(1): We will map this to 0, consider as program is running and service is okay. - DeadButPidExists(2): We will map this to 1, consider as program is dead and /var/run pid exists. - DeadButVarLockFileExists(3): We will map this to 2, consider as program is dead and /var/lock-lock file exists. - NotRunning(4): We will map this to 3, consider as program is not running but service exists in the system. - UnknownService(5) / InvalidService(7): We will map this to 4, 5 respectively and consider as program doesn't exist in the system or invalid exited.
Reference :
- LSB Returns Codes Screenshot : https://t.ly/3jkY
- LSB Returns Codes Screenshot : https://prnt.sc/26gunol
- Mapping (RawMapping) : https://prnt.sc/26gwnxw
func NewCodeMapping ¶
NewCodeMapping (using RawMapping)
Reference : https://gitlab.com/evatix-go/os-manuals/uploads/a3fc906f4ea29a59ebf29490391d0f86/image.png https://t.ly/3jkY
func (ExitCode) AllNameValues ¶
func (ExitCode) AsBasicByteEnumContractsBinder ¶
func (it ExitCode) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder
func (ExitCode) AsBasicByteEnumContractsDelegateBinder ¶
func (it ExitCode) AsBasicByteEnumContractsDelegateBinder() enuminf.BasicByteEnumContractsDelegateBinder
func (ExitCode) AsBasicEnumContractsBinder ¶
func (it ExitCode) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder
func (ExitCode) AsJsonMarshaller ¶
func (it ExitCode) AsJsonMarshaller() corejson.JsonMarshaller
func (ExitCode) IntegerEnumRanges ¶
func (ExitCode) IsActiveRunning ¶
func (ExitCode) IsAnyNamesOf ¶
func (ExitCode) IsAnyOfExitCode ¶
func (ExitCode) IsAnyValuesEqual ¶
func (ExitCode) IsByteValueEqual ¶
func (ExitCode) IsDeadButPidExists ¶
func (ExitCode) IsDeadButVarLockFileExists ¶
func (ExitCode) IsInvalidCode ¶
func (ExitCode) IsInvalidService ¶
func (ExitCode) IsNameEqual ¶
func (ExitCode) IsNotRunning ¶
func (ExitCode) IsUndefined ¶
func (ExitCode) IsUnknownService ¶
func (ExitCode) IsValueEqual ¶
func (ExitCode) MarshalJSON ¶
func (ExitCode) MaxValueString ¶
func (ExitCode) MinValueString ¶
func (ExitCode) OnlySupportedErr ¶
func (ExitCode) OnlySupportedMsgErr ¶
func (ExitCode) RangeNamesCsv ¶
func (ExitCode) RangesByte ¶
func (ExitCode) RangesDynamicMap ¶
func (ExitCode) ToByteEnumString ¶
func (ExitCode) ToNumberString ¶
func (*ExitCode) UnmarshalJSON ¶
func (ExitCode) UnmarshallEnumToValue ¶
func (ExitCode) ValueInt16 ¶
func (ExitCode) ValueInt32 ¶
func (ExitCode) ValueString ¶
func (ExitCode) ValueUInt16 ¶
Click to show internal directories.
Click to hide internal directories.