Documentation
¶
Index ¶
- type AdvancedConfig
- type CleanConfig
- type Client
- func (c *Client) AddLocalCluster() error
- func (c *Client) CancelWorkflowTaskV4(userName, workflowName string, taskID int64) error
- func (c *Client) ClearSharedStorage() error
- func (c *Client) CreateWorkflowTaskV4(req *CreateWorkflowTaskV4Req) (*CreateTaskV4Resp, error)
- func (c *Client) DockerClean() error
- func (c *Client) GetClusterInfo(clusterID string) (*ClusterDetail, error)
- func (c *Client) GetContainerLog(envName, projectName, container, pod string, tailLines int64) (string, error)
- func (c *Client) GetDefaultLogin() (*GetDefaultLoginResp, error)
- func (c *Client) GetDockerCleanConfig() (*CleanConfig, error)
- func (c *Client) GetEnvironment(envName, projectName string) (*Environment, error)
- func (c *Client) GetLocalCluster() (*clusterResp, error)
- func (c *Client) GetServiceDetail(projectName, serviceName, envName string) (*ServiceDetail, error)
- func (c *Client) GetSystemSecurityAndPrivacySettings() (*SystemSetting, error)
- func (c *Client) GetTextFromEncryptedKey(encryptedKey string) (*GetAesKeyFromEncryptedKeyResp, error)
- func (c *Client) GetWorkflowConcurrencySetting() (*workflowConcurrencySettingResp, error)
- func (c *Client) Healthz() error
- func (c *Client) InitializeUser(username, password, email string) error
- func (c *Client) ListEnvironments(projectName string) ([]*Environment, error)
- func (c *Client) ListRegistries() ([]*RegistryInfo, error)
- func (c *Client) ListTestTaskStats(log *zap.SugaredLogger) ([]*TestTaskStat, error)
- func (c *Client) ListTestings(log *zap.SugaredLogger) ([]*Testing, error)
- func (c *Client) PatchWorkload(projectName, envName, serviceName, devImage string) (*types.WorkloadInfo, error)
- func (c *Client) RecoverWorkload(projectName, envName, serviceName string) error
- type ClusterDetail
- type Container
- type ContainerImage
- type CreateTaskV4Resp
- type CreateWorkflowTaskV4Req
- type Environment
- type ErrorMessage
- type GetAesKeyFromEncryptedKeyResp
- type GetDefaultLoginResp
- type Pod
- type RegistryAdvancedSetting
- type RegistryInfo
- type RenderInfo
- type RenderKV
- type Service
- type ServiceDetail
- type ServiceStatus
- type ServicesResp
- type SystemSetting
- type TestTaskStat
- type Testing
- type Workload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvancedConfig ¶
type AdvancedConfig struct {
Strategy string `json:"strategy,omitempty" bson:"strategy,omitempty"`
ProjectNames []string `json:"-" bson:"-"`
Tolerations string `json:"tolerations" bson:"tolerations"`
ClusterAccessYaml string `json:"cluster_access_yaml" bson:"cluster_access_yaml"`
ScheduleWorkflow bool `json:"schedule_workflow" bson:"schedule_workflow"`
}
type CleanConfig ¶
type Client ¶
type Client struct {
*httpclient.Client
// contains filtered or unexported fields
}
func NewExternal ¶
func (*Client) AddLocalCluster ¶
func (*Client) CancelWorkflowTaskV4 ¶
func (*Client) ClearSharedStorage ¶
func (*Client) CreateWorkflowTaskV4 ¶
func (c *Client) CreateWorkflowTaskV4(req *CreateWorkflowTaskV4Req) (*CreateTaskV4Resp, error)
func (*Client) DockerClean ¶
func (*Client) GetClusterInfo ¶
func (c *Client) GetClusterInfo(clusterID string) (*ClusterDetail, error)
func (*Client) GetContainerLog ¶
func (*Client) GetDefaultLogin ¶
func (c *Client) GetDefaultLogin() (*GetDefaultLoginResp, error)
func (*Client) GetDockerCleanConfig ¶
func (c *Client) GetDockerCleanConfig() (*CleanConfig, error)
func (*Client) GetEnvironment ¶
func (c *Client) GetEnvironment(envName, projectName string) (*Environment, error)
func (*Client) GetLocalCluster ¶
func (*Client) GetServiceDetail ¶
func (c *Client) GetServiceDetail(projectName, serviceName, envName string) (*ServiceDetail, error)
func (*Client) GetSystemSecurityAndPrivacySettings ¶
func (c *Client) GetSystemSecurityAndPrivacySettings() (*SystemSetting, error)
func (*Client) GetTextFromEncryptedKey ¶
func (c *Client) GetTextFromEncryptedKey(encryptedKey string) (*GetAesKeyFromEncryptedKeyResp, error)
func (*Client) GetWorkflowConcurrencySetting ¶
func (*Client) InitializeUser ¶
func (*Client) ListEnvironments ¶
func (c *Client) ListEnvironments(projectName string) ([]*Environment, error)
func (*Client) ListRegistries ¶
func (c *Client) ListRegistries() ([]*RegistryInfo, error)
func (*Client) ListTestTaskStats ¶
func (c *Client) ListTestTaskStats(log *zap.SugaredLogger) ([]*TestTaskStat, error)
func (*Client) ListTestings ¶
func (c *Client) ListTestings(log *zap.SugaredLogger) ([]*Testing, error)
func (*Client) PatchWorkload ¶
func (c *Client) PatchWorkload(projectName, envName, serviceName, devImage string) (*types.WorkloadInfo, error)
func (*Client) RecoverWorkload ¶
type ClusterDetail ¶
type ClusterDetail struct {
ID primitive.ObjectID `json:"id,omitempty" bson:"_id,omitempty"`
Name string `json:"name" bson:"name"`
Tags []string `json:"tags" bson:"tags"`
Description string `json:"description" bson:"description"`
Status setting.K8SClusterStatus `json:"status" bson:"status"`
Error string `json:"error" bson:"error"`
Yaml string `json:"yaml" bson:"yaml"`
Production bool `json:"production" bson:"production"`
CreatedAt int64 `json:"createdAt" bson:"createdAt"`
CreatedBy string `json:"createdBy" bson:"createdBy"`
Disconnected bool `json:"-" bson:"disconnected"`
Token string `json:"token" bson:"-"`
Provider int8 `json:"provider" bson:"provider"`
Local bool `json:"local" bson:"local"`
Cache types.Cache `json:"cache" bson:"cache"`
// new field in 1.14, intended to enable kubeconfig for cluster management
Type string `json:"type" bson:"type"` // either agent or kubeconfig supported
KubeConfig string `json:"kube_config" bson:"kube_config"`
// Deprecated field, it should be deleted in version 1.15 since no more namespace settings is used
Namespace string `json:"namespace" bson:"namespace"`
AdvancedConfig *AdvancedConfig `json:"advanced_config" bson:"advanced_config"`
}
type Container ¶
type Container struct {
Name string `json:"name"`
Image string `json:"image"`
RestartCount int32 `json:"restart_count"`
Status string `json:"status"`
Message string `json:"message"`
Reason string `json:"reason"`
StartedAt int64 `json:"started_at,omitempty"`
FinishedAt int64 `json:"finished_at,omitempty"`
}
type ContainerImage ¶
type CreateTaskV4Resp ¶
type CreateWorkflowTaskV4Req ¶
type CreateWorkflowTaskV4Req struct {
Workflow *models.WorkflowV4
UserName string
}
type Environment ¶
type Environment struct {
ID string `json:"id"`
ProductName string `json:"product_name"`
Namespace string `json:"namespace"`
Status string `json:"status"`
Error string `json:"error"`
EnvName string `json:"env_name"`
UpdateBy string `json:"update_by"`
UpdateTime int `json:"update_time"`
Services [][]string `json:"services"`
Render *RenderInfo `json:"render"`
Vars []*RenderKV `json:"vars,omitempty"`
IsPublic bool `json:"IsPublic"`
ClusterID string `json:"cluster_id,omitempty"`
RecycleDay int `json:"recycle_day"`
IsProd bool `json:"is_prod"`
Source string `json:"source"`
}
type ErrorMessage ¶
type GetAesKeyFromEncryptedKeyResp ¶
type GetAesKeyFromEncryptedKeyResp struct {
PlainText string `json:"plain_text"`
}
type GetDefaultLoginResp ¶
type GetDefaultLoginResp struct {
DefaultLogin string `json:"default_login"`
}
type RegistryAdvancedSetting ¶
type RegistryInfo ¶
type RegistryInfo struct {
ID primitive.ObjectID `json:"id,omitempty"`
RegAddr string `json:"reg_addr"`
AdvancedSetting *RegistryAdvancedSetting `json:"advanced_setting"`
}
type RenderInfo ¶
type ServiceDetail ¶
type ServiceStatus ¶
type ServicesResp ¶
type ServicesResp struct {
Services []*Service `json:"services"`
}
type SystemSetting ¶
type TestTaskStat ¶
Click to show internal directories.
Click to hide internal directories.