Documentation
¶
Index ¶
- Constants
- Variables
- func DecryptRsa(inputString string) string
- func GetCoreToken() string
- func GetWorkspaceName() (name string)
- func InitConfig(cfg string) error
- func InitCoreToken()
- func RSAEncryptByPrivate(orgidata []byte, privatekey string) ([]byte, error)
- type AxisModel
- type CacheConfig
- type ChartConfigObj
- type ChartQueryConfigObj
- type ChartQueryParam
- type CoreJwtToken
- type DataSerialModel
- type DataSourceConfig
- type EChartOption
- type ExportResultObj
- type ExportResultParamObj
- type FuncXObj
- type FuncXSortList
- type GlobalConfig
- type HttpConfig
- type LogConfig
- type MetricOptionModel
- type MonitorChartResponse
- type MonitorConfig
- type MonitorMetricResponse
- type MonitorOptionResponse
- type MysqlConfig
- type OptionModel
- type PluginRequest
- type PluginRequestInput
- type PluginResponse
- type PluginResponseOutput
- type PluginResponseOutputs
- type RCalcParam
- type RCalcResult
- type RChartTable
- type RChartTableInput
- type RImagesTable
- type RMonitorTable
- type RRequestExcel
- type RRequestMonitor
- type RRequestParam
- type RWorkTable
- type RespJson
- type RunScriptResult
- type SaveWorkParam
- type TimeSerialModel
- type YXDataObj
- type YXDataTable
- type YaxisModel
Constants ¶
View Source
const ( SystemRole = `SUB_SYSTEM` PlatformUser = `SYS_PLATFORM` )
View Source
const (
DatetimeFormat = `2006-01-02 15:04:05`
)
Variables ¶
View Source
var ( CoreJwtKey string SubSystemCode string SubSystemKey string )
View Source
var WorkspaceDir string
Functions ¶
func DecryptRsa ¶
func GetCoreToken ¶
func GetCoreToken() string
func GetWorkspaceName ¶
func GetWorkspaceName() (name string)
func InitConfig ¶
func InitCoreToken ¶
func InitCoreToken()
Types ¶
type CacheConfig ¶
type ChartConfigObj ¶
type ChartQueryConfigObj ¶
type ChartQueryParam ¶
type ChartQueryParam struct {
ChartId int `json:"chart_id"`
Title string `json:"title"`
Unit string `json:"unit"`
Start int64 `json:"start"`
End int64 `json:"end"`
TimeSecond int64 `json:"time_second"`
Aggregate string `json:"aggregate"`
AggStep int64 `json:"agg_step"`
Step int `json:"step"`
Data []*ChartQueryConfigObj `json:"data"`
}
type CoreJwtToken ¶
type DataSerialModel ¶
type DataSourceConfig ¶
type DataSourceConfig struct {
Monitor MonitorConfig `json:"monitor"`
}
type EChartOption ¶
type EChartOption struct {
Id int `json:"id"`
Title string `json:"title"`
Legend []string `json:"legend"`
Xaxis AxisModel `json:"xaxis"`
Yaxis YaxisModel `json:"yaxis"`
Series []*TimeSerialModel `json:"series"`
DataSeries []*DataSerialModel `json:"data_series"`
IsDataSeries bool `json:"is_data_series"`
}
type ExportResultObj ¶
type ExportResultObj struct {
RWorkName string `json:"r_work_name"`
Endpoint string `json:"endpoint"`
XParams []*ExportResultParamObj `json:"x_params"`
YFunc ExportResultParamObj `json:"y_func"`
FuncExpr string `json:"func_expr"`
UpdateTime string `json:"update_time"`
}
type ExportResultParamObj ¶
type FuncXSortList ¶
type FuncXSortList []*FuncXObj
func (FuncXSortList) Len ¶
func (s FuncXSortList) Len() int
func (FuncXSortList) Less ¶
func (s FuncXSortList) Less(i, j int) bool
func (FuncXSortList) Swap ¶
func (s FuncXSortList) Swap(i, j int)
type GlobalConfig ¶
type GlobalConfig struct {
Http HttpConfig `json:"http"`
Log LogConfig `json:"log"`
Mysql MysqlConfig `json:"mysql"`
Cache CacheConfig `json:"cache"`
DataSource DataSourceConfig `json:"data_source"`
}
func Config ¶
func Config() *GlobalConfig
type HttpConfig ¶
type MetricOptionModel ¶
type MonitorChartResponse ¶
type MonitorChartResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Data EChartOption `json:"data"`
}
type MonitorConfig ¶
type MonitorMetricResponse ¶
type MonitorMetricResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Data []MetricOptionModel `json:"data"`
}
type MonitorOptionResponse ¶
type MonitorOptionResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Data []OptionModel `json:"data"`
}
type MysqlConfig ¶
type OptionModel ¶
type PluginRequest ¶
type PluginRequest struct {
RequestId string `json:"requestId"`
Inputs []*PluginRequestInput `json:"inputs"`
}
type PluginRequestInput ¶
type PluginResponse ¶
type PluginResponse struct {
ResultCode string `json:"resultCode"`
ResultMessage string `json:"resultMessage"`
Results PluginResponseOutputs `json:"results"`
}
type PluginResponseOutput ¶
type PluginResponseOutput struct {
CallbackParameter string `json:"callbackParameter"`
Guid string `json:"guid"`
ErrorCode string `json:"errorCode"`
ErrorMessage string `json:"errorMessage"`
FuncOld string `json:"funcOld"`
FuncNew string `json:"funcNew"`
LevelOld string `json:"levelOld"`
LevelNew string `json:"levelNew"`
TemplateName string `json:"templateName"`
}
type PluginResponseOutputs ¶
type PluginResponseOutputs struct {
Outputs []*PluginResponseOutput `json:"outputs"`
}
type RCalcParam ¶
type RCalcResult ¶
type RCalcResult struct {
Guid string `json:"guid"`
Chart EChartOption `json:"chart"`
Table YXDataTable `json:"table"`
}
type RChartTable ¶
type RChartTableInput ¶
type RImagesTable ¶
type RMonitorTable ¶
type RRequestExcel ¶
type RRequestMonitor ¶
type RRequestMonitor struct {
Config []ChartConfigObj
LegendY string `json:"legend_y"`
LegendX []string `json:"legend_x"`
RemoveList []float64 `json:"remove_list"`
}
type RRequestParam ¶
type RRequestParam struct {
Guid string `json:"guid"`
Monitor RRequestMonitor `json:"monitor"`
XData [][]float64 `json:"x_data"`
YData []float64 `json:"y_data"`
FuncX []*FuncXObj `json:"func_x"`
FuncB float64 `json:"func_b"`
Excel RRequestExcel `json:"excel"`
MinLevel int `json:"min_level"`
}
type RWorkTable ¶
type RWorkTable struct {
Guid string `json:"guid"`
Name string `json:"name"`
Workspace string `json:"workspace"`
Output string `json:"output"`
Expr string `json:"expr"`
FuncX string `json:"func_x"`
FuncXName string `json:"func_x_name"`
FuncB string `json:"func_b"`
Level int `json:"level"`
LegendX string `json:"legend_x"`
LegendY string `json:"legend_y"`
UpdateAt time.Time `json:"update_at"`
}
type RunScriptResult ¶
type RunScriptResult struct {
Guid string `json:"guid"`
Workspace string `json:"workspace"`
Level int `json:"level"`
Output string `json:"output"`
Images []string `json:"images"`
FuncExpr string `json:"func_expr"`
FuncX []*FuncXObj `json:"func_x"`
FuncB float64 `json:"func_b"`
Chart EChartOption `json:"chart"`
LegendX []string `json:"legend_x"`
LegendY string `json:"legend_y"`
}
type SaveWorkParam ¶
type SaveWorkParam struct {
Guid string `json:"guid"`
Name string `json:"name"`
Workspace string `json:"workspace"`
Level int `json:"level"`
Output string `json:"output"`
Images []string `json:"images"`
FuncExpr string `json:"func_expr"`
FuncX []*FuncXObj `json:"func_x"`
FuncB float64 `json:"func_b"`
YReal []float64 `json:"y_real"`
YFunc []float64 `json:"y_func"`
Monitor RRequestMonitor `json:"monitor"`
}
type TimeSerialModel ¶
type YXDataTable ¶
type YaxisModel ¶
type YaxisModel struct {
Unit string `json:"unit"`
}
Click to show internal directories.
Click to hide internal directories.