Documentation ¶
Index ¶
- Variables
- type Formatter
- type Variant
- func (it Variant) AllNameValues() []string
- func (it Variant) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder
- func (it Variant) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder
- func (it *Variant) AsJsonContractsBinder() corejson.JsonContractsBinder
- func (it *Variant) AsJsonMarshaller() corejson.JsonMarshaller
- func (it *Variant) AsJsoner() corejson.Jsoner
- func (it Variant) Clone() Variant
- func (it Variant) CompileCurlyTemplate() (pathTemplateFormat string)
- func (it Variant) CompileCurlyTemplateReplace(replacerMap map[string]string) (pathTemplateFormatCompiled string)
- func (it Variant) CompilePathTemplate(isCurlyFormat bool) (pathTemplateFormat string)
- func (it Variant) CompileTemplate() (pathTemplateFormat string)
- func (it Variant) CompileTemplateReplaceOption(isCurlyFormat bool, replacerMap map[string]string) (pathTemplateFormatCompiled string)
- func (it Variant) CurlyPathFullName() string
- func (it Variant) EnumType() enuminf.EnumTyper
- func (it Variant) ExpandedAssociatedVariants() []Variant
- func (it Variant) Format(format string) (compiled string)
- func (it Variant) HasExpandAssoc() bool
- func (it Variant) IntegerEnumRanges() []int
- func (it Variant) IsAnyNamesOf(names ...string) bool
- func (it Variant) IsAnyOf(anyOfItems ...Variant) bool
- func (it Variant) IsAnyValuesEqual(anyByteValues ...byte) bool
- func (it Variant) IsByteValueEqual(value byte) bool
- func (it Variant) IsExpandPossible() bool
- func (it Variant) IsInvalid() bool
- func (it Variant) IsNameEqual(name string) bool
- func (it Variant) IsNameOf(anyNames ...string) bool
- func (it Variant) IsSingleType() bool
- func (it Variant) IsUninitialized() bool
- func (it Variant) IsValid() bool
- func (it Variant) IsValueEqual(value byte) bool
- func (it Variant) Json() corejson.Result
- func (it *Variant) JsonParseSelfInject(jsonResult *corejson.Result) error
- func (it Variant) JsonPtr() *corejson.Result
- func (it Variant) MarshalJSON() ([]byte, error)
- func (it Variant) MaxByte() byte
- func (it Variant) MaxInt() int
- func (it Variant) MaxValueString() string
- func (it Variant) MinByte() byte
- func (it Variant) MinInt() int
- func (it Variant) MinMaxAny() (min, max interface{})
- func (it Variant) MinValueString() string
- func (it Variant) Name() string
- func (it Variant) NameValue() string
- func (it Variant) OnlySupportedErr(names ...string) error
- func (it Variant) OnlySupportedMsgErr(message string, names ...string) error
- func (it Variant) PathFullName() string
- func (it Variant) RangeNamesCsv() string
- func (it Variant) RangesByte() []byte
- func (it Variant) RangesDynamicMap() map[string]interface{}
- func (it Variant) SplitExpandedAssocCurlyPathStrings() (pathTemplateFormat []string)
- func (it Variant) SplitExpandedAssocPathStrings(formatter Formatter) (pathTemplateFormat []string)
- func (it Variant) SplitExpandedAssocPaths() (pathTemplateFormat []string)
- func (it Variant) String() string
- func (it Variant) ToNumberString() string
- func (it Variant) ToPtr() *Variant
- func (it *Variant) ToSimple() Variant
- func (it Variant) TypeName() string
- func (it *Variant) UnmarshalJSON(data []byte) error
- func (it Variant) UnmarshallEnumToValue(jsonUnmarshallingValue []byte) (byte, error)
- func (it Variant) Value() byte
- func (it Variant) ValueByte() byte
- func (it Variant) ValueInt() int
- func (it Variant) ValueInt16() int16
- func (it Variant) ValueInt32() int32
- func (it Variant) ValueInt8() int8
- func (it Variant) ValueString() string
- func (it Variant) ValueUInt16() uint16
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BasicEnumImpl = enumimpl.New.BasicByte.UsingTypeSlice( coredynamic.TypeName(Invalid), rangesMap[:]) )
Functions ¶
This section is empty.
Types ¶
type Variant ¶
type Variant byte
Variant
AnyIp, SpecificIp
const ( Invalid Variant = iota Root VariableDir App AppCore // single Id File VarApp AppConfigStore AppLog AppDb AppTest AppTemp VarAppTemp Relative RelativeId RelativeIdFile AppRelative AppRelativeId AppRelativeIdFile PrefixApp PrefixAppRelative PrefixAppRelativeId PrefixAppRelativeIdFile TempRoot AppInstalled // single AppDownloads // multi Home User HomeUser HomeUserApp UsersRoot // single WebServerRoot // single WebServerConfigsRoot WebServerConfigsUsersRoot Packages Instructions VarAppPackages VarAppDownloads VarAppInstructions VarAppLog VarAppLogId IdFile LogFile LogId DbId DbIdFile ConfigStore Log Database Test Temp Prefix Downloads Extension FileWithExtension Webserver PrefixAppFile AppFileWithExtension PrefixAppFileWithExtension PrefixRelativeAppFileWithExtension UserTemp Audit LogDb LogDbFile LogAppDb LogAppDbFile TempUser TempApp TempAudit LogApp LogAppFile Random RandomUuid RandomNumber AppDbFile AppDbRelativeFile AppDbRandom AppDbRandomRelative AppDbRandomRelativeFile LogRandom AppDbRandomFile LogRandomFile VarAppRandom VarAppRandomFile VarAppRandomRelative VarAppRandomRelativeFile Specific Backup HomeBackup BackupSpecific BackupRelative Ssl WebServerSsl WebServerConfigUsers WebServerConfigUsersSpecific WebServerConfigSsl RelativeSsl VarAppBackup VarAppBackupFile VarAppBackupRandom VarAppBackupRandomFile VarAppBackupRandomRelative VarAppBackupRandomRelativeFile Config Users BackupFile BackupRelativeFile PrefixBackup PrefixBackupFile PrefixBackupRelativeFile PrefixBackupRandomRelativeFile )
func New ¶
New
Variant gets created from Variant JSON name direct name or curly name or path name also returns the variant.
Example:
- "Id" or "\"Id\"" or {id} or id or idValue as string("5") : should return Id
func NewMust ¶
NewMust
Variant gets created from Variant JSON name direct name or curly name or path name also returns the variant.
Example:
- "Id" or "\"Id\"" or {id} or id or idValue as string("5") : should return Id
func (Variant) AllNameValues ¶
func (Variant) AsBasicByteEnumContractsBinder ¶
func (it Variant) AsBasicByteEnumContractsBinder() enuminf.BasicByteEnumContractsBinder
func (Variant) AsBasicEnumContractsBinder ¶
func (it Variant) AsBasicEnumContractsBinder() enuminf.BasicEnumContractsBinder
func (*Variant) AsJsonContractsBinder ¶
func (it *Variant) AsJsonContractsBinder() corejson.JsonContractsBinder
func (*Variant) AsJsonMarshaller ¶
func (it *Variant) AsJsonMarshaller() corejson.JsonMarshaller
func (Variant) CompileCurlyTemplate ¶
CompileCurlyTemplate
compiles template format using current os path separator (constants.PathSeparator)
Example:
- PrefixAppRelativeIdFile : {prefix}/{app}/{relative}/{id}
func (Variant) CompileCurlyTemplateReplace ¶
func (it Variant) CompileCurlyTemplateReplace( replacerMap map[string]string, ) (pathTemplateFormatCompiled string)
CompileCurlyTemplateReplace
compiles template format using current os path separator (constants.PathSeparator) and then replace using replacerMap
Example:
PrefixAppRelativeIdFile : {prefix}/{app}/{relative}/{id}
Finally:
These compiled format will be replaced by the given map.
func (Variant) CompilePathTemplate ¶
CompilePathTemplate
compiles template format using current os path separator (constants.PathSeparator)
Example:
- isCurly : true PrefixAppRelativeIdFile : {prefix}/{app}/{relative}/{id}
- isCurly : false PrefixAppRelativeIdFile : prefix\app\relative\id
func (Variant) CompileTemplate ¶
CompileTemplate
compiles template format using current os path separator (constants.PathSeparator)
Example:
- PrefixAppRelativeIdFile : prefix\app\relative\id
func (Variant) CompileTemplateReplaceOption ¶
func (it Variant) CompileTemplateReplaceOption( isCurlyFormat bool, replacerMap map[string]string, ) (pathTemplateFormatCompiled string)
CompileTemplateReplaceOption
compiles template format using current os path separator (constants.PathSeparator) and then replace using replacerMap
Example:
- isCurly : true PrefixAppRelativeIdFile : {prefix}/{app}/{relative}/{id}
- isCurly : false PrefixAppRelativeIdFile : prefix\app\relative\id
Finally:
These compiled format will be replaced by the given map.
func (Variant) CurlyPathFullName ¶
func (Variant) ExpandedAssociatedVariants ¶
ExpandedAssociatedVariants
Variants connected with the current variant
Example:
- PrefixAppRelativeIdFile : Prefix / App / Relative / Id / File [ Prefix, App, Relative, Id, File ] => []Variant
func (Variant) HasExpandAssoc ¶
func (Variant) IntegerEnumRanges ¶
func (Variant) IsAnyNamesOf ¶
func (Variant) IsAnyValuesEqual ¶
func (Variant) IsByteValueEqual ¶
func (Variant) IsExpandPossible ¶
func (Variant) IsNameEqual ¶
func (Variant) IsSingleType ¶
func (Variant) IsUninitialized ¶
func (Variant) IsValueEqual ¶
func (*Variant) JsonParseSelfInject ¶
func (Variant) MarshalJSON ¶
func (Variant) MaxValueString ¶
func (Variant) MinValueString ¶
func (Variant) OnlySupportedErr ¶
func (Variant) OnlySupportedMsgErr ¶
func (Variant) PathFullName ¶
func (Variant) RangeNamesCsv ¶
func (Variant) RangesByte ¶
func (Variant) RangesDynamicMap ¶
func (Variant) SplitExpandedAssocCurlyPathStrings ¶
SplitExpandedAssocCurlyPathStrings
Template formats
Example:
- PrefixAppRelativeIdFile : [{prefix},{app},{relative},{id}]
func (Variant) SplitExpandedAssocPathStrings ¶
func (it Variant) SplitExpandedAssocPathStrings( formatter Formatter, ) (pathTemplateFormat []string)
SplitExpandedAssocPathStrings
Template formats
Example (if curly output used):
- PrefixAppRelativeIdFile : [{prefix},{app},{relative},{id}]
func (Variant) SplitExpandedAssocPaths ¶
SplitExpandedAssocPaths
Template formats
Example:
- PrefixAppRelativeIdFile : [prefix, app, relative, id]
func (Variant) ToNumberString ¶
func (*Variant) UnmarshalJSON ¶
func (Variant) UnmarshallEnumToValue ¶
func (Variant) ValueInt16 ¶
func (Variant) ValueInt32 ¶
func (Variant) ValueString ¶
func (Variant) ValueUInt16 ¶
Click to show internal directories.
Click to hide internal directories.