Documentation ¶
Index ¶
- Constants
- type CompOptions
- func (c *CompOptions) Get(key string) interface{}
- func (c *CompOptions) GetArgs(key string) map[string]interface{}
- func (c *CompOptions) GetBool(key string) bool
- func (c *CompOptions) GetInt(key string) int
- func (c *CompOptions) GetString(key string) string
- func (c *CompOptions) Set(key string, val interface{})
- type Email
- type Etcd
- func (e *Etcd) BindSubscriber(subscriber ISubscriber)
- func (e *Etcd) Client() *clientv3.Client
- func (e *Etcd) Close()
- func (e *Etcd) Conn(urls string, root string) error
- func (e *Etcd) Delete(path string) (int64, error)
- func (e *Etcd) Get(path string) (string, error)
- func (e *Etcd) Gets(path string) (map[string]string, error)
- func (e *Etcd) Set(path string, val string) error
- func (e *Etcd) SetAuthor(user string, pass string)
- func (e *Etcd) SetOption(key string, val interface{})
- func (e *Etcd) Subscribe(path string)
- type IComponent
- type IPublisher
- type ISubscribable
- type ISubscriber
- type MongoDB
- func (m *MongoDB) BindSubscriber(subscriber ISubscriber)
- func (m *MongoDB) Close()
- func (m *MongoDB) Collect(colName string) *mongo.Collection
- func (m *MongoDB) Conn(url string, dbname string) error
- func (m *MongoDB) NewObjectId() primitive.ObjectID
- func (m *MongoDB) RawDB() *mongo.Database
- func (m *MongoDB) SetAuthor(user string, pass string)
- func (m *MongoDB) SetOption(key string, val interface{})
- func (m *MongoDB) Subscribe(colName string) error
- type MySql
- type RabbitMQ
- func (r *RabbitMQ) BindSubscriber(subscriber ISubscriber)
- func (r *RabbitMQ) Close()
- func (r *RabbitMQ) Conn(url string, host string) error
- func (r *RabbitMQ) Publish(que string, msg string) error
- func (r *RabbitMQ) SetAuthor(user string, pass string)
- func (r *RabbitMQ) SetOption(key string, val interface{})
- func (r *RabbitMQ) Subscribe(que string)
- type Redis
- func (r *Redis) BindSubscriber(subscriber ISubscriber)
- func (r *Redis) Close()
- func (r *Redis) Conn(url string, db string) error
- func (r *Redis) Delete(key string) (int64, error)
- func (r *Redis) Exists(key string) (bool, error)
- func (r *Redis) Get(key string) (string, error)
- func (r *Redis) GetClient() *RedisClient
- func (r *Redis) HDel(key string, hkey string) (bool, error)
- func (r *Redis) HExists(key string, hkey string) (bool, error)
- func (r *Redis) HGet(key string, hkey string) (string, error)
- func (r *Redis) HGetAll(key string) (map[string]string, error)
- func (r *Redis) HKeys(key string) ([]string, error)
- func (r *Redis) HLen(key string) (int, error)
- func (r *Redis) HMSet(key string, dict map[string]string) (bool, error)
- func (r *Redis) HSet(key string, hkey string, val string) (bool, error)
- func (r *Redis) HSetNx(key string, hkey string, val string) (bool, error)
- func (r *Redis) KVals(key string) ([]string, error)
- func (r *Redis) Publish(channel string, msg string) error
- func (r *Redis) SAdd(key string, member string) (bool, error)
- func (r *Redis) SMembers(key string) ([]string, error)
- func (r *Redis) SRem(key string, member string) (int64, error)
- func (r *Redis) Set(key string, val string) (bool, error)
- func (r *Redis) SetAuthor(user string, pass string)
- func (r *Redis) SetOption(key string, val interface{})
- func (r *Redis) Subscribe(channel string)
- func (r *Redis) ZAdd(key string, score float32, val string) (bool, error)
- func (r *Redis) ZCount(key string, start float32, end float32) (int, error)
- func (r *Redis) ZRange(key string, start float32, end float32) ([]string, error)
- func (r *Redis) ZSize(key string) (int, error)
- type RedisClient
- func (rc *RedisClient) Delete(key string) (int64, error)
- func (rc *RedisClient) Dispose()
- func (rc *RedisClient) Exists(key string) (bool, error)
- func (rc *RedisClient) Get(key string) (string, error)
- func (rc *RedisClient) HDel(key string, hkey string) (bool, error)
- func (rc *RedisClient) HExists(key string, hkey string) (bool, error)
- func (rc *RedisClient) HGet(key string, hkey string) (string, error)
- func (rc *RedisClient) HGetAll(key string) (map[string]string, error)
- func (rc *RedisClient) HKeys(key string) ([]string, error)
- func (rc *RedisClient) HLen(key string) (int, error)
- func (rc *RedisClient) HMSet(key string, dict map[string]string) (bool, error)
- func (rc *RedisClient) HSet(key string, hkey string, val string) (bool, error)
- func (rc *RedisClient) HSetNx(key string, hkey string, val string) (bool, error)
- func (rc *RedisClient) KVals(key string) ([]string, error)
- func (rc *RedisClient) SAdd(key string, member string) (bool, error)
- func (rc *RedisClient) SMembers(key string) ([]string, error)
- func (rc *RedisClient) SRem(key string, member string) (int64, error)
- func (rc *RedisClient) Set(key string, val string) (bool, error)
- func (rc *RedisClient) ZAdd(key string, score float32, val string) (bool, error)
- func (rc *RedisClient) ZCount(key string, start float32, end float32) (int, error)
- func (rc *RedisClient) ZRange(key string, start float32, end float32) ([]string, error)
- func (rc *RedisClient) ZSize(key string) (int, error)
- type SqlBuilder
- func (s *SqlBuilder) And(field string, compare string, val string) *SqlBuilder
- func (s *SqlBuilder) AsyncExec() error
- func (s *SqlBuilder) Delete() *SqlBuilder
- func (s *SqlBuilder) Etc(etc string) *SqlBuilder
- func (s *SqlBuilder) Exec() (sql.Result, error)
- func (s *SqlBuilder) Insert(val map[string]string) *SqlBuilder
- func (s *SqlBuilder) Or(field string, compare string, val string) *SqlBuilder
- func (s *SqlBuilder) Query() (*sql.Rows, error)
- func (s *SqlBuilder) Select(sel string) *SqlBuilder
- func (s *SqlBuilder) Update(val map[string]string) *SqlBuilder
- func (s *SqlBuilder) Where(field string, compare string, val string) *SqlBuilder
Constants ¶
View Source
const ( OPT_CONNTIMEOUT string = "OPT_CONNTIMEOUT" OPT_RWTIMEOUT = "OPT_RWTIMEOUT" )
View Source
const ( OPT_DURABLE string = "OPT_DURABLE" OPT_AUTODELETE = "OPT_AUTODELETE" OPT_EXCLUSIVE = "OPT_EXCLUSIVE" OPT_NOWAIT = "OPT_NOWAIT" OPT_ARGS = "OPT_ARGS" OPT_EXCHANGE = "OPT_EXCHANGE" OPT_MANDATORY = "OPT_MANDATORY" OPT_IMMEDIATE = "OPT_IMMEDIATE" OPT_CONSUMER = "OPT_CONSUMER" OPT_AUTOACK = "OPT_AUTOACK" OPT_NOLOCAL = "OPT_NOLOCAL" )
View Source
const (
OPT_MAXASYNC string = "OPT_MAXASYNC"
)
View Source
const (
OPT_MAXPOOL string = "OPT_MAXPOOL"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompOptions ¶
type CompOptions struct {
// contains filtered or unexported fields
}
func NewCompOptions ¶
func NewCompOptions() *CompOptions
func (*CompOptions) Get ¶
func (c *CompOptions) Get(key string) interface{}
func (*CompOptions) GetArgs ¶
func (c *CompOptions) GetArgs(key string) map[string]interface{}
func (*CompOptions) GetBool ¶
func (c *CompOptions) GetBool(key string) bool
func (*CompOptions) GetInt ¶
func (c *CompOptions) GetInt(key string) int
func (*CompOptions) GetString ¶
func (c *CompOptions) GetString(key string) string
func (*CompOptions) Set ¶
func (c *CompOptions) Set(key string, val interface{})
type Etcd ¶
type Etcd struct {
// contains filtered or unexported fields
}
func (*Etcd) BindSubscriber ¶
func (e *Etcd) BindSubscriber(subscriber ISubscriber)
type IComponent ¶
type IComponent interface { Conn(string, string) error Close() SetAuthor(string, string) SetOption(string, interface{}) }
func NewComponent ¶
func NewComponent(url string) (IComponent, error)
type IPublisher ¶
type ISubscribable ¶
type ISubscribable interface { Subscribe(string) BindSubscriber(ISubscriber) }
the publish-subscrib equipment
type ISubscriber ¶
type MongoDB ¶
type MongoDB struct {
// contains filtered or unexported fields
}
func NewMongoDB ¶
func NewMongoDB() *MongoDB
func (*MongoDB) BindSubscriber ¶
func (m *MongoDB) BindSubscriber(subscriber ISubscriber)
func (*MongoDB) NewObjectId ¶
type MySql ¶
type MySql struct {
// contains filtered or unexported fields
}
func (*MySql) Table ¶
func (m *MySql) Table(tab string) *SqlBuilder
type RabbitMQ ¶
type RabbitMQ struct {
// contains filtered or unexported fields
}
func NewRabbitMQ ¶
func NewRabbitMQ() *RabbitMQ
func (*RabbitMQ) BindSubscriber ¶
func (r *RabbitMQ) BindSubscriber(subscriber ISubscriber)
type Redis ¶
func (*Redis) BindSubscriber ¶
func (r *Redis) BindSubscriber(subscriber ISubscriber)
func (*Redis) GetClient ¶
func (r *Redis) GetClient() *RedisClient
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func NewRedisClient ¶
func NewRedisClient(conn red.Conn) *RedisClient
func (*RedisClient) Dispose ¶
func (rc *RedisClient) Dispose()
type SqlBuilder ¶
type SqlBuilder struct {
// contains filtered or unexported fields
}
func (*SqlBuilder) And ¶
func (s *SqlBuilder) And(field string, compare string, val string) *SqlBuilder
func (*SqlBuilder) AsyncExec ¶
func (s *SqlBuilder) AsyncExec() error
func (*SqlBuilder) Delete ¶
func (s *SqlBuilder) Delete() *SqlBuilder
func (*SqlBuilder) Etc ¶
func (s *SqlBuilder) Etc(etc string) *SqlBuilder
func (*SqlBuilder) Insert ¶
func (s *SqlBuilder) Insert(val map[string]string) *SqlBuilder
func (*SqlBuilder) Or ¶
func (s *SqlBuilder) Or(field string, compare string, val string) *SqlBuilder
func (*SqlBuilder) Select ¶
func (s *SqlBuilder) Select(sel string) *SqlBuilder
func (*SqlBuilder) Update ¶
func (s *SqlBuilder) Update(val map[string]string) *SqlBuilder
func (*SqlBuilder) Where ¶
func (s *SqlBuilder) Where(field string, compare string, val string) *SqlBuilder
Source Files ¶
Click to show internal directories.
Click to hide internal directories.