service

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service struct of service.

func New

func New(c *conf.Config) (s *Service)

New create service instance and return.

func (*Service) AddApp

func (s *Service) AddApp(ctx context.Context, a *model.MngApp) (id int64, err error)

AddApp .

func (*Service) AddAsset

func (s *Service) AddAsset(ctx context.Context, a *model.MngAsset) (id int64, err error)

AddAsset .

func (*Service) AddBusiness

func (s *Service) AddBusiness(ctx context.Context, b *model.MngBusiness) (id int64, err error)

AddBusiness .

func (*Service) AppInfo

func (s *Service) AppInfo(ctx context.Context, id int64) (info *model.MngApp, err error)

AppInfo .

func (*Service) AppList

func (s *Service) AppList(ctx context.Context, business string) (list []*model.MngApp, err error)

AppList .

func (*Service) ArchiveCheck

func (s *Service) ArchiveCheck(c context.Context, sp *model.ArchiveCheckParams) (res *model.SearchResult, err error)

ArchiveCheck gets archive check.

func (*Service) ArchiveCommerce

func (s *Service) ArchiveCommerce(c context.Context, sp *model.ArchiveCommerce) (res *model.SearchResult, err error)

ArchiveCommerce .

func (*Service) AssetAll

func (s *Service) AssetAll(ctx context.Context) (list []*model.MngAsset, err error)

AssetAll .

func (*Service) AssetDBAdd

func (s *Service) AssetDBAdd(c context.Context, name, description, host, port, user, password string) (id int64, err error)

AssetDBAdd .

func (*Service) AssetDBConnect

func (s *Service) AssetDBConnect(c context.Context, host, port, user, password string) (dbNames []string, err error)

AssetDBConnect .

func (*Service) AssetDBTables

func (s *Service) AssetDBTables(c context.Context) (list []*model.GFAsset, err error)

AssetDBTables .

func (*Service) AssetInfo

func (s *Service) AssetInfo(ctx context.Context, id int64) (info *model.MngAsset, err error)

AssetInfo .

func (*Service) AssetInfoV2

func (s *Service) AssetInfoV2(c context.Context, name string) (info *model.GFAsset, err error)

AssetInfoV2 .

func (*Service) AssetList

func (s *Service) AssetList(ctx context.Context, typ int, name string, pn, ps int) (list []*model.MngAsset, total int64, err error)

AssetList .

func (*Service) AssetShowTables

func (s *Service) AssetShowTables(c context.Context, dbName string) (tables []string, err error)

AssetShowTables .

func (*Service) AssetTableAdd

func (s *Service) AssetTableAdd(c context.Context, db, regex, fields, description string) (id int64, err error)

AssetTableAdd .

func (*Service) AssetTableFields

func (s *Service) AssetTableFields(c context.Context, dbName, regex string) (fs []*model.TableField, count int, err error)

AssetTableFields .

func (*Service) BusinessAdd

func (s *Service) BusinessAdd(c context.Context, pid int64, name, description string) (id int64, err error)

BusinessAdd .

func (*Service) BusinessAll

func (s *Service) BusinessAll(ctx context.Context) (list []*model.MngBusiness, err error)

BusinessAll .

func (*Service) BusinessAllV2

func (s *Service) BusinessAllV2(c context.Context) (list []*model.GFBusiness, err error)

BusinessAllV2 .

func (*Service) BusinessInfo

func (s *Service) BusinessInfo(ctx context.Context, id int64) (info *model.MngBusiness, err error)

BusinessInfo .

func (*Service) BusinessInfoV2

func (s *Service) BusinessInfoV2(c context.Context, name string) (info *model.GFBusiness, err error)

BusinessInfoV2 .

func (*Service) BusinessList

func (s *Service) BusinessList(ctx context.Context, name string, pn, ps int) (list []*model.MngBusiness, total int64, err error)

BusinessList .

func (*Service) BusinessUpdate

func (s *Service) BusinessUpdate(c context.Context, name, filed, value string) (id int64, err error)

BusinessUpdate .

func (*Service) Check

func (s *Service) Check(appID string, businessID int) (business *model.Business, ok bool)

Check .

func (*Service) CheckQueryConf

func (s *Service) CheckQueryConf(c context.Context, sp *model.QueryParams) (err error)

CheckQueryConf check query conf

func (*Service) ClusterOwners

func (s *Service) ClusterOwners() map[string]string

ClusterOwners .

func (*Service) IP

获取IP地址

func (*Service) Index

func (s *Service) Index(c context.Context, esName string, bulkData []dao.BulkItem) (err error)

Index .

func (*Service) LogAudit

func (s *Service) LogAudit(c context.Context, params map[string][]string, sp *model.LogParams, business *model.Business) (res *model.SearchResult, err error)

LogAudit .

func (*Service) LogAuditDelete

func (s *Service) LogAuditDelete(c context.Context, params map[string][]string, sp *model.LogParams, business *model.Business) (res *model.SearchResult, err error)

LogAuditDelete .

func (*Service) LogAuditGroupBy

func (s *Service) LogAuditGroupBy(c context.Context, params map[string][]string, sp *model.LogParams, business *model.Business) (res *model.SearchResult, err error)

LogAuditGroupBy .

func (*Service) LogCount

func (s *Service) LogCount(c context.Context, name string, business int, uid interface{})

func (*Service) LogUserAction

func (s *Service) LogUserAction(c context.Context, params map[string][]string, sp *model.LogParams, business *model.Business) (res *model.SearchResult, err error)

LogUserAction .

func (*Service) LogUserActionDelete

func (s *Service) LogUserActionDelete(c context.Context, params map[string][]string, sp *model.LogParams, business *model.Business) (res *model.SearchResult, err error)

LogUserActionDelete .

func (*Service) MapUpdate

func (s *Service) MapUpdate(c context.Context, p []dao.BulkMapItem) (err error)

MapUpdate map update.

func (*Service) MngCount

func (s *Service) MngCount(ctx context.Context, c *model.MngCount) (list []*model.MngCountRes, err error)

MngCount .

func (*Service) MngCountList

func (s *Service) MngCountList(ctx context.Context) (list []*model.MngCount, err error)

MngCountList .

func (*Service) MngPercent

func (s *Service) MngPercent(ctx context.Context, c *model.MngCount) (list []*model.MngPercentRes, err error)

MngCount .

func (*Service) Ping

func (s *Service) Ping(c context.Context) error

Ping .

func (*Service) QueryBasic

func (s *Service) QueryBasic(c context.Context, sp *model.QueryParams) (res *model.QueryResult, debug *model.QueryDebugResult, err error)

QueryBasic .

func (*Service) QueryExtra

func (s *Service) QueryExtra(c context.Context, sp *model.QueryParams) (res *model.QueryResult, debug *model.QueryDebugResult, err error)

QueryExtra .

func (*Service) TaskQa

func (s *Service) TaskQa(c context.Context, sp *model.TaskQa) (res *model.SearchResult, err error)

TaskQa .

func (*Service) Update

func (s *Service) Update(c context.Context, esName string, bulkData []dao.BulkItem) (err error)

Update update some indices.

func (*Service) UpdateApp

func (s *Service) UpdateApp(ctx context.Context, a *model.MngApp) (err error)

UpdateApp .

func (*Service) UpdateAsset

func (s *Service) UpdateAsset(ctx context.Context, a *model.MngAsset) (err error)

UpdateAsset .

func (*Service) UpdateAssetTable

func (s *Service) UpdateAssetTable(c context.Context, name, fields string) (id int64, err error)

UpdateAssetTable .

func (*Service) UpdateBusiness

func (s *Service) UpdateBusiness(ctx context.Context, b *model.MngBusiness) (err error)

UpdateBusiness .

func (*Service) UpdateBusinessApp

func (s *Service) UpdateBusinessApp(ctx context.Context, business, app, incrWay string, isJob, incrOpen bool) (err error)

UpdateBusinessApp .

func (*Service) Upsert

func (s *Service) Upsert(c context.Context, up *model.UpsertParams, dataBody map[string][]model.MapData) (err error)

Upsert upsert docs.

func (*Service) Video

func (s *Service) Video(c context.Context, sp *model.VideoParams) (res *model.SearchResult, err error)

Video gets video relation.

Jump to

Keyboard shortcuts

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