Documentation
¶
Index ¶
- func ByteCountDecimal(b int64) string
- func Check(e error, panicCheck bool, logs string, trace TraceData)
- func GetConfig() (*config.ServerDetails, error)
- func GetMetricsDataJSON(config *config.ServerDetails, prettyPrint bool) ([]byte, error)
- func GetMetricsDataRaw(config *config.ServerDetails) ([]byte, error)
- func GetRestAPI(method string, auth bool, urlInput string, config *config.ServerDetails, ...) ([]byte, int, http.Header)
- func GetServersIdAndDefault() ([]string, string, error)
- func GetStatus(repo, pkgtype, uri, sha256, scanType string, config *config.ServerDetails) (string, bool)
- func StringToInt64(data string) (int64, error)
- type Data
- type Extensions
- type FileInfo
- type FileInfoChild
- type FileList
- type Files
- type IndexedRepo
- type LabelsStruct
- type Metrics
- type SupportedPackageType
- type SupportedTypes
- type TraceData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteCountDecimal ¶
func GetMetricsDataJSON ¶
func GetMetricsDataJSON(config *config.ServerDetails, prettyPrint bool) ([]byte, error)
func GetMetricsDataRaw ¶
func GetMetricsDataRaw(config *config.ServerDetails) ([]byte, error)
func GetRestAPI ¶
func GetRestAPI(method string, auth bool, urlInput string, config *config.ServerDetails, providedfilepath string, header map[string]string, retry int) ([]byte, int, http.Header)
GetRestAPI GET rest APIs response with error handling
func GetServersIdAndDefault ¶
Types ¶
type Data ¶
type Data struct {
Name string `json:"name"`
Help string `json:"help"`
Type string `json:"type"`
Metric []Metrics `json:"metrics"`
}
Data struct
type Extensions ¶
type FileInfo ¶
type FileInfo struct {
Size string `json:"size"`
MimeType string `json:"mimeType"`
Children []FileInfoChild `json:"children"`
}
type FileInfoChild ¶
type FileInfoChild struct {
Uri string `json:"uri"`
}
type IndexedRepo ¶
type IndexedRepo struct {
Name string `json:"name"`
PkgType string `json:"pkgType"`
Type string `json:"type"`
}
func CheckTypeAndRepoParams ¶
func CheckTypeAndRepoParams(config *config.ServerDetails) ([]IndexedRepo, error)
Test if remote repository exists and is a remote
type LabelsStruct ¶
type LabelsStruct struct {
Start string `json:"start"`
End string `json:"end"`
Status string `json:"status"`
Type string `json:"type"`
Max string `json:"max"`
Pool string `json:"pool"`
QueueName string `json:"queue_name"`
}
LabelsStruct struct
type Metrics ¶
type Metrics struct {
TimestampMs string `json:"timestamp_ms"`
Value string `json:"value"`
Labels LabelsStruct `json:"labels,omitempty"`
}
Metrics struct
type SupportedPackageType ¶
type SupportedPackageType struct {
Type string `json:"type"`
Extension []Extensions `json:"extensions"`
}
type SupportedTypes ¶
type SupportedTypes struct {
SupportedPackageTypes []SupportedPackageType `json:"supportedPackageTypes"`
}
func GetSupportedTypesJSON ¶
func GetSupportedTypesJSON() (SupportedTypes, error)
Click to show internal directories.
Click to hide internal directories.