Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServiceNamePattern = errors.New("名称格式不符合要求,请重新填写") ErrServiceK8sDelete = errors.New("删除Service资源错误,请查询是否存在") ErrServiceK8sList = errors.New("获取Service资源列表错误,请查询是否存在") ErrServiceK8sGet = errors.New("获取Service资源错误,请查询是否存在") ErrServiceTplGet = errors.New("获取Service模版错误,请联系管理员") ErrServiceTplParse = errors.New("解析Service模版错误,请联系管理员") ErrServiceK8sCreate = errors.New("创建Service错误,可能已经存在") ErrServiceK8sUpdate = errors.New("更新Service错误,可能已经存在") ErrEndpointsTplGet = errors.New("获取Endpoints模版错误,请联系管理员") ErrEndpointsParse = errors.New("创建Endpoints错误,请联系管理员") ErrEndpointsK8sGet = errors.New("获取Endpoints错误,可能不存在") ErrEndpointsK8sCreate = errors.New("创建Endpoints错误,请联系管理员") ErrProjectGet = errors.New("项目可能不存在,无法与之关联") )
Functions ¶
Types ¶
type ResourceType ¶
type ResourceType string
const ( ServiceResourceType ResourceType = "service" EndpointResourceType ResourceType = "endpoint" )
type Service ¶
type Service interface { // 删除service Delete(ctx context.Context, svcName string) error // 查看service详情 Detail(ctx context.Context, svcName string) (map[string]interface{}, error) // Service 列表页 List(ctx context.Context, page, limit int) (res []*serviceList, err error) // 创建Service Create(ctx context.Context, req createRequest) (err error) // 更新service Update(ctx context.Context, req createRequest) (err error) // 创建service // Deprecated: 这个功能可以去掉 PostYaml(ctx context.Context, body []byte) error }
func NewService ¶
func NewService(logger log.Logger, k8sClient kubernetes.K8sClient, config *config.Config, store repository.Repository) Service
Click to show internal directories.
Click to hide internal directories.