dto

package
v0.0.0-...-96b04c8 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricTypeMatrix = "matrix"
	MetricTypeVector = "vector"
)

Variables

Functions

func CoverToConfig

func CoverToConfig(name string, config string) interface{}

func CoverToModel

func CoverToModel(dto MsgAccountDTO) model.MsgAccount

func LoadApiserverFromConfig

func LoadApiserverFromConfig(ConfigContent string) (string, error)

Types

type AddMemberResponse

type AddMemberResponse struct {
	Items []string `json:"items"`
}

type AddSubscribeResponse

type AddSubscribeResponse struct {
	Items []model.User `json:"items"`
}

type BackupAccount

type BackupAccount struct {
	model.BackupAccount
	CredentialVars interface{} `json:"credentialVars"`
	Projects       string      `json:"projects"`
	Clusters       string      `json:"clusters"`
}

type BackupAccountOp

type BackupAccountOp struct {
	Operation string          `json:"operation" validate:"required"`
	Items     []BackupAccount `json:"items" validate:"required"`
}

type BackupAccountRequest

type BackupAccountRequest struct {
	Name           string      `json:"name" validate:"required"`
	CredentialVars interface{} `json:"credentialVars" validate:"required"`
	Bucket         string      `json:"bucket" validate:"required"`
	Type           string      `json:"type" validate:"required"`
	Projects       []string    `json:"projects"`
	Clusters       []string    `json:"clusters"`
}

type BackupAccountUpdate

type BackupAccountUpdate struct {
	ID             string      `json:"id" validate:"required"`
	Name           string      `json:"name" validate:"required"`
	CredentialVars interface{} `json:"credentialVars" validate:"required"`
	Bucket         string      `json:"bucket" validate:"required"`
	Type           string      `json:"type" validate:"required"`
	Projects       []string    `json:"projects"`
}

type BindKubePI

type BindKubePI struct {
	SourceType   string `json:"sourceType"`
	Project      string `json:"project"`
	Cluster      string `json:"cluster"`
	BindUser     string `json:"bindUser"`
	BindPassword string `json:"bindPassword"`
}

type BindResponse

type BindResponse struct {
	SourceType string `json:"sourceType"`
	Project    string `json:"project"`
	Cluster    string `json:"cluster"`
	BindUser   string `json:"bindUser"`
}

type Captcha

type Captcha struct {
	Image     string `json:"image"`
	CaptchaId string `json:"captchaId"`
}

type CheckConn

type CheckConn struct {
	BindUser     string `json:"bindUser"`
	BindPassword string `json:"bindPassword"`
}

type CisBatch

type CisBatch struct {
	Items     []CisTask
	Operation string
}

type CisControl

type CisControl struct {
	Id        string      `json:"id"`
	Version   string      `json:"version"`
	Text      string      `json:"text"`
	NodeType  string      `json:"node_type"`
	Tests     CisTestList `json:"tests"`
	TotalPass int         `json:"total_pass"`
	TotalFail int         `json:"total_fail"`
	TotalWarn int         `json:"total_warn"`
	TotalInfo int         `json:"total_info"`
}

type CisControlList

type CisControlList []CisControl

type CisReport

type CisReport struct {
	Controls CisControlList `json:"Controls"`
	Totals   CisTotals      `json:"Totals"`
}

type CisResult

type CisResult struct {
	TestNumber  string `json:"test_number"`
	TestDesc    string `json:"test_desc"`
	Remediation string `json:"remediation"`
	Status      string `json:"status"`
	Scored      bool   `json:"scored"`
	Reason      string `json:"reason"`
}

type CisResultList

type CisResultList []CisResult

type CisTask

type CisTask struct {
	model.CisTask
}

type CisTaskCreate

type CisTaskCreate struct {
	Policy string `json:"policy"`
}

type CisTaskDetail

type CisTaskDetail struct {
	ClusterName    string `json:"clusterName"`
	ClusterVersion string `json:"clusterVersion"`
	model.CisTaskWithResult
	CisReport CisReport `json:"cisReport"`
}

type CisTest

type CisTest struct {
	Section string        `json:"section"`
	Pass    int           `json:"pass"`
	Fail    int           `json:"fail"`
	Warn    int           `json:"warn"`
	Info    int           `json:"info"`
	Desc    string        `json:"desc"`
	Results CisResultList `json:"results"`
}

type CisTestList

type CisTestList []CisTest

type CisTotals

type CisTotals struct {
	TotalPass int `json:"total_pass"`
	TotalFail int `json:"total_fail"`
	TotalWarn int `json:"total_warn"`
	TotalInfo int `json:"total_info"`
}

type CloudDatastore

type CloudDatastore struct {
	Name      string `json:"name"`
	Capacity  int    `json:"capacity"`
	FreeSpace int    `json:"freeSpace"`
}

type CloudRegionResponse

type CloudRegionResponse struct {
	Result  interface{} `json:"result"`
	Version string      `json:"version"`
}

type CloudStorageRequest

type CloudStorageRequest struct {
	CredentialVars interface{} `json:"credentialVars" validate:"required"`
	Type           string      `json:"type" validate:"required"`
}

type CloudZoneRequest

type CloudZoneRequest struct {
	CloudVars  interface{} `json:"cloudVars" validate:"required"`
	Datacenter string      `json:"datacenter"`
	RegionName string      `json:"RegionName"`
}

type CloudZoneResponse

type CloudZoneResponse struct {
	Result interface{} `json:"result"`
}

type Cluster

type Cluster struct {
	model.Cluster
	NodeSize               int    `json:"nodeSize"`
	ProjectName            string `json:"projectName"`
	MultiClusterRepository string `json:"multiClusterRepository"`
}

type ClusterBackupFile

type ClusterBackupFile struct {
	model.ClusterBackupFile
}

type ClusterBackupFileCreate

type ClusterBackupFileCreate struct {
	ClusterName             string `json:"clusterName" validate:"required"`
	Name                    string `json:"name"`
	ClusterBackupStrategyID string `json:"clusterBackupStrategyId" validate:"required"`
	Folder                  string `json:"folder"`
}

type ClusterBackupFileOp

type ClusterBackupFileOp struct {
	Operation string              `json:"operation" validate:"required"`
	Items     []ClusterBackupFile `json:"items" validate:"required"`
}

type ClusterBackupFileRestore

type ClusterBackupFileRestore struct {
	ClusterName   string                  `json:"clusterName" validate:"required"`
	Name          string                  `json:"name" validate:"required"`
	File          model.ClusterBackupFile `json:"file"`
	BackupAccount model.BackupAccount     `json:"backupAccount"`
}

type ClusterBackupStrategy

type ClusterBackupStrategy struct {
	model.ClusterBackupStrategy
	ClusterName       string `json:"clusterName"`
	BackupAccountName string `json:"backupAccountName"`
}

type ClusterBackupStrategyRequest

type ClusterBackupStrategyRequest struct {
	ID                string `json:"id"`
	Cron              int    `json:"cron"  validate:"min=1,max=300" en:"Backup Interval" zh:"备份间隔"`
	SaveNum           int    `json:"saveNum"  validate:"min=1,max=100" en:"Keep Copies" zh:"保留份数"`
	BackupAccountName string `json:"backupAccountName" validate:"required"`
	ClusterName       string `json:"clusterName" validate:"required"`
	Status            string `json:"status"`
}

type ClusterBatch

type ClusterBatch struct {
	Items     []Cluster
	Operation string
}

type ClusterCreate

type ClusterCreate struct {
	Name          string `json:"name" binding:"required"`
	ProjectName   string `json:"projectName"`
	NodeNameRule  string `json:"nodeNameRule" binding:"required"`
	Version       string `json:"version" binding:"required"`
	Architectures string `json:"architectures"`
	Provider      string `json:"provider"`
	Plan          string `json:"plan"`
	YumOperate    string `json:"yumOperate"`

	NetworkType             string `json:"networkType"`
	CiliumVersion           string `json:"ciliumVersion"`
	CiliumTunnelMode        string `json:"ciliumTunnelMode"`
	CiliumNativeRoutingCidr string `json:"ciliumNativeRoutingCidr"`
	FlannelBackend          string `json:"flannelBackend"`
	CalicoIpv4PoolIpip      string `json:"calicoIpv4PoolIpip"`
	NetworkInterface        string `json:"networkInterface"`
	NetworkCidr             string `json:"networkCidr"`

	KubePodSubnet            string `json:"kubePodSubnet"`
	MaxNodePodNum            int    `json:"maxNodePodNum"`
	MaxNodeNum               int    `json:"maxNodeNum"`
	KubeServiceSubnet        string `json:"kubeServiceSubnet"`
	KubeProxyMode            string `json:"kubeProxyMode"`
	CgroupDriver             string `json:"cgroupDriver"`
	KubeDnsDomain            string `json:"kubeDnsDomain"`
	KubernetesAudit          string `json:"kubernetesAudit"`
	NodeportAddress          string `json:"nodeportAddress"`
	KubeServiceNodePortRange string `json:"kubeServiceNodePortRange"`

	RuntimeType          string `json:"runtimeType"`
	DockerMirrorRegistry string `json:"dockerMirrorRegistry"`
	DockerRemoteApi      string `json:"dockerRemoteApi"`
	DockerSubnet         string `json:"dockerSubnet"`
	DockerStorageDir     string `json:"dockerStorageDir"`
	ContainerdStorageDir string `json:"containerdStorageDir"`

	HelmVersion             string `json:"helmVersion"`
	EnableDnsCache          string `json:"enableDnsCache"`
	DnsCacheVersion         string `json:"dnsCacheVersion"`
	IngressControllerType   string `json:"ingressControllerType"`
	SupportGpu              string `json:"supportGpu"`
	EtcdDataDir             string `json:"etcdDataDir"`
	EtcdSnapshotCount       int    `json:"etcdSnapshotCount"`
	EtcdCompactionRetention int    `json:"etcdCompactionRetention"`
	EtcdMaxRequest          int    `json:"etcdMaxRequest"`
	EtcdQuotaBackend        int    `json:"etcdQuotaBackend"`

	LbMode             string       `json:"lbMode"`
	LbKubeApiserverIp  string       `json:"lbKubeApiserverIp"`
	KubeApiServerPort  int          `json:"kubeApiServerPort"`
	MasterScheduleType string       `json:"masterScheduleType"`
	WorkerAmount       int          `json:"workerAmount"`
	Nodes              []NodeCreate `json:"nodes"`
}

func (ClusterCreate) ClusterCreateDto2Mo

func (c ClusterCreate) ClusterCreateDto2Mo() *model.Cluster

type ClusterGrade

type ClusterGrade struct {
	Score    int                `json:"score"`
	TotalSum Summary            `json:"totalSum"`
	ListSum  map[string]Summary `json:"listSum"`
	Results  []NamespaceResult  `json:"results"`
}

type ClusterHealth

type ClusterHealth struct {
	Level string              `json:"level"`
	Hooks []ClusterHealthHook `json:"hooks"`
}

type ClusterHealthHook

type ClusterHealthHook struct {
	Name        string `json:"name"`
	Level       string `json:"level"`
	Msg         string `json:"msg"`
	AdjustValue string `json:"adjustValue"`
}

type ClusterImport

type ClusterImport struct {
	Name          string      `json:"name"`
	Router        string      `json:"router"`
	ProjectName   string      `json:"projectName"`
	Architectures string      `json:"architectures"`
	IsKoCluster   bool        `json:"isKoCluster"`
	KoClusterInfo clusterInfo `json:"clusterInfo"`

	AuthenticationMode string `json:"authenticationMode"`
	ApiServer          string `json:"apiServer"`
	Token              string `json:"token"`
	CertDataStr        string `json:"certDataStr"`
	KeyDataStr         string `json:"keyDataStr"`
	ConfigContent      string `json:"configContent"`
}

func (ClusterImport) ClusterImportDto2Mo

func (c ClusterImport) ClusterImportDto2Mo() (*model.Cluster, error)

type ClusterInfo

type ClusterInfo struct {
	Name     string `json:"name"`
	Provider string `json:"provider"`
}

type ClusterLoad

type ClusterLoad struct {
	Name          string `json:"name"`
	Router        string `json:"router"`
	Architectures string `json:"architectures"`

	AuthenticationMode string `json:"authenticationMode"`
	ApiServer          string `json:"apiServer"`
	Token              string `json:"token"`
	CertDataStr        string `json:"certDataStr"`
	KeyDataStr         string `json:"keyDataStr"`
	ConfigContent      string `json:"configContent"`
}

type ClusterLoadInfo

type ClusterLoadInfo struct {
	Name                     string `json:"name"`
	NodeNameRule             string `json:"nodeNameRule"`
	Version                  string `json:"version"`
	Architectures            string `json:"architectures"`
	LbMode                   string `json:"lbMode"`
	LbKubeApiserverIp        string `json:"lbKubeApiserverIp"`
	KubeApiServerPort        int    `json:"kubeApiServerPort"`
	KubeServiceNodePortRange string `json:"kubeServiceNodePortRange"`
	NodeportAddress          string `json:"nodeportAddress"`
	KubeProxyMode            string `json:"kubeProxyMode"`
	NetworkType              string `json:"networkType"`
	KubeDnsDomain            string `json:"kubeDnsDomain"`
	KubernetesAudit          string `json:"kubernetesAudit"`
	RuntimeType              string `json:"runtimeType"`
	MasterScheduleType       string `json:"masterScheduleType"`

	KubePodSubnet         string         `json:"kubePodSubnet"`
	KubeServiceSubnet     string         `json:"kubeServiceSubnet"`
	MaxNodeNum            int            `json:"maxNodeNum"`
	MaxNodePodNum         int            `json:"maxNodePodNum"`
	KubeMaxPods           int            `json:"kubeMaxPods"`
	KubeNetworkNodePrefix int            `json:"kubeNetworkNodePrefix"`
	Nodes                 []NodesFromK8s `json:"nodes"`
}

type ClusterManifest

type ClusterManifest struct {
	Name        string        `json:"name"`
	Version     string        `json:"version"`
	IsActive    bool          `json:"isActive"`
	CoreVars    []NameVersion `json:"coreVars"`
	NetworkVars []NameVersion `json:"networkVars"`
	ToolVars    []NameVersion `json:"toolVars"`
	StorageVars []NameVersion `json:"storageVars"`
	OtherVars   []NameVersion `json:"otherVars"`
}

func (ClusterManifest) GetVars

func (c ClusterManifest) GetVars() map[string]string

type ClusterManifestGroup

type ClusterManifestGroup struct {
	LargeVersion     string            `json:"largeVersion"`
	ClusterManifests []ClusterManifest `json:"clusterManifests"`
}

type ClusterManifestUpdate

type ClusterManifestUpdate struct {
	Name     string `json:"name"`
	Version  string `json:"version"`
	IsActive bool   `json:"isActive"`
}

type ClusterMember

type ClusterMember struct {
	model.ClusterMember
	ClusterName string `json:"clusterName"`
	Username    string `json:"username"`
	Email       string `json:"email"`
}

type ClusterMemberCreate

type ClusterMemberCreate struct {
	Usernames []string `json:"usernames" validate:"required"`
}

type ClusterNode

type ClusterNode struct {
	model.ClusterNode
}

type ClusterPage

type ClusterPage struct {
	Items []Cluster `json:"items"`
	Total int       `json:"total"`
}

type ClusterRecoverItem

type ClusterRecoverItem struct {
	Name   string `json:"name"`
	Method string `json:"method"`
	Result string `json:"result"`
	Msg    string `json:"msg"`
}

type ClusterRelation

type ClusterRelation struct {
	model.ClusterMultiClusterRepository
	ClusterName string `json:"clusterName"`
}

type ClusterResource

type ClusterResource struct {
	model.ClusterResource
	ResourceName string `json:"resourceName"`
}

type ClusterResourceCreate

type ClusterResourceCreate struct {
	ResourceType string   `json:"resourceType" validate:"required"`
	Names        []string `json:"names" validate:"required"`
}

type ClusterSecret

type ClusterSecret struct {
	model.ClusterSecret
}

type ClusterStorageProvisioner

type ClusterStorageProvisioner struct {
	model.ClusterStorageProvisioner
	Vars map[string]interface{} `json:"vars"`
}

type ClusterStorageProvisionerBatch

type ClusterStorageProvisionerBatch struct {
	Items     []ClusterStorageProvisioner `json:"items"`
	Operation string                      `json:"operation"`
}

type ClusterStorageProvisionerCreation

type ClusterStorageProvisionerCreation struct {
	Name      string                 `json:"name"`
	Namespace string                 `json:"namespace"`
	Type      string                 `json:"type"`
	Vars      map[string]interface{} `json:"vars"`

	IsInCluster bool `json:"isInCluster"`
}

func (ClusterStorageProvisionerCreation) ProvisionerCreate2Mo

type ClusterStorageProvisionerLoad

type ClusterStorageProvisionerLoad struct {
	Name   string                 `json:"name"`
	Type   string                 `json:"type"`
	Status string                 `json:"status"`
	Vars   map[string]interface{} `json:"vars"`
}

type ClusterStorageProvisionerSync

type ClusterStorageProvisionerSync struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Type      string `json:"type"`
	Status    string `json:"status"`
}

type ClusterTool

type ClusterTool struct {
	model.ClusterTool
	NodePort string                 `json:"nodePort"`
	Vars     map[string]interface{} `json:"vars"`
}

type ClusterUpgrade

type ClusterUpgrade struct {
	ClusterName string `json:"clusterName"`
	Version     string `json:"version"`
}

type ClusterWithEndpoint

type ClusterWithEndpoint struct {
	Cluster  model.Cluster
	Endpoint Endpoint
}

type Component

type Component struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	Version  string `json:"version"`
	Describe string `json:"describe"`
	Vars     string `json:"vars"`

	Disabled bool   `json:"disabled"`
	Status   string `json:"status"`
	Message  string `json:"message"`
}

type ComponentCreate

type ComponentCreate struct {
	ClusterName string                 `json:"clusterName"`
	Name        string                 `json:"name"`
	Type        string                 `json:"type"`
	Version     string                 `json:"version"`
	Describe    string                 `json:"describe"`
	Vars        map[string]interface{} `json:"vars"`
}

func (ComponentCreate) ComponentCreate2Mo

func (c ComponentCreate) ComponentCreate2Mo() model.ClusterSpecComponent

type ComponentPage

type ComponentPage struct {
	Items []Component `json:"items"`
	Total int         `json:"total"`
}

type ComponentSync

type ComponentSync struct {
	ClusterName string   `json:"clusterName"`
	Names       []string `json:"names"`
}

type Cordon

type Cordon struct {
	Name             string `json:"name"`
	Cluster          string `json:"cluster"`
	SetUnschedulable bool   `json:"setUnschedulable"`
}

type CreateDemo

type CreateDemo struct {
	Name  string
	Order int
}

type Credential

type Credential struct {
	model.Credential
}

type CredentialBatchOp

type CredentialBatchOp struct {
	Operation string       `json:"operation" validate:"required"`
	Items     []Credential `json:"items" validate:"required"`
}

type CredentialCreate

type CredentialCreate struct {
	Name       string `json:"name" validate:"required"`
	Username   string `json:"username" validate:"required"`
	Password   string
	PrivateKey string
	Type       string `json:"type" validate:"required"`
}

type CredentialOfHostCreate

type CredentialOfHostCreate struct {
	Name       string `json:"name"`
	Username   string `json:"username"`
	Password   string `json:"password"`
	PrivateKey string `json:"privateKey"`
	Type       string `json:"type"`
}

type CredentialPage

type CredentialPage struct {
	Items []Credential `json:"items"`
	Total int          `json:"total"`
}

type CredentialUpdate

type CredentialUpdate struct {
	Username   string `json:"username"`
	Password   string `json:"password"`
	PrivateKey string `json:"privateKey"`
	Type       string `json:"type" validate:"required"`
}

type Dashboard

type Dashboard struct {
	Url string `json:"url"`
}

type Demo

type Demo struct {
	model.Demo
	Order int
}

type DeploymentSearch

type DeploymentSearch struct {
	ApiServer string `json:"apiServer"`
	Router    string `json:"router"`
	Token     string `json:"token"`
	Namespace string `json:"namespace"`
}

type DingTalkConfig

type DingTalkConfig struct {
	WebHook  string `json:"webHook"`
	TestUser string `json:"testUser"`
	Status   string `json:"status"`
	Secret   string `json:"secret"`
}

type EmailConfig

type EmailConfig struct {
	Address  string `json:"address"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	TestUser string `json:"testUser"`
	Status   string `json:"status"`
}

type Endpoint

type Endpoint struct {
	Address string
	Port    int
}

type Evict

type Evict struct {
	Name      string `json:"name"`
	Cluster   string `json:"cluster"`
	Namespace string `json:"namespace"`
}

type ExportPoint

type ExportPoint [2]float64

type Host

type Host struct {
	model.Host
	ClusterName    string `json:"clusterName"`
	ProjectName    string `json:"projectName"`
	CredentialName string `json:"credentialName"`
	ZoneName       string `json:"zoneName"`
}

type HostCreate

type HostCreate struct {
	Name         string                 `json:"name" validate:"required"`
	Ip           string                 `json:"ip" validate:"required"`
	FlexIp       string                 `json:"flexIp"`
	Port         int                    `json:"port" validate:"required"`
	Project      string                 `json:"project" validate:"required"`
	Cluster      string                 `json:"cluster"`
	CredentialID string                 `json:"credentialId"`
	Credential   CredentialOfHostCreate `json:"credential"`
}

type HostOp

type HostOp struct {
	Operation string `json:"operation" validate:"required"`
	Items     []Host `json:"items" validate:"required"`
}

type HostPage

type HostPage struct {
	Items []Host `json:"items"`
	Total int    `json:"total"`
}

type HostSync

type HostSync struct {
	HostName   string `json:"hostName"`
	HostStatus string `json:"hostStatus"`
}

type HostUptate

type HostUptate struct {
	Name         string                 `json:"name" validate:"required"`
	Ip           string                 `json:"ip" validate:"required"`
	FlexIp       string                 `json:"flexIp"`
	Port         int                    `json:"port" validate:"required"`
	CredentialID string                 `json:"credentialId"`
	Credential   CredentialOfHostCreate `json:"credential"`
}

type ImportHostResponse

type ImportHostResponse struct {
	Errs    errorf.CErrFs `json:"errs"`
	Success bool          `json:"success"`
}

type ImportRequest

type ImportRequest struct {
	Users []LdapUser `json:"users"`
}

type ImportResult

type ImportResult struct {
	Success  bool     `json:"success"`
	Failures []string `json:"failures"`
	Msg      string   `json:"msg"`
}

type Ip

type Ip struct {
	model.Ip
	IpPool model.IpPool `json:"ipPool"`
}

type IpCreate

type IpCreate struct {
	IpStart    string `json:"ipStart"`
	IpEnd      string `json:"ipEnd"`
	Gateway    string `json:"gateway"`
	DNS1       string `json:"dns1"`
	DNS2       string `json:"dns2"`
	IpPoolName string `json:"ipPoolName"`
}

type IpOp

type IpOp struct {
	Operation string `json:"operation"  validate:"required"`
	Items     []Ip   `json:"items"  validate:"required"`
}

type IpPool

type IpPool struct {
	model.IpPool
	IpUsed int `json:"ipUsed"`
}

type IpPoolCreate

type IpPoolCreate struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Subnet      string `json:"subnet"`
	IpStart     string `json:"ipStart"`
	IpEnd       string `json:"ipEnd"`
	Gateway     string `json:"gateway"`
	DNS1        string `json:"dns1"`
	DNS2        string `json:"dns2"`
}

type IpPoolOp

type IpPoolOp struct {
	Operation string   `json:"operation"  validate:"required"`
	Items     []IpPool `json:"items"  validate:"required"`
}

type IpUpdate

type IpUpdate struct {
	Address   string `json:"address"`
	Operation string `json:"operation"`
}

type IsClusterNameExist

type IsClusterNameExist struct {
	IsExist bool `json:"isExist"`
}

type LdapLogin

type LdapLogin struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type LdapResult

type LdapResult struct {
	Data interface{} `json:"data"`
}

type LdapSetting

type LdapSetting struct {
	Endpoint  string `json:"ldap_address"`
	Port      string `json:"ldap_port"`
	UserName  string `json:"ldap_username"`
	UserDn    string `json:"ldap_dn"`
	Password  string `json:"ldap_password"`
	Filter    string `json:"ldap_filter"`
	Mapping   string `json:"ldap_mapping"`
	Status    string `json:"ldap_status"`
	TLS       string `json:"ldap_tls"`
	SizeLimit int
	TimeLimit int
}

type LdapUser

type LdapUser struct {
	Name      string `json:"name"`
	Email     string `json:"email"`
	Available bool   `json:"available"`
}

type License

type License struct {
	Message     string      `json:"message"`
	Status      string      `json:"status"`
	LicenseInfo LicenseInfo `json:"license"`
}

type LicenseInfo

type LicenseInfo struct {
	Corporation string `json:"corporation"`
	Product     string `json:"product"`
	Edition     string `json:"edition"`
	Count       int    `json:"count"`
	Expired     string `json:"expired"`
}

type LoginCredential

type LoginCredential struct {
	Username   string `json:"username"`
	Password   string `json:"password"`
	Language   string `json:"language"`
	CaptchaId  string `json:"captchaId"`
	Code       string `json:"code"`
	AuthMethod string `json:"authMethod"`
}

type Logs

type Logs struct {
	Msg string `json:"msg"`
}

type Metadata

type Metadata struct {
	Metric string `json:"metric,omitempty" description:"metric name"`
	Type   string `json:"type,omitempty" description:"metric type"`
	Help   string `json:"help,omitempty" description:"metric description"`
}

type Metric

type Metric struct {
	MetricName string `json:"metric_name,omitempty" description:"metric name, eg. scheduler_up_sum" csv:"metric_name"`
	MetricData `json:"data,omitempty" description:"actual metric result"`
	Error      string `json:"error,omitempty" csv:"-"`
}

type MetricData

type MetricData struct {
	MetricType   string `json:"resultType,omitempty" description:"result type, one of matrix, vector" csv:"metric_type"`
	MetricValues `json:"result,omitempty" description:"metric data including labels, time series and values" csv:"metric_values"`
}

type MetricValue

type MetricValue struct {
	Metadata       map[string]string `json:"metric,omitempty" description:"time series labels"`
	Sample         *Point            `json:"value,omitempty" description:"time series, values of vector type"`
	Series         []Point           `json:"values,omitempty" description:"time series, values of matrix type"`
	ExportSample   *ExportPoint      `json:"exported_value,omitempty" description:"exported time series, values of vector type"`
	ExportedSeries []ExportPoint     `json:"exported_values,omitempty" description:"exported time series, values of matrix type"`

	MinValue     string `json:"min_value" description:"minimum value from monitor points"`
	MaxValue     string `json:"max_value" description:"maximum value from monitor points"`
	AvgValue     string `json:"avg_value" description:"average value from monitor points"`
	SumValue     string `json:"sum_value" description:"sum value from monitor points"`
	Fee          string `json:"fee" description:"resource fee"`
	ResourceUnit string `json:"resource_unit"`
	CurrencyUnit string `json:"currency_unit"`
}

type MetricValues

type MetricValues []MetricValue

type MsgAccountDTO

type MsgAccountDTO struct {
	ID        string      `json:"-"`
	Name      string      `json:"name" validate:"containsany=EMAILDING_TALKWORK_WEIXIN"`
	Status    string      `json:"status"`
	Config    interface{} `json:"config"`
	CreatedAt time.Time   `json:"createdAt"`
	UpdatedAt time.Time   `json:"updatedAt"`
}

func CoverToDTO

func CoverToDTO(mo model.MsgAccount) MsgAccountDTO

type MsgSubConfig

type MsgSubConfig struct {
	DingTalk   string `json:"dingTalk"`
	WorkWeiXin string `json:"workWeiXin"`
	Local      string `json:"local"`
	Email      string `json:"email"`
}

type MsgSubscribeDTO

type MsgSubscribeDTO struct {
	model.MsgSubscribe
	SubConfig MsgSubConfig `json:"subConfig"`
	Users     []model.User `json:"users"`
}

func NewMsgSubscribeDTO

func NewMsgSubscribeDTO(subscribe model.MsgSubscribe) MsgSubscribeDTO

type MsgSubscribeUserDTO

type MsgSubscribeUserDTO struct {
	MsgSubscribeID string   `json:"msgSubscribeId"`
	Users          []string `json:"users"`
}

type MultiClusterRepository

type MultiClusterRepository struct {
	model.MultiClusterRepository
}

type MultiClusterRepositoryBatch

type MultiClusterRepositoryBatch struct {
	Operation string                   `json:"operation" validate:"required"`
	Items     []MultiClusterRepository `json:"items" validate:"required"`
}

type MultiClusterRepositoryCreateRequest

type MultiClusterRepositoryCreateRequest struct {
	Name     string `json:"name"`
	Source   string `json:"source"`
	Branch   string `json:"branch"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type MultiClusterRepositoryUpdateRequest

type MultiClusterRepositoryUpdateRequest struct {
	GitTimeout   int64 `json:"gitTimeout"`
	SyncInterval int64 `json:"syncInterval"`
	SyncEnable   bool  `json:"syncEnable"`
}

type MultiClusterSyncClusterLog

type MultiClusterSyncClusterLog struct {
	model.MultiClusterSyncClusterLog
	MultiClusterSyncClusterResourceLogs []model.MultiClusterSyncClusterResourceLog `json:"multiClusterSyncClusterResourceLogs"`
	ClusterName                         string                                     `json:"clusterName"`
}

type MultiClusterSyncLog

type MultiClusterSyncLog struct {
	model.MultiClusterSyncLog
}

type MultiClusterSyncLogDetail

type MultiClusterSyncLogDetail struct {
	model.MultiClusterSyncLog
	MultiClusterSyncClusterLogs []MultiClusterSyncClusterLog `json:"multiClusterSyncClusterLogs"`
}

type NameVersion

type NameVersion struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type NamespaceResult

type NamespaceResult struct {
	Namespace string                  `json:"namespace"`
	Results   []NamespaceResultDetail `json:"results"`
}

type NamespaceResultDetail

type NamespaceResultDetail struct {
	Name       string      `json:"name"`
	Kind       string      `json:"kind"`
	PodResults []PodResult `json:"podResults"`
}

type Node

type Node struct {
	model.ClusterNode
	Info v1.Node `json:"info"`
	Ip   string  `json:"ip"`
}

type NodeBatch

type NodeBatch struct {
	Hosts     []string `json:"hosts"`
	Nodes     []string `json:"nodes"`
	Increase  int      `json:"increase"`
	Operation string   `json:"operation"`
	IsForce   bool     `json:"isForce"`
	StatusID  string   `json:"statusID"`
}

type NodeCreate

type NodeCreate struct {
	HostName string `json:"hostName"`
	Role     string `json:"role"`
}

type NodePage

type NodePage struct {
	Items []Node `json:"items"`
	Total int    `json:"total"`
}

type NodesFromK8s

type NodesFromK8s struct {
	Name         string `json:"name"`
	Port         int    `json:"port"`
	Ip           string `json:"ip"`
	Architecture string `json:"architecture"`
	Role         string `json:"role"`
	CredentialID string `json:"credentialID"`
}

type NtpServer

type NtpServer struct {
	model.NtpServer
}

type NtpServerCreate

type NtpServerCreate struct {
	Name    string `json:"name" validate:"required"`
	Address string `json:"address" validate:"required"`
	Status  string `json:"status" validate:"required"`
}

type NtpServerUpdate

type NtpServerUpdate struct {
	Address string `json:"address" validate:"required"`
	Status  string `json:"status" validate:"required"`
}

type Plan

type Plan struct {
	model.Plan
	PlanVars interface{} `json:"planVars"`
	Region   string      `json:"region"`
	Zones    []string    `json:"zones"`
	Projects []string    `json:"projects"`
	Provider string      `json:"provider"`
}

type PlanCreate

type PlanCreate struct {
	Name           string      `json:"name" validate:"required"`
	Zones          []string    `json:"zones" validate:"required"`
	PlanVars       interface{} `json:"planVars" validate:"required"`
	DeployTemplate string      `json:"deployTemplate" validate:"required"`
	Projects       []string    `json:"projects" validate:"required"`
	Region         string      `json:"region" validate:"required"`
}

type PlanOp

type PlanOp struct {
	Operation string `json:"operation" validate:"required"`
	Items     []Plan `json:"items" validate:"required"`
}

type PlanUpdate

type PlanUpdate struct {
	PlanVars interface{} `json:"planVars" validate:"required"`
	Projects []string    `json:"projects" validate:"required"`
}

type PlanVmConfig

type PlanVmConfig struct {
	Name   string            `json:"name"`
	Config constant.VmConfig `json:"config"`
}

type PodResult

type PodResult struct {
	ID       string `json:"id"`
	Category string `json:"category"`
	Message  string `json:"message"`
	Severity string `json:"severity"`
	Success  bool   `json:"success"`
}

type Point

type Point [2]float64

type Profile

type Profile struct {
	User  SessionUser `json:"user"`
	Token string      `json:"token,omitempty"`
}

type Project

type Project struct {
	model.Project
	Clusters interface{} `json:"clusters"`
}

type ProjectCreate

type ProjectCreate struct {
	Name        string `json:"name" validate:"required"`
	Description string `json:"description"`
}

type ProjectMember

type ProjectMember struct {
	model.ProjectMember
	Email      string `json:"email"`
	UserStatus string `json:"userStatus"`
	Username   string `json:"username"`
}

type ProjectMemberCreate

type ProjectMemberCreate struct {
	Usernames []string `json:"usernames" validate:"required"`
}

type ProjectMemberOP

type ProjectMemberOP struct {
	Operation string                `json:"operation" validate:"required"`
	Items     []ProjectMemberCreate `json:"items" validate:"required"`
}

type ProjectOp

type ProjectOp struct {
	Operation string    `json:"operation" validate:"required"`
	Items     []Project `json:"items" validate:"required"`
}

type ProjectPage

type ProjectPage struct {
	Items []Project `json:"items"`
	Total int       `json:"total"`
}

type ProjectResource

type ProjectResource struct {
	model.ProjectResource
	ResourceName string `json:"resourceName"`
}

type ProjectResourceCreate

type ProjectResourceCreate struct {
	ResourceType string   `json:"resourceType" validate:"required"`
	Names        []string `json:"names" validate:"required"`
}

type ProjectResourceOp

type ProjectResourceOp struct {
	Operation string            `json:"operation" validate:"required"`
	Items     []ProjectResource `json:"items" validate:"required"`
}

type ProjectResourceTree

type ProjectResourceTree struct {
	ID       int                   `json:"id"`
	Label    string                `json:"label"`
	Type     string                `json:"type"`
	Children []ProjectResourceTree `json:"children"`
}

type ProjectUpdate

type ProjectUpdate struct {
	Description string `json:"description"`
}

type QueryOptions

type QueryOptions struct {
	Level         string   `json:"level"`
	NodeName      string   `json:"nodeName"`
	Start         int      `json:"start"`
	End           int      `json:"end"`
	Step          int      `json:"step"`
	MetricsFilter []string `json:"metricsFilter"`
}

type Region

type Region struct {
	model.Region
	RegionVars interface{} `json:"regionVars"`
}

type RegionCreate

type RegionCreate struct {
	Name       string      `json:"name" validate:"required"`
	Provider   string      `json:"provider" validate:"required"`
	RegionVars interface{} `json:"regionVars" validate:"required"`
	Datacenter string      `json:"datacenter" validate:"required"`
}

type RegionDatacenterRequest

type RegionDatacenterRequest struct {
	RegionVars interface{} `json:"regionVars" validate:"required"`
}

type RegionOp

type RegionOp struct {
	Operation string   `json:"operation" validate:"required"`
	Items     []Region `json:"items" validate:"required"`
}

type RegionUpdate

type RegionUpdate struct {
	Name       string      `json:"name" validate:"required"`
	Provider   string      `json:"provider" validate:"required"`
	RegionVars interface{} `json:"regionVars" validate:"required"`
	Datacenter string      `json:"datacenter" validate:"required"`
}

type RepoChangePassword

type RepoChangePassword struct {
	ID            string `json:"id"`
	NexusUser     string `json:"nexusUser"`
	NexusPassword string `json:"nexusPassword"`
}

type ResourceQuota

type ResourceQuota struct {
	Cpu    int `json:"cpu"`
	Memory int `json:"memory"`
}

type Response

type Response struct {
	Data interface{} `json:"data"`
	Msg  string      `json:"msg"`
}

type SearchBind

type SearchBind struct {
	SourceType string `json:"sourceType"`
	Project    string `json:"project"`
	Cluster    string `json:"cluster"`
}

type SessionStatus

type SessionStatus struct {
	IsLogin bool `json:"isLogin"`
}

type SessionUser

type SessionUser struct {
	UserId         string   `json:"userId"`
	Name           string   `json:"name"`
	Email          string   `json:"email"`
	Language       string   `json:"language"`
	IsActive       bool     `json:"isActive"`
	IsAdmin        bool     `json:"isAdmin"`
	IsSuper        bool     `json:"isSuper"`
	Roles          []string `json:"roles"`
	CurrentProject string   `json:"currentProject"`
}

func (SessionUser) IsRole

func (s SessionUser) IsRole(userRole string) bool

type SourceDelete

type SourceDelete struct {
	Cluster   string `json:"cluster"`
	Kind      string `json:"kind"`
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
}

type SourceList

type SourceList struct {
	Kind       string        `json:"kind"`
	ApiVersion string        `json:"apiVersion"`
	Metadata   string        `json:"metadata"`
	Items      []interface{} `json:"items"`
}

type SourceScCreate

type SourceScCreate struct {
	Cluster string                 `json:"cluster"`
	Info    storagev1.StorageClass `json:"info"`
}

type SourceSearch

type SourceSearch struct {
	Cluster   string `json:"cluster"`
	Kind      string `json:"kind"`
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	Limit     int64  `json:"limit"`
	Continue  string `json:"continue"`
}

type SourceSecretCreate

type SourceSecretCreate struct {
	Cluster   string    `json:"cluster"`
	Namespace string    `json:"namespace"`
	Info      v1.Secret `json:"info"`
}

type Summary

type Summary struct {
	Danger  int `json:"danger"`
	Warning int `json:"warning"`
	Success int `json:"success"`
}

type SystemLog

type SystemLog struct {
	model.SystemLog
}

type SystemLogCreate

type SystemLogCreate struct {
	Name          string `json:"name"`
	Operation     string `json:"operation"`
	OperationInfo string `json:"operationInfo"`
}

type SystemRegistry

type SystemRegistry struct {
	model.SystemRegistry
	Status  string `json:"status"`
	Message string `json:"message"`
}

type SystemRegistryBatchOp

type SystemRegistryBatchOp struct {
	Operation string           `json:"operation" validate:"required"`
	Items     []SystemRegistry `json:"items" validate:"required"`
}

type SystemRegistryConn

type SystemRegistryConn struct {
	Hostname      string `json:"hostname" validate:"required"`
	Protocol      string `json:"protocol" validate:"required"`
	RepoPort      int    `json:"repoPort" validate:"required"`
	NexusUser     string `json:"nexusUser"`
	NexusPassword string `json:"nexusPassword"`
}

type SystemRegistryCreate

type SystemRegistryCreate struct {
	Hostname           string `json:"hostname" validate:"required"`
	Protocol           string `json:"protocol" validate:"required"`
	Architecture       string `json:"architecture" validate:"required"`
	RepoPort           int    `json:"repoPort" validate:"required"`
	RegistryPort       int    `json:"registryPort" validate:"required"`
	RegistryHostedPort int    `json:"registryHostedPort" validate:"required"`
	NexusUser          string `json:"nexusUser" validate:"required"`
	NexusPassword      string `json:"nexusPassword" validate:"required"`
}

type SystemRegistryDelete

type SystemRegistryDelete struct {
	Architecture string `json:"architecture" validate:"required"`
}

type SystemRegistryUpdate

type SystemRegistryUpdate struct {
	ID                 string `json:"id"`
	Hostname           string `json:"hostname"`
	Protocol           string `json:"protocol"`
	Architecture       string `json:"architecture"`
	RepoPort           int    `json:"repoPort"`
	RegistryPort       int    `json:"registryPort"`
	RegistryHostedPort int    `json:"registryHostedPort"`
}

type SystemSetting

type SystemSetting struct {
	model.SystemSetting
}

type SystemSettingCreate

type SystemSettingCreate struct {
	Vars map[string]string `json:"vars" validate:"required"`
	Tab  string            `json:"tab" validate:"required"`
}

type SystemSettingResult

type SystemSettingResult struct {
	Vars map[string]string `json:"vars" validate:"required"`
	Tab  string            `json:"tab" validate:"required"`
}

type SystemSettingUpdate

type SystemSettingUpdate struct {
	Vars map[string]string `json:"vars" validate:"required"`
	Tab  string            `json:"tab" validate:"required"`
}

type TaskLog

type TaskLog struct {
	model.TaskLog `json:"tasklogs"`
	Name          string `json:"name"`
}

type TemplateConfig

type TemplateConfig struct {
	model.TemplateConfig
	ConfigVars map[string]interface{} `json:"config"`
}

type TemplateConfigCreate

type TemplateConfigCreate struct {
	Name   string      `json:"name" validate:"required"`
	Type   string      `json:"type" validate:"required"`
	Config interface{} `json:"config" validate:"required"`
}

type Theme

type Theme struct {
	model.Theme
}

type UpdateRelationRequest

type UpdateRelationRequest struct {
	ClusterNames []string `json:"clusterNames"`
	Delete       bool     `json:"delete"`
}

type User

type User struct {
	model.User
	Role           string `json:"role"`
	Status         string `json:"status"`
	CurrentProject string `json:"currentProject"`
}

type UserChangePassword

type UserChangePassword struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Password string `json:"password"`
	Original string `json:"original"`
}

type UserCreate

type UserCreate struct {
	Name     string `json:"name" binding:"required"`
	Email    string `json:"email" binding:"required"`
	Password string `json:"password" binding:"required"`
	Role     string `json:"role" binding:"required"`
}

type UserForgotPassword

type UserForgotPassword struct {
	Username string `json:"username" binding:"required"`
	Email    string `json:"email" binding:"required"`
}

type UserMsgDTO

type UserMsgDTO struct {
	model.UserMsg
	Content interface{} `json:"content"`
	Type    string      `json:"type"`
}

type UserMsgResponse

type UserMsgResponse struct {
	Items  []UserMsgDTO `json:"items"`
	Unread int          `json:"unread"`
	Total  int          `json:"total"`
}

type UserOp

type UserOp struct {
	Operation string `json:"operation"`
	Items     []User `json:"items"`
}

type UserPage

type UserPage struct {
	Items []User `json:"items"`
	Total int    `json:"total"`
}

type UserSettingDTO

type UserSettingDTO struct {
	model.UserSetting
	MsgConfig interface{} `json:"msgConfig"`
}

func (UserSettingDTO) GetMsgConfig

func (u UserSettingDTO) GetMsgConfig() (string, error)

type UserUpdate

type UserUpdate struct {
	Email          string `json:"email"`
	Password       string `json:"password"`
	Role           string `json:"role"`
	Language       string `json:"language"`
	CurrentProject string `json:"currentProject"`
	Status         string `json:"status"`
}

type UsersAddResponse

type UsersAddResponse struct {
	Items []model.User `json:"items"`
}

type UsersResponse

type UsersResponse struct {
	Items []string `json:"items"`
}

type VeleroBackup

type VeleroBackup struct {
	Name                    string
	Cluster                 string
	IncludeNamespaces       []string
	ExcludeNamespaces       []string
	IncludeResources        []string
	ExcludeResources        []string
	IncludeClusterResources bool
	Labels                  string
	Selector                string
	Ttl                     string
	Schedule                string
	BackupName              string
}

type VeleroBackupList

type VeleroBackupList struct {
	Items []velero.VeleroBackup `json:"items"`
}

type VeleroInstall

type VeleroInstall struct {
	Cluster           string        `json:"cluster"`
	BackupAccountName string        `json:"backupAccountName"`
	ID                string        `json:"id"`
	Limits            ResourceQuota `json:"limits"`
	Requests          ResourceQuota `json:"requests"`
}

type VmConfig

type VmConfig struct {
	model.VmConfig
}

type VmConfigCreate

type VmConfigCreate struct {
	Name     string `json:"name" validate:"required"`
	Provider string `json:"provider"`
	Cpu      int    `json:"cpu" validate:"min=1,max=1000,required" en:"CPU" zh:"CPU"`
	Memory   int    `json:"memory"  validate:"min=1,max=1000,required" en:"Memory" zh:"内存"`
}

type VmConfigOp

type VmConfigOp struct {
	Operation string     `json:"operation"`
	Items     []VmConfig `json:"items"`
}

type VmConfigUpdate

type VmConfigUpdate struct {
	Name     string `json:"name"`
	Provider string `json:"provider"`
	Cpu      int    `json:"cpu" validate:"min=1,max=1000,required" en:"CPU" zh:"CPU"`
	Memory   int    `json:"memory" validate:"min=1,max=1000,required" en:"Memory" zh:"内存"`
}

type WebkubectlToken

type WebkubectlToken struct {
	Token string `json:"token"`
}

type WorkWeiXinConfig

type WorkWeiXinConfig struct {
	CorpID     string `json:"corpId"`
	AgentID    string `json:"agentId"`
	CorpSecret string `json:"corpSecret"`
	TestUser   string `json:"testUser"`
	Status     string `json:"status"`
}

type Zone

type Zone struct {
	model.Zone
	CloudVars      interface{} `json:"cloudVars"`
	RegionName     string      `json:"regionName"`
	Provider       string      `json:"provider"`
	IpPoolName     string      `json:"ipPoolName"`
	CredentialName string      `json:"credentialName"`
	IpPool         IpPool      `json:"ipPool"`
}

type ZoneCreate

type ZoneCreate struct {
	Name           string      `json:"name" validate:"required"`
	CloudVars      interface{} `json:"cloudVars" validate:"required"`
	RegionName     string      `json:"regionName" validate:"required"`
	IpPoolName     string      `json:"ipPoolName"`
	CredentialName string      `json:"credentialName"`
}

type ZoneOp

type ZoneOp struct {
	Operation string `json:"operation" validate:"required"`
	Items     []Zone `json:"items" validate:"required"`
}

type ZoneUpdate

type ZoneUpdate struct {
	ID             string      `json:"id" validate:"required"`
	Name           string      `json:"name" validate:"required"`
	CloudVars      interface{} `json:"cloudVars" validate:"required"`
	RegionID       string      `json:"regionID" validate:"required"`
	IpPoolName     string      `json:"ipPoolName" validate:"required"`
	CredentialName string      `json:"credentialName"`
}

type ZoneUpload

type ZoneUpload struct {
	Name string `json:"name" validate:"required"`
}

Jump to

Keyboard shortcuts

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