Documentation ¶
Index ¶
- Constants
- func CheckUnmarshalResult(err error) bool
- func GetItemsSortedByNum(data interface{}) []string
- func GetMasterHostName(hosts ReportHosts) string
- func GetUniques(array []string) []string
- func InList(items []string, item string) bool
- func InListPartial(items []string, item string) bool
- func LimitList(array []string) []string
- func LoadRawJsonReport(filePath string) []byte
- func PrintResultConclusions(result ReportResult)
- func PrintResultRecommendations(result ReportResult)
- func ResultInList(items []ReportResultItem, id string) bool
- func SaveJsonReportResults(data map[string]interface{}, reportResult ReportResult)
- func SaveReportResult(data map[string]interface{}, result ReportResult) map[string]interface{}
- func SortItemsByFloat64(data interface{}, field string, reverse bool) []string
- func SortItemsByInt(data interface{}, field string, reverse bool) []string
- func StringInArray(val string, array []string) (exists bool, index int)
- type ReportHost
- type ReportHosts
- type ReportLastCheck
- type ReportLastNodes
- type ReportResult
- type ReportResultItem
Constants ¶
View Source
const MSG_ALL_GOOD_CONCLUSION string = "Hooray, all good. Keep this up!"
View Source
const MSG_ETC_ITEM string = " - etc."
View Source
const MSG_NO_RECOMMENDATION string = "No recommendations."
View Source
const RECOMMENDATION_ITEMS_LIMIT int = 5
Variables ¶
This section is empty.
Functions ¶
func CheckUnmarshalResult ¶
func GetItemsSortedByNum ¶
func GetItemsSortedByNum(data interface{}) []string
Get map keys sorted by field num inside struct
func GetMasterHostName ¶
func GetMasterHostName(hosts ReportHosts) string
func GetUniques ¶
func InListPartial ¶
func LoadRawJsonReport ¶
func PrintResultConclusions ¶
func PrintResultConclusions(result ReportResult)
func PrintResultRecommendations ¶
func PrintResultRecommendations(result ReportResult)
func ResultInList ¶
func ResultInList(items []ReportResultItem, id string) bool
func SaveJsonReportResults ¶
func SaveJsonReportResults(data map[string]interface{}, reportResult ReportResult)
func SaveReportResult ¶
func SaveReportResult(data map[string]interface{}, result ReportResult) map[string]interface{}
func SortItemsByFloat64 ¶
Get map keys sorted by defined float64 field inside struct
func SortItemsByInt ¶
Get map keys sorted by defined int field inside struct
Types ¶
type ReportHost ¶
type ReportHosts ¶
type ReportHosts map[string]ReportHost
type ReportLastCheck ¶
type ReportLastNodes ¶
type ReportLastNodes struct { Hosts ReportHosts `json:"hosts"` LastCheck ReportLastCheck `json:"last_check"` }
type ReportResult ¶
type ReportResult struct { P1 bool P2 bool P3 bool Conclusions []ReportResultItem Recommendations []ReportResultItem }
func (*ReportResult) AppendConclusion ¶
func (r *ReportResult) AppendConclusion(id string, conclusion string, a ...interface{})
func (*ReportResult) AppendRecommendation ¶
func (r *ReportResult) AppendRecommendation(id string, reccomendation string, a ...interface{})
type ReportResultItem ¶
func GetResultItem ¶
func GetResultItem(items []ReportResultItem, id string) (*ReportResultItem, error)
Click to show internal directories.
Click to hide internal directories.