Documentation ¶
Index ¶
- func GetTestConnection() *gorm.DB
- func GetTestConnectionSQL() *sql.DB
- func Register(model interface{}, serverURL string, index string) (*elastic.Client, error)
- type BulkConfigElastic
- type ConncetionRepo
- type Connection
- type ElasticCore
- func (elasticCore *ElasticCore) AddDocument(ID string, bodyJSON interface{}) error
- func (elasticCore *ElasticCore) DeleteDocument(ID string) error
- func (elasticCore *ElasticCore) DeleteIndex() error
- func (elasticCore *ElasticCore) EditDocument(ID string, bodyJSON interface{}) error
- func (elasticCore *ElasticCore) MultipleinsertDocumentByStruct(IDParams string, str interface{}) error
- type ElasticCoreInter
- type RAbbitMQCoreInter
- type RabbitMQConfig
- type RabbitMQCore
- type RedisCore
- func (red *RedisCore) CreateOrUpdateDocument(name string, id string, params ...interface{}) error
- func (red *RedisCore) DeleteDocument(name string, id string) error
- func (red *RedisCore) GetAllDocument(name string, id string) (map[string]string, error)
- func (red *RedisCore) GetDocument(name string, id string, field string) (string, error)
- type RedisCoreInter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTestConnection ¶
GetTestConnection for get face connection
func GetTestConnectionSQL ¶
GetTestConnectionSQL funtion sql test
Types ¶
type BulkConfigElastic ¶
BulkConfigElastic for configuration elastic
type ConncetionRepo ¶
ConncetionRepo for interfacing
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection struct
func NewServiceConnection ¶
func NewServiceConnection(driver, host string, port int, user, password, dbname string) *Connection
NewServiceConnection return a struct connection
type ElasticCore ¶
ElasticCore for type elastic
func NewServiceElasticCore ¶
func NewServiceElasticCore(model interface{}, serverURL string) (*ElasticCore, error)
NewServiceElasticCore for new service elastic core
func (*ElasticCore) AddDocument ¶
func (elasticCore *ElasticCore) AddDocument(ID string, bodyJSON interface{}) error
AddDocument for add document and indexing elastic
func (*ElasticCore) DeleteDocument ¶
func (elasticCore *ElasticCore) DeleteDocument(ID string) error
DeleteDocument for delete th elastic search
func (*ElasticCore) DeleteIndex ¶
func (elasticCore *ElasticCore) DeleteIndex() error
DeleteIndex for delete th elastic search
func (*ElasticCore) EditDocument ¶
func (elasticCore *ElasticCore) EditDocument(ID string, bodyJSON interface{}) error
EditDocument for add document and indexing elastic
func (*ElasticCore) MultipleinsertDocumentByStruct ¶
func (elasticCore *ElasticCore) MultipleinsertDocumentByStruct(IDParams string, str interface{}) error
MultipleinsertDocumentByStruct for struct inheretence
type ElasticCoreInter ¶
type ElasticCoreInter interface{}
ElasticCoreInter for interfacing function elastic
type RAbbitMQCoreInter ¶
type RAbbitMQCoreInter interface{}
RAbbitMQCoreInter interfacing function rabbit MQ struct
type RabbitMQConfig ¶
type RabbitMQConfig struct { Host string `validate:"required"` Hostname string `validate:"required"` Port string `validate:"required"` User string `validate:"required"` Password string `validate:"required"` WorkerName string `validate:"required"` }
RabbitMQConfig struct of rabbit mq
type RabbitMQCore ¶
type RabbitMQCore struct { Config *RabbitMQConfig Conn *amqp.Connection Channel *amqp.Channel Queue amqp.Queue }
RabbitMQCore struct of rabbit MQ
func NewServiceRabbitMQ ¶
func NewServiceRabbitMQ(config *RabbitMQConfig) (*RabbitMQCore, error)
NewServiceRabbitMQ for new service of rabbitMQ
func (*RabbitMQCore) RegisterNewTask ¶
func (rb *RabbitMQCore) RegisterNewTask(body string) error
RegisterNewTask for register new task
func (*RabbitMQCore) RegisterWorker ¶
func (rb *RabbitMQCore) RegisterWorker() (<-chan amqp.Delivery, error)
RegisterWorker function for declare queou
type RedisCore ¶
RedisCore struct for redis
func NewServiceRedisCore ¶
NewServiceRedisCore for New RedisCore instance
func (*RedisCore) CreateOrUpdateDocument ¶
CreateOrUpdateDocument func for insert or update redis
func (*RedisCore) DeleteDocument ¶
DeleteDocument func for delete redis
func (*RedisCore) GetAllDocument ¶
GetAllDocument for get all document return a new map
type RedisCoreInter ¶
type RedisCoreInter interface { CreateOrUpdateDocument(name string, id string, params ...interface{}) error DeleteDocument(name string, id string) error GetDocument(name string, id string, field string) (string, error) GetAllDocument(name string, id string) (map[string]string, error) }
RedisCoreInter for interfacing RedisCore