types

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeconfigAccessPersonal = "personal"
	KubeconfigAccessManagers = "managers"
	KubeconfigAccessAll      = "all"
)
View Source
const (
	EnableVMPublicIP  = "enable"
	DisableVMPublicIP = "disable"
)
View Source
const (
	AlertingIntegrationTypeTeams = "microsoftteams"
)
View Source
const ExpectedDateFormat = "dd.mm.yyyy"

Variables

View Source
var (
	UnlockedMode = "unlock"
	LockedMode   = "lock"
)
View Source
var AlertingIntegrationTypes = gmap.New(
	map[string]interface{}{
		"opsgenie":                   models.AlertingIntegrationType(100),
		"pagerduty":                  models.AlertingIntegrationType(200),
		"splunk":                     models.AlertingIntegrationType(300),
		AlertingIntegrationTypeTeams: models.AlertingIntegrationType(400),
	},
)
View Source
var AlertingReminders = gmap.New(
	map[string]interface{}{
		"halfhour": models.AlertingReminder(100),
		"hourly":   models.AlertingReminder(200),
		"daily":    models.AlertingReminder(300),
		"none":     models.AlertingReminder(-1),
	},
)
View Source
var KubeconfigAccessScopes = gmap.New(
	map[string]interface{}{
		KubeconfigAccessPersonal: struct{}{},
		KubeconfigAccessManagers: struct{}{},
		KubeconfigAccessAll:      struct{}{},
	},
)
View Source
var KubeconfigRoles = gmap.New(
	map[string]interface{}{
		"cluster-admin": int32(1),
		"admin":         int32(2),
		"edit":          int32(3),
		"view":          int32(4),
	},
)
View Source
var PrometheusTypes = gmap.New(
	map[string]interface{}{
		"count": models.PrometheusType(100),
		"sum":   models.PrometheusType(200),
	},
)
View Source
var SecurityGroupProtocols = gmap.New(
	map[string]interface{}{
		"icmp": models.SecurityGroupProtocol(100),
		"tcp":  models.SecurityGroupProtocol(200),
		"udp":  models.SecurityGroupProtocol(300),
	},
)
View Source
var ServerRoles = gmap.New(
	map[string]interface{}{
		"bastion":    models.CloudRole(100),
		"kubemaster": models.CloudRole(200),
		"kubeworker": models.CloudRole(300),
	},
)
View Source
var ShowbackKinds = gmap.New(
	map[string]interface{}{
		"general":  models.ShowbackType(100),
		"external": models.ShowbackType(200),
	},
)
View Source
var SlackTypes = gmap.New(
	map[string]interface{}{
		"alert":   models.SlackType(100),
		"general": models.SlackType(200),
	},
)
View Source
var UserRoles = gmap.New(
	map[string]interface{}{
		"user":    models.UserRole(400),
		"manager": models.UserRole(200),
	},
)

Functions

func Atoi32

func Atoi32(str string) (int32, error)

func GetAlertingIntegrationType

func GetAlertingIntegrationType(integrationType string) models.AlertingIntegrationType

func GetAlertingReminder

func GetAlertingReminder(reminder string) models.AlertingReminder

func GetKubeconfigRole

func GetKubeconfigRole(role string) int32

func GetPrometheusType

func GetPrometheusType(showbackType string) models.PrometheusType

func GetSecurityGroupProtocol

func GetSecurityGroupProtocol(protocol string) models.SecurityGroupProtocol

func GetServerRole

func GetServerRole(serverRole string) models.CloudRole

func GetShowbackKind

func GetShowbackKind(showbackKind string) models.ShowbackType

func GetSlackType

func GetSlackType(slackType string) models.SlackType

func GetUserRole

func GetUserRole(role string) models.UserRole

func GetVMRebootType

func GetVMRebootType(hardReboot bool) string

func GiBToB

func GiBToB(gibiBytes int) int64

func GiBToMiB

func GiBToMiB(gibiBytes float64) int32

func IsInRouterIDRange

func IsInRouterIDRange(x int32) bool

func StrIsValidDate

func StrIsValidDate(str string) bool

Whether `str` is a valid date in the format dd.mm.yyyy

func StrToDateTime

func StrToDateTime(str string) strfmt.DateTime

Convert string in the format dd.mm.yyyy to a strfmt.DateTime struct

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL