Documentation ¶
Index ¶
- Constants
- Variables
- func CIDRToPreNetMask(cidr string) (string, string, error)
- func ElementsSame[T constraints.Ordered](s1, s2 []T) bool
- func FormatIP(ip string) string
- func IntSliceToString(s []int) string
- func LogAdd(resourceType string) string
- func LogDelete(resourceType string) string
- func LogUpdate(resourceType string) string
- func NewDomainPrefix(name string) logger.Prefix
- func NewSubDomainPrefix(name string) logger.Prefix
- func StringToIntSlice(str string) []int
- type DomainInfo
- type DomainNameLogPrefix
- type Metadata
- type ORG
- type SubDomainInfo
- type SubDomainNameLogPrefix
Constants ¶
View Source
const ( IPV4_DEFAULT_PREFIX = "0.0.0.0" IPV4_DEFAULT_NETMASK = 32 IPV4_DEFAULT_GATEWAY = "0.0.0.0" IPV6_DEFAULT_PREFIX = "::" IPV6_DEFAULT_NETMASK = 128 IPV6_DEFAULT_GATEWAY = "::" )
View Source
const ( VROUTER_STATE_RUNNING = 7 WAN_IP_ISP = 7 PUBLIC_NETWORK_LCUUID = "ffffffff-ffff-ffff-ffff-ffffffffffff" )
Variables ¶
View Source
var DEVICE_TYPE_INT_TO_STR = map[int]string{ ctrlrcommon.VIF_DEVICE_TYPE_HOST: ctrlrcommon.RESOURCE_TYPE_HOST_EN, ctrlrcommon.VIF_DEVICE_TYPE_VM: ctrlrcommon.RESOURCE_TYPE_VM_EN, ctrlrcommon.VIF_DEVICE_TYPE_VROUTER: ctrlrcommon.RESOURCE_TYPE_VROUTER_EN, ctrlrcommon.VIF_DEVICE_TYPE_DHCP_PORT: ctrlrcommon.RESOURCE_TYPE_DHCP_PORT_EN, ctrlrcommon.VIF_DEVICE_TYPE_NAT_GATEWAY: ctrlrcommon.RESOURCE_TYPE_NAT_GATEWAY_EN, ctrlrcommon.VIF_DEVICE_TYPE_LB: ctrlrcommon.RESOURCE_TYPE_LB_EN, ctrlrcommon.VIF_DEVICE_TYPE_RDS_INSTANCE: ctrlrcommon.RESOURCE_TYPE_RDS_INSTANCE_EN, ctrlrcommon.VIF_DEVICE_TYPE_REDIS_INSTANCE: ctrlrcommon.RESOURCE_TYPE_REDIS_INSTANCE_EN, ctrlrcommon.VIF_DEVICE_TYPE_POD_NODE: ctrlrcommon.RESOURCE_TYPE_POD_NODE_EN, ctrlrcommon.VIF_DEVICE_TYPE_POD_SERVICE: ctrlrcommon.RESOURCE_TYPE_POD_SERVICE_EN, ctrlrcommon.VIF_DEVICE_TYPE_POD: ctrlrcommon.RESOURCE_TYPE_POD_EN, ctrlrcommon.PROCESS_INSTANCE_TYPE: ctrlrcommon.RESOURCE_TYPE_PROCESS_EN, }
Functions ¶
func ElementsSame ¶
func ElementsSame[T constraints.Ordered](s1, s2 []T) bool
func IntSliceToString ¶
func NewDomainPrefix ¶
func NewSubDomainPrefix ¶
func StringToIntSlice ¶
Types ¶
type DomainInfo ¶
type DomainInfo struct {
mysqlmodel.Domain
}
type DomainNameLogPrefix ¶
type DomainNameLogPrefix struct {
Name string
}
func (*DomainNameLogPrefix) Prefix ¶
func (p *DomainNameLogPrefix) Prefix() string
type Metadata ¶
type Metadata struct { ORGID int // org id DB *mysql.DB // org database connection Domain *DomainInfo SubDomain *SubDomainInfo LogPrefixes []logger.Prefix }
func NewMetadata ¶
func (*Metadata) SetDomain ¶
func (m *Metadata) SetDomain(domain mysqlmodel.Domain)
func (*Metadata) SetSubDomain ¶
func (m *Metadata) SetSubDomain(subDomain mysqlmodel.SubDomain)
type ORG ¶
type SubDomainInfo ¶
type SubDomainInfo struct {
mysqlmodel.SubDomain
}
type SubDomainNameLogPrefix ¶
type SubDomainNameLogPrefix struct {
Name string
}
func (*SubDomainNameLogPrefix) Prefix ¶
func (p *SubDomainNameLogPrefix) Prefix() string
Click to show internal directories.
Click to hide internal directories.