logic

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package kafka provides ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateEsClassStaff

func UpdateEsClassStaff(Value []byte) error

Types

type BaseLogic

type BaseLogic struct {
	Ctx context.Context
}

BaseLogic

func (*BaseLogic) SetCtx

func (b *BaseLogic) SetCtx(ctx context.Context)

SetCtx set ctx

type ClassStaff

type ClassStaff struct {
	CompanyId     string      `json:"company_id"`
	ClassId       string      `json:"class_id"`
	StaffId       string      `json:"staff_id"`
	LearnTime     int         `json:"learn_time"`
	LastCourseId  string      `json:"last_course_id"`
	Procedure     int         `json:"procedure"`
	Status        int         `json:"status"`
	IsRemoved     bool        `json:"is_removed"`
	IsDeleted     bool        `json:"is_deleted"`
	SucceededAt   interface{} `json:"succeeded_at"`
	StartedAt     interface{} `json:"started_at"`
	CreatedAt     interface{} `json:"created_at"`
	UpdatedAt     interface{} `json:"updated_at"`
	SourceType    string      `json:"source_type"`
	TeamId        string      `json:"team_id"`
	AppSourceType string      `json:"app_source_type"`
	RoadmapId     string      `json:"roadmap_id"`
	ClassType     string      `json:"class_type"`
	CategoryId    string      `json:"category_id"`
	IsRequired    bool        `json:"is_required"`
}

type EsConf

type EsConf struct {
	IP       string
	Port     string
	Index    string
	Username string
	Passwd   string
	Es       *elasticsearch.Client
}

EsConf es配置

type EsLogic

type EsLogic struct {
	BaseLogic
	// contains filtered or unexported fields
}

EsLogic

func (EsLogic) CreateDoc

func (e EsLogic) CreateDoc(id string, body string) (*esapi.Response, error)

CreateDoc add doc with es client

func (EsLogic) DeleteDoc

func (e EsLogic) DeleteDoc(id string) (*esapi.Response, error)

DeleteDoc delete doc with es client

func (EsLogic) GetDoc

func (e EsLogic) GetDoc(id string) (*esapi.Response, error)

GetDoc get sigle doc from es

func (EsLogic) SQLDoc

func (e EsLogic) SQLDoc(body string) (*esapi.Response, error)

SQLDoc exec sql query

func (EsLogic) Search

func (e EsLogic) Search(body string, esIndex string) (*esapi.Response, error)

Search search docs

func (EsLogic) UpdateDoc

func (e EsLogic) UpdateDoc(id string, body string) (*esapi.Response, error)

UpdateDoc update doc with es client

type KafkaConf

type KafkaConf struct {
	IP    string
	Port  string
	Topic string
}

KafkaConf kafka 配置

type KafkaLogic

type KafkaLogic struct {
	BaseLogic
}

KafkaLogic

func (*KafkaLogic) Customer

func (k *KafkaLogic) Customer(conf KafkaConf, esConf EsConf) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL