Documentation
¶
Index ¶
- Variables
- func DeletePod(ns string, podName string) (bool, error)
- func GetDeploymentCondition(dep *v1.Deployment) string
- func GetDeploymentIsComplete(dep *v1.Deployment) bool
- func GetImages(dep v1.Deployment) string
- func GetImagesByPod(container []corev1.Container) string
- func GetLabels(m map[string]string) string
- func GetPodIsReady(pod corev1.Pod) bool
- func GetPodMessage(pod corev1.Pod) string
- func GetrslablebydeploymentListWatch(dep v1.Deployment, rslist []*v1.ReplicaSet) ([]map[string]string, error)
- func IncreaseReplicas(ns string, dep string, dec bool) (bool, error)
- func IsCurrentRsByDep(dep v1.Deployment, set v1.ReplicaSet) bool
- func IsRsFromDep(dep v1.Deployment, set v1.ReplicaSet) bool
- func RenderPods(pods []*corev1.Pod) []*PodModel2.PodImpl
- type ConfigmapService
- type DeploymentService
- func (this *DeploymentService) DeletePod(ns string, pod string) *result.ErrorResult
- func (this *DeploymentService) GetDeploymentDetailByNsDName(ns string, dname string) *result.ErrorResult
- func (this *DeploymentService) GetDeploymentsByNs(ns string) *result.ErrorResult
- func (this *DeploymentService) GetDeploymentsByNs2(ns string) (interface{}, error)
- func (this *DeploymentService) GetNs() *result.ErrorResult
- func (this *DeploymentService) GetPodContainer(ns string, podName string) *result.ErrorResult
- func (this *DeploymentService) GetPodDetail(ns string, pod string) *result.ErrorResult
- func (this *DeploymentService) GetPodJson(ns string, pod string) *result.ErrorResult
- func (this *DeploymentService) GetPodLogs(c *gin.Context, ns string, podname string, cname string) *result.ErrorResult
- func (this *DeploymentService) GetPods(ns string, dname string) *result.ErrorResult
- func (this *DeploymentService) GetPodsByDep(dep v1.Deployment, ns string, dname string) []*PodModel2.PodImpl
- func (this *DeploymentService) IncrReplicas(ns string, dep string, dec bool) *result.ErrorResult
- func (this *DeploymentService) ListPodsByLabels(ns string, labels []map[string]string) []*PodModel2.PodImpl
- type IDeployment
- type ISecret
- type IUser
- type IUserServiceGetterImpl
- func (this *IUserServiceGetterImpl) CreateUser(user *UserModel.UserImpl) *result.ErrorResult
- func (this *IUserServiceGetterImpl) DeleteUser(id int) *result.ErrorResult
- func (this *IUserServiceGetterImpl) GetUserDetail(id int64) *result.ErrorResult
- func (this *IUserServiceGetterImpl) GetUserList() []*UserModel.UserImpl
- func (this *IUserServiceGetterImpl) SignIn(username string, password string) (*UserModel.UserImpl, error)
- func (this *IUserServiceGetterImpl) SignUp(email string, username string, password string) error
- func (this *IUserServiceGetterImpl) UpdateUser(id int, user *UserModel.UserImpl) *result.ErrorResult
- type PodService
- type SecretService
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSetService = wire.NewSet( NewUserServiceImpl, NewSecretService, ProviderPodService, ProviderConfigmapService, ProviderDeploymentService, )
Functions ¶
func GetDeploymentCondition ¶
func GetDeploymentCondition(dep *v1.Deployment) string
func GetDeploymentIsComplete ¶
func GetDeploymentIsComplete(dep *v1.Deployment) bool
func GetImages ¶
func GetImages(dep v1.Deployment) string
func GetImagesByPod ¶
func GetPodIsReady ¶
func GetPodMessage ¶
func GetrslablebydeploymentListWatch ¶
func GetrslablebydeploymentListWatch(dep v1.Deployment, rslist []*v1.ReplicaSet) ([]map[string]string, error)
取出跟dep match的所有 rs,而不是最新的。 解决 2/1/1的问题;
func IsCurrentRsByDep ¶
func IsCurrentRsByDep(dep v1.Deployment, set v1.ReplicaSet) bool
func IsRsFromDep ¶
func IsRsFromDep(dep v1.Deployment, set v1.ReplicaSet) bool
判断 rs 是否属于某个dep,而不是判断它是最新的。 因此,得调用这个,才能解决 2/1/1的问题;
Types ¶
type ConfigmapService ¶
type ConfigmapService struct {
// contains filtered or unexported fields
}
func ProviderConfigmapService ¶
func ProviderConfigmapService(configmapRepo *repo.ConfigMapRepo) *ConfigmapService
func (*ConfigmapService) GetAll ¶
func (this *ConfigmapService) GetAll(ns string) *result.ErrorResult
type DeploymentService ¶
type DeploymentService struct {
// contains filtered or unexported fields
}
func ProviderDeploymentService ¶
func ProviderDeploymentService(rsRepo *repo.RsRep, podRepo *repo.PodRepo, deploymentRepo *repo.DeploymentRepo, nsRepo *repo.NamespaceRepo, podService *PodService) *DeploymentService
func (*DeploymentService) DeletePod ¶
func (this *DeploymentService) DeletePod(ns string, pod string) *result.ErrorResult
func (*DeploymentService) GetDeploymentDetailByNsDName ¶
func (this *DeploymentService) GetDeploymentDetailByNsDName(ns string, dname string) *result.ErrorResult
func (*DeploymentService) GetDeploymentsByNs ¶
func (this *DeploymentService) GetDeploymentsByNs(ns string) *result.ErrorResult
func (*DeploymentService) GetDeploymentsByNs2 ¶
func (this *DeploymentService) GetDeploymentsByNs2(ns string) (interface{}, error)
func (*DeploymentService) GetNs ¶
func (this *DeploymentService) GetNs() *result.ErrorResult
func (*DeploymentService) GetPodContainer ¶
func (this *DeploymentService) GetPodContainer(ns string, podName string) *result.ErrorResult
func (*DeploymentService) GetPodDetail ¶
func (this *DeploymentService) GetPodDetail(ns string, pod string) *result.ErrorResult
func (*DeploymentService) GetPodJson ¶
func (this *DeploymentService) GetPodJson(ns string, pod string) *result.ErrorResult
func (*DeploymentService) GetPodLogs ¶
func (this *DeploymentService) GetPodLogs(c *gin.Context, ns string, podname string, cname string) *result.ErrorResult
func (*DeploymentService) GetPods ¶
func (this *DeploymentService) GetPods(ns string, dname string) *result.ErrorResult
func (*DeploymentService) GetPodsByDep ¶
func (this *DeploymentService) GetPodsByDep(dep v1.Deployment, ns string, dname string) []*PodModel2.PodImpl
func (*DeploymentService) IncrReplicas ¶
func (this *DeploymentService) IncrReplicas(ns string, dep string, dec bool) *result.ErrorResult
func (*DeploymentService) ListPodsByLabels ¶
type IDeployment ¶
type IDeployment interface {
GetDeploymentsByNs(ns string) *result.ErrorResult
GetDeploymentsByNs2(ns string) (interface{}, error)
IncrReplicas(ns string, dep string, dec bool) *result.ErrorResult
GetDeploymentDetailByNsDName(ns string, dep string) *result.ErrorResult
GetPods(ns string, dep string) *result.ErrorResult
GetPodJson(ns string, pod string) *result.ErrorResult
GetPodDetail(ns string, pod string) *result.ErrorResult
DeletePod(ns string, pod string) *result.ErrorResult
GetNs() *result.ErrorResult
GetPodLogs(c *gin.Context, ns string, pod string, cname string) *result.ErrorResult
GetPodContainer(ns string, podName string) *result.ErrorResult
}
type ISecret ¶
type ISecret interface {
GetSecretByNs(ns string) *result.ErrorResult
PostSecret(secret *SecretModel.PostSecretModel, c *gin.Context) *result.ErrorResult
}
func NewSecretService ¶
func NewSecretService(secretRepo *repo.SecretRepo) ISecret
type IUser ¶
type IUser interface {
GetUserList() []*UserModel.UserImpl
GetUserDetail(id int64) *result.ErrorResult
CreateUser(user *UserModel.UserImpl) *result.ErrorResult
UpdateUser(id int, user *UserModel.UserImpl) *result.ErrorResult
DeleteUser(id int) *result.ErrorResult
SignIn(username string, password string) (*UserModel.UserImpl, error)
SignUp(email string, username string, password string) error
}
type IUserServiceGetterImpl ¶
type IUserServiceGetterImpl struct {
// contains filtered or unexported fields
}
func NewUserServiceImpl ¶
func NewUserServiceImpl(userRepo repo.IUserRepo) *IUserServiceGetterImpl
func (*IUserServiceGetterImpl) CreateUser ¶
func (this *IUserServiceGetterImpl) CreateUser(user *UserModel.UserImpl) *result.ErrorResult
func (*IUserServiceGetterImpl) DeleteUser ¶
func (this *IUserServiceGetterImpl) DeleteUser(id int) *result.ErrorResult
func (*IUserServiceGetterImpl) GetUserDetail ¶
func (this *IUserServiceGetterImpl) GetUserDetail(id int64) *result.ErrorResult
func (*IUserServiceGetterImpl) GetUserList ¶
func (this *IUserServiceGetterImpl) GetUserList() []*UserModel.UserImpl
func (*IUserServiceGetterImpl) SignUp ¶
func (this *IUserServiceGetterImpl) SignUp(email string, username string, password string) error
func (*IUserServiceGetterImpl) UpdateUser ¶
func (this *IUserServiceGetterImpl) UpdateUser(id int, user *UserModel.UserImpl) *result.ErrorResult
type PodService ¶
type PodService struct {
// contains filtered or unexported fields
}
func ProviderPodService ¶
func ProviderPodService(podRepo *repo.PodRepo) *PodService
func (*PodService) GetPodContainer ¶
func (this *PodService) GetPodContainer(ns, podname string) []*model.ContainerModel
type SecretService ¶
type SecretService struct {
// contains filtered or unexported fields
}
func (*SecretService) GetSecretByNs ¶
func (this *SecretService) GetSecretByNs(ns string) *result.ErrorResult
func (*SecretService) PostSecret ¶
func (this *SecretService) PostSecret(secret *SecretModel.PostSecretModel, c *gin.Context) *result.ErrorResult
Click to show internal directories.
Click to hide internal directories.