Documentation ¶
Index ¶
- type APIRequest
- type APIResource
- func (a *APIResource) CreateAPIRspErrStrWithData(errcode int, strmsg, errdata interface{}) (string, error)
- func (a *APIResource) CreateAPIRspStr(errcode int, info interface{}) (string, error)
- func (a *APIResource) CreateBKAPIRspStr(errcode int, info interface{}) (string, error)
- func (a *APIResource) GetClientSSL() *tls.Config
- func (a *APIResource) GetDataCli(config map[string]string, dType string) error
- func (a *APIResource) InitAction()
- func (a *APIResource) InitWaction()
- func (a *APIResource) IsClientSSL() bool
- func (a *APIResource) ParseConf(data []byte) (map[string]string, error)
- func (a *APIResource) ParseConfig() (map[string]string, error)
- func (a *APIResource) PreProcess(data []byte) (string, error)
- func (a *APIResource) RunAutoAction(config map[string]string) error
- func (a *APIResource) SetConfig(conf *config.CCAPIConfig)
- type APIRsp
- type AddrSrv
- type BKAPIRsp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIRequest ¶
type APIResource ¶
type APIResource struct { ConfigData []byte Config string URL string IsCliSSL bool CliTLS *tls.Config Actions []*httpserver.Action GlobalFilter func(req *restful.Request, resp *restful.Response, fchain *restful.FilterChain) Wactions []*webserver.Action MetaCli storage.DI InstCli storage.DI CacheCli storage.DI Error errors.CCErrorIf HostCtrl func() string ObjCtrl func() string ProcCtrl func() string EventCtrl func() string AuditCtrl func() string HostAPI func() string TopoAPI func() string ProcAPI func() string EventAPI func() string APIAddr func() string AddrSrv AddrSrv Lang language.CCLanguageIf }
func GetAPIResource ¶
func GetAPIResource() *APIResource
func NewAPIResource ¶
func NewAPIResource() *APIResource
func (*APIResource) CreateAPIRspErrStrWithData ¶
func (a *APIResource) CreateAPIRspErrStrWithData(errcode int, strmsg, errdata interface{}) (string, error)
CreateAPIRspErrStrWithData create api rsp str return errorno, errormsg, errdata
func (*APIResource) CreateAPIRspStr ¶
func (a *APIResource) CreateAPIRspStr(errcode int, info interface{}) (string, error)
CreateAPIRspStr create api rsp str
func (*APIResource) CreateBKAPIRspStr ¶
func (a *APIResource) CreateBKAPIRspStr(errcode int, info interface{}) (string, error)
CreateBKAPIRspStr create blueking api rsp str
func (*APIResource) GetClientSSL ¶
func (a *APIResource) GetClientSSL() *tls.Config
func (*APIResource) GetDataCli ¶
func (a *APIResource) GetDataCli(config map[string]string, dType string) error
GetDataCli get data cli
func (*APIResource) InitAction ¶
func (a *APIResource) InitAction()
func (*APIResource) InitWaction ¶
func (a *APIResource) InitWaction()
func (*APIResource) IsClientSSL ¶
func (a *APIResource) IsClientSSL() bool
func (*APIResource) ParseConf ¶
func (a *APIResource) ParseConf(data []byte) (map[string]string, error)
func (*APIResource) ParseConfig ¶
func (a *APIResource) ParseConfig() (map[string]string, error)
func (*APIResource) PreProcess ¶
func (a *APIResource) PreProcess(data []byte) (string, error)
func (*APIResource) RunAutoAction ¶
func (a *APIResource) RunAutoAction(config map[string]string) error
RunAutoAction call the callback function when the server starts
func (*APIResource) SetConfig ¶
func (a *APIResource) SetConfig(conf *config.CCAPIConfig)
Click to show internal directories.
Click to hide internal directories.