Documentation ¶
Index ¶
- Variables
- func Is(rawString string, expected Variant) bool
- func RangesInvalidErr() error
- func StringMustBe(rawString string, expected Variant)
- func ValidationError(rawString string, expectedEnum Variant) error
- type Connection
- func (it Connection) Compile() (string, error)
- func (it Connection) CompileUsingConnectionFormat(format string) string
- func (it Connection) CompileUsingParams(host, port, dbName string, user, password, options string) (string, error)
- func (it Connection) CompileUsingParamsNoOptions(host, port, dbName string, user, password string) (string, error)
- func (it Connection) ConnectionStringAllDbFormat() string
- func (it Connection) ConnectionStringFormat() string
- func (it Connection) CreateMap() map[string]string
- func (it Connection) CreateMapUsingParams(host, port, dbName string, user, password, options string) map[string]string
- func (it Connection) CreateMapUsingParamsNoOptions(host, port, dbName string, user, password string) map[string]string
- func (it Connection) HasConnectionString() bool
- func (it Connection) IsInvalidConnectionString() bool
- func (it Connection) IsValid() bool
- type ConnectionOptions
- func (it ConnectionOptions) CompileUsingConnectionFormat(format string) string
- func (it ConnectionOptions) CreateMap() map[string]string
- func (it ConnectionOptions) CreateMapUsingParams(host, port, dbName string, user, password, options string) map[string]string
- func (it ConnectionOptions) CreateMapUsingParamsNoOptions(host, port, dbName string, user, password string) map[string]string
- 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) Connection() connectionStringCompiler
- func (it Variant) DefaultPort() (port uint16)
- func (it Variant) DefaultPortInteger() (port int)
- func (it Variant) DefaultPortStatus() (port uint16, hasPort bool)
- func (it Variant) DefaultPortStatusInteger() (port int, hasPort bool)
- func (it Variant) EnumType() enuminf.EnumTyper
- func (it Variant) Format(format string) (compiled string)
- func (it Variant) IntegerEnumRanges() []int
- func (it Variant) IsAmazonDynamoDb() bool
- 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) IsCouchDb() bool
- func (it Variant) IsFirebird() bool
- func (it Variant) IsHSqlDb() bool
- func (it Variant) IsInvalid() bool
- func (it Variant) IsJson() bool
- func (it Variant) IsMariaDb() bool
- func (it Variant) IsMicrosoftAccess() bool
- func (it Variant) IsMicrosoftSqlCompact() bool
- func (it Variant) IsMicrosoftSqlExpress() bool
- func (it Variant) IsMicrosoftSqlServer() bool
- func (it Variant) IsMongoDb() bool
- func (it Variant) IsMySql() bool
- func (it Variant) IsNameEqual(name string) bool
- func (it Variant) IsNameOf(anyNames ...string) bool
- func (it Variant) IsNoSql() bool
- func (it Variant) IsOracle() bool
- func (it Variant) IsPostgreSql() bool
- func (it Variant) IsRedis() bool
- func (it Variant) IsSqlDb() bool
- func (it Variant) IsSqlite() bool
- func (it Variant) IsText() 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) RangeNamesCsv() string
- func (it Variant) RangesByte() []byte
- func (it Variant) RangesDynamicMap() map[string]interface{}
- 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 ( Ranges = [...]string{ Invalid: "Invalid", Sqlite: "Sqlite", Redis: "Redis", MySql: "MySql", MariaDb: "MariaDb", PostgreSql: "PostgreSql", MicrosoftSqlExpress: "MicrosoftSqlExpress", MicrosoftSqlServer: "MicrosoftSqlServer", MicrosoftSqlCompact: "MicrosoftSqlCompact", MicrosoftAccess: "MicrosoftAccess", Oracle: "Oracle", Firebird: "Firebird", MongoDb: "MongoDb", CouchDb: "CouchDb", AmazonDynamoDb: "AmazonDynamoDb", HSqlDb: "HSqlDb", Text: "Text", Json: "Json", Yaml: "Yaml", Protobuf: "Protobuf", } BasicEnumImpl = enumimpl.New.BasicByte.UsingTypeSlice( coredynamic.TypeName(Invalid), Ranges[:]) )
Functions ¶
func RangesInvalidErr ¶
func RangesInvalidErr() error
func StringMustBe ¶
func ValidationError ¶
Types ¶
type Connection ¶
type Connection struct { DbType Variant ConnectionOptions }
func (Connection) Compile ¶
func (it Connection) Compile() (string, error)
func (Connection) CompileUsingConnectionFormat ¶
func (it Connection) CompileUsingConnectionFormat( format string, ) string
func (Connection) CompileUsingParams ¶
func (it Connection) CompileUsingParams( host, port, dbName string, user, password, options string, ) (string, error)
func (Connection) CompileUsingParamsNoOptions ¶
func (it Connection) CompileUsingParamsNoOptions( host, port, dbName string, user, password string, ) (string, error)
func (Connection) ConnectionStringAllDbFormat ¶
func (it Connection) ConnectionStringAllDbFormat() string
func (Connection) ConnectionStringFormat ¶
func (it Connection) ConnectionStringFormat() string
func (Connection) CreateMap ¶
func (it Connection) CreateMap() map[string]string
func (Connection) CreateMapUsingParams ¶
func (it Connection) CreateMapUsingParams( host, port, dbName string, user, password, options string, ) map[string]string
func (Connection) CreateMapUsingParamsNoOptions ¶
func (it Connection) CreateMapUsingParamsNoOptions( host, port, dbName string, user, password string, ) map[string]string
func (Connection) HasConnectionString ¶
func (it Connection) HasConnectionString() bool
func (Connection) IsInvalidConnectionString ¶
func (it Connection) IsInvalidConnectionString() bool
func (Connection) IsValid ¶
func (it Connection) IsValid() bool
type ConnectionOptions ¶
type ConnectionOptions struct {
Host, Port string
User, Password string
Options string
DbName string
IsSpecificDatabase bool
}
func (ConnectionOptions) CompileUsingConnectionFormat ¶
func (it ConnectionOptions) CompileUsingConnectionFormat( format string, ) string
func (ConnectionOptions) CreateMap ¶
func (it ConnectionOptions) CreateMap() map[string]string
func (ConnectionOptions) CreateMapUsingParams ¶
func (it ConnectionOptions) CreateMapUsingParams( host, port, dbName string, user, password, options string, ) map[string]string
func (ConnectionOptions) CreateMapUsingParamsNoOptions ¶
func (it ConnectionOptions) CreateMapUsingParamsNoOptions( host, port, dbName string, user, password string, ) map[string]string
type Variant ¶
type Variant byte
const ( Invalid Variant = iota Sqlite Redis MySql MariaDb PostgreSql MicrosoftSqlExpress MicrosoftSqlServer MicrosoftSqlCompact MicrosoftAccess Oracle Firebird MongoDb CouchDb AmazonDynamoDb HSqlDb // https://en.wikipedia.org/wiki/HSQLDB Text Json Yaml Protobuf )
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) Connection ¶
func (it Variant) Connection() connectionStringCompiler
func (Variant) DefaultPort ¶
func (Variant) DefaultPortInteger ¶
func (Variant) DefaultPortStatus ¶
func (Variant) DefaultPortStatusInteger ¶
func (Variant) IntegerEnumRanges ¶
func (Variant) IsAmazonDynamoDb ¶
func (Variant) IsAnyNamesOf ¶
func (Variant) IsAnyValuesEqual ¶
func (Variant) IsByteValueEqual ¶
func (Variant) IsFirebird ¶
func (Variant) IsMicrosoftAccess ¶
func (Variant) IsMicrosoftSqlCompact ¶
func (Variant) IsMicrosoftSqlExpress ¶
func (Variant) IsMicrosoftSqlServer ¶
func (Variant) IsNameEqual ¶
func (Variant) IsPostgreSql ¶
func (Variant) IsValueEqual ¶
func (*Variant) JsonParseSelfInject ¶
func (Variant) MarshalJSON ¶
func (Variant) MaxValueString ¶
func (Variant) MinValueString ¶
func (Variant) OnlySupportedErr ¶
func (Variant) OnlySupportedMsgErr ¶
func (Variant) RangeNamesCsv ¶
func (Variant) RangesByte ¶
func (Variant) RangesDynamicMap ¶
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.