business

package
v0.0.0-...-cb472e6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(event reflector.Interface, rds *redis.Client) error

Attention, it can only be called for once.

Types

type BizBaseInfo

type BizBaseInfo struct {
	BusinessID   int64  `json:"bk_biz_id" bson:"bk_biz_id"`
	BusinessName string `json:"bk_biz_name" bson:"bk_biz_name"`
}

type Client

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

func NewClient

func NewClient(rds *redis.Client) *Client

func (*Client) GetBizBaseList

func (c *Client) GetBizBaseList() ([]BizBaseInfo, error)

func (*Client) GetBusiness

func (c *Client) GetBusiness(bizID int64) (string, error)

get a business's all info.

func (*Client) GetCustomLevelBaseList

func (c *Client) GetCustomLevelBaseList(objectID string, bizID int64) ([]CustomInstanceBase, error)

func (*Client) GetCustomLevelDetail

func (c *Client) GetCustomLevelDetail(objID string, instID int64) (string, error)

func (*Client) GetModuleBaseList

func (c *Client) GetModuleBaseList(bizID int64) ([]ModuleBaseInfo, error)

func (*Client) GetModuleDetail

func (c *Client) GetModuleDetail(moduleID int64) (string, error)

func (*Client) GetSet

func (c *Client) GetSet(setID int64) (string, error)

func (*Client) GetSetBaseList

func (c *Client) GetSetBaseList(bizID int64) ([]SetBaseInfo, error)

func (*Client) GetTopology

func (c *Client) GetTopology() ([]string, error)

func (*Client) ListBusiness

func (c *Client) ListBusiness(ctx context.Context, opt *metadata.ListWithIDOption) ([]string, error)

func (*Client) ListCustomLevelDetail

func (c *Client) ListCustomLevelDetail(objID string, instIDs []int64) ([]string, error)

func (*Client) ListModuleDetails

func (c *Client) ListModuleDetails(moduleIDs []int64) ([]string, error)

func (*Client) ListModules

func (c *Client) ListModules(ctx context.Context, opt *metadata.ListWithIDOption) ([]string, error)

func (*Client) ListSetDetails

func (c *Client) ListSetDetails(setIDs []int64) ([]string, error)

func (*Client) ListSets

func (c *Client) ListSets(ctx context.Context, opt *metadata.ListWithIDOption) ([]string, error)

type CustomInstanceBase

type CustomInstanceBase struct {
	ObjectID     string `json:"bk_obj_id" bson:"bk_obj_id"`
	InstanceID   int64  `json:"bk_inst_id" bson:"bk_inst_id"`
	InstanceName string `json:"bk_inst_name" bson:"bk_inst_name"`
	ParentID     int64  `json:"bk_parent_id" bson:"bk_parent_id"`
}

type MainlineTopoAssociation

type MainlineTopoAssociation struct {
	AssociateTo string `json:"bk_asst_obj_id" bson:"bk_asst_obj_id"`
	ObjectID    string `json:"bk_obj_id" bson:"bk_obj_id"`
}

type ModuleBaseInfo

type ModuleBaseInfo struct {
	ModuleID   int64  `json:"bk_module_id" bson:"bk_module_id"`
	ModuleName string `json:"bk_module_name" bson:"bk_module_name"`
	SetID      int64  `json:"bk_set_id" bson:"bk_set_id"`
}

type SetBaseInfo

type SetBaseInfo struct {
	SetID    int64  `json:"bk_set_id" bson:"bk_set_id"`
	SetName  string `json:"bk_set_name" bson:"bk_set_name"`
	ParentID int64  `json:"bk_parent_id" bson:"bk_parent_id"`
}

Jump to

Keyboard shortcuts

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