Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertToMap(obj interface{}) (map[string]interface{}, error)
- func GetInt64Len(a int64) int
- func GetPercent(a, b float64) int
- func ResetNumberBase(a, b float64) (float64, float64)
- func SortByDistribution(data []interface{}, sortColumn string, order OrderEnum)
- func SortByNode(data []interface{}, sortColumn string, order OrderEnum)
- func SortByString(data []interface{}, sortColumn string, order OrderEnum)
- func SurviveTime(startTime string) (string, error)
- func Transfer(a, b interface{}) error
- type ChartDataItem
- type OrderEnum
- type SteveStatus
- type SteveStatusEnum
- type UsageStatusEnum
- type WorkflowEnum
Constants ¶
View Source
const ( Default = "Default" NodeStatusReady int = iota NodeStatusError NodeStatusFreeze )
Variables ¶
View Source
var ( ResourceNormal UsageStatusEnum = "normal" ResourceSuccess UsageStatusEnum = "Success" ResourceError UsageStatusEnum = "error" ResourceWarning UsageStatusEnum = "warning" ResourceDanger UsageStatusEnum = "danger" Asc OrderEnum = "ascend" Desc OrderEnum = "descend" Deployments WorkflowEnum = "Deployments" StatefulSets WorkflowEnum = "StatefulSets" DaemonSets WorkflowEnum = "DaemonSets" Jobs WorkflowEnum = "Jobs" CronJobs WorkflowEnum = "CronJobs" // cmp bashboard table CMPDashboardChangePageNoOperationKey cptype.OperationKey = "changePageNo" CMPDashboardChangePageSizeOperationKey cptype.OperationKey = "changePageSize" CMPDashboardSortByColumnOperationKey cptype.OperationKey = "changeSort" // cmp bashboard clusterFilter CMPDashboardFilterOperationKey cptype.OperationKey = "filter" // Freeze Button CMPDashboardDeleteNode cptype.OperationKey = "delete" CMPDashboardUnfreezeNode cptype.OperationKey = "unfreeze" CMPDashboardFreezeNode cptype.OperationKey = "freeze" )
View Source
var ( PodNotFoundErr = errors.New("pod not found") OperationsEmptyErr = errors.New("operation is empty") ResourceEmptyErr = errors.New("node resource is empty") ProtocolComponentEmptyErr = errors.New("component is nil or property empty") BundleEmptyErr = errors.New("bundle is empty") NothingToBeDoneErr = errors.New("nothing to be done") TypeNotAvailableErr = errors.New("type not available") ResourceNotFoundErr = errors.New("resource type not available") //util error PtrRequiredErr = errors.New("ptr is required") )
Functions ¶
func ConvertToMap ¶
ConvertToMap transfer any struct to map
func GetInt64Len ¶
func GetPercent ¶
func SortByDistribution ¶
SortByDistribution sort by percent
func SortByNode ¶
SortByNode sort by node struct
func SortByString ¶
SortByString sort by string value
func SurviveTime ¶
Types ¶
type ChartDataItem ¶
type SteveStatus ¶
type SteveStatus struct { Value SteveStatusEnum `json:"value,omitempty"` RenderType string `json:"renderType"` Status SteveStatusEnum `json:"status"` Tip string `json:"tip"` }
type SteveStatusEnum ¶
type SteveStatusEnum string
type UsageStatusEnum ¶
type UsageStatusEnum string
type WorkflowEnum ¶
type WorkflowEnum string
Click to show internal directories.
Click to hide internal directories.