Versions in this module Expand all Collapse all v1 v1.0.37 Aug 12, 2023 Changes in this version + const CAP_PROVIDER_KV_ETCD + const CAP_PROVIDER_NOSQL_ES + const ENV_DEV + const ENV_LOCAL + const ENV_PRE_PRODUCTION + const ENV_PRODUCTION + const ENV_SIMULATION + const ENV_TEST + const PROVIDER_TYPE_DEFAULT + const PROVIDER_TYPE_MASTER + const PROVIDER_TYPE_OTHER + const PROVIDER_TYPE_SLAVE + const SdkCategoryOffset + var AllMqOptionsTypes = []MqOptionType + var ErrEmptyConfig = errors.New("empty config") + var ErrInvalidConfig = errors.New("invalid config") + var SupportedEnvs = []string + type CacheClient interface + BfAdd func(key string, item string) (exists bool, err error) + BfAddMulti func(key string, items []interface{}) ([]int64, error) + BfExists func(key string, item string) (exists bool, err error) + BfExistsMulti func(key string, items []interface{}) ([]int64, error) + BfReserve func(key string, errorRate float64, capacity uint64) (err error) + DecrBy func(key string, number int) error + Del func(key string) error + Dels func(keys []string) error + Eval func(scriptContent string, keys []interface{}, args []interface{}) (interface{}, error) + Exists func(key string) (bool, error) + Expire func(key string, expire int) error + Get func(key string) ([]byte, error) + GetFloat64 func(key string) (float64, error) + GetInt func(key string) (int, error) + GetInt64 func(key string) (int64, error) + GetString func(key string) (string, error) + HDel func(key string, field interface{}) (int, error) + HDels func(key string, fields []interface{}) (int, error) + HGet func(key string, field string) ([]byte, error) + HGetAll func(key string) (map[string]string, error) + HGetFloat64 func(key string, field string) (float64, error) + HGetInt func(key string, field string) (int, error) + HGetInt64 func(key string, field string) (int64, error) + HGetString func(key string, field string) (string, error) + HLen func(key string) (int, error) + HMGet func(key string, fields []string) ([][]byte, error) + HMSet func(key string, args map[string]interface{}) error + HSet func(key string, field interface{}, value interface{}) (int, error) + Incr func(key string) error + IncrBy func(key string, number int) error + Ping func() error + Pipeline func(commands []*CacheCommand) (reply interface{}, err error) + RPop func(key string) ([]byte, error) + SAdd func(key string, members interface{}) error + SDiff func(keys []string) ([]string, error) + SInter func(keys []string) ([]string, error) + SIsMember func(key string, member interface{}) (bool, error) + SMembers func(key string) ([]string, error) + SRem func(key string, members interface{}) error + SUnion func(keys []string) ([]string, error) + Set func(key string, value interface{}) error + SetEx func(key string, value interface{}, expire int) error + Ttl func(key string) (int64, error) + ZAdd func(key string, score int64, member interface{}) error + ZCard func(key string) (int, error) + ZIncrBy func(key string, increment int64, member interface{}) error + ZInterstore func(newKey string, keys ...interface{}) (int64, error) + ZRange func(key string, min, max int64) (map[string]string, error) + ZRangeByScore func(key string, min, max interface{}) ([]string, error) + ZRem func(destKey string, members ...interface{}) (int64, error) + ZRemRangeByScore func(key string, min, max interface{}) error + ZScore func(key string, member interface{}) (int64, error) + type CacheCommand struct + Args []interface{} + Name string + type CacheProvider interface + By func(string) CacheClient + My func() CacheClient + type Configer interface + GetGraphConfig func() interface{} + GetKafkaConfig func() interface{} + GetKvConfig func() interface{} + GetLogConfig func() interface{} + GetMysqlConfig func() interface{} + GetNosqlConfig func() interface{} + GetRabbitmqConfig func() interface{} + GetRedisConfig func() interface{} + type DbClient interface + Get func(dest interface{}, query string, args ...interface{}) error + Queryx func(query string, args ...interface{}) (*sqlx.Rows, error) + Rebind func(query string) string + type DbProvider interface + By func(string) *sqlx.DB + Master func() *sqlx.DB + My func() *sqlx.DB + Slave func(int) *sqlx.DB + type GraphProvider interface + Exec func(workFuncs []neo4j.TransactionWork, bookmarks ...string) (string, error) + Get func(cypher string, args ...interface{}) (interface{}, error) + Reader func(bookmarks ...string) neo4j.Session + Select func(cypher string, args ...interface{}) ([]interface{}, error) + Writer func(bookmarks ...string) neo4j.Session + type KvProvider interface + type LogProvider interface + Debug func(msg string, keyvals ...interface{}) + Error func(msg string, keyvals ...interface{}) + Fatal func(msg string, keyvals ...interface{}) + GetStdLogger func() *log.Logger + Info func(msg string, keyvals ...interface{}) + Log func(keyvals ...interface{}) error + Panic func(msg string, keyvals ...interface{}) + Trace func(msg string, keyvals ...interface{}) + Warn func(msg string, keyvals ...interface{}) + type Mq interface + CreateConsumer func(processFunc MqMsgProcessFunc, parameters map[string]interface{}, ...) (MqConsumer, error) + CreateProducer func(parameters map[string]interface{}, args ...MqOptioner) (MqProducer, error) + GetDefaultOptions func() map[MqOptionType]MqOptioner + type MqConsumer interface + Close func() + Consume func() + type MqMsgAction int + const Ack + const BatchAck + const BatchRetry + const Next + const Retry + type MqMsgProcessFunc func([]byte) MqMsgAction + type MqOptionType int + const MqOptionConsume + const MqOptionExchange + const MqOptionPublish + const MqOptionQos + const MqOptionQueue + type MqOptioner interface + GetType func() MqOptionType + type MqProducer interface + Close func() + GetLastConfirmedId func() uint64 + Publish func(data []byte, args ...interface{}) error + PublishDelay func(data []byte, ttl int64, args ...interface{}) error + type MqProvider interface + By func(string) Mq + My func() Mq + type NosqlProvider interface + type Provider interface + Init func(rootConfiger Configer, logger LogProvider, args ...interface{}) error + type SdkConfigItem struct + Kafka interface{} + Kv interface{} + Log interface{} + MicroService interface{} + Mysql interface{} + Neo4j interface{} + Nosql interface{} + RabbitMq interface{} + Redis interface{} + type SdkType int + const LibLogZerolog + const SdkCategoryCache + const SdkCategoryDb + const SdkCategoryGraph + const SdkCategoryKv + const SdkCategoryLog + const SdkCategoryMq + const SdkCategoryMs + const SdkCategoryNosql + const SdkTypeCacheRedis + const SdkTypeDbMysql + const SdkTypeGraphNeo4j + const SdkTypeMqKafka + const SdkTypeMqRabbitmq