repo

package
v0.0.0-...-0b4b916 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

ProviderSetRepo is data providers.

Functions

This section is empty.

Types

type ConfigMapRepo

type ConfigMapRepo struct {
	// contains filtered or unexported fields
}

SecretMap

func ProviderConfigMapRepo

func ProviderConfigMapRepo() *ConfigMapRepo

func (*ConfigMapRepo) Add

func (this *ConfigMapRepo) Add(item *corev1.ConfigMap)

func (*ConfigMapRepo) Delete

func (this *ConfigMapRepo) Delete(svc *corev1.ConfigMap)

func (*ConfigMapRepo) Get

func (this *ConfigMapRepo) Get(ns string, name string) *corev1.ConfigMap

func (*ConfigMapRepo) ListAll

func (this *ConfigMapRepo) ListAll(ns string) *result.ErrorResult

func (*ConfigMapRepo) OnAdd

func (this *ConfigMapRepo) OnAdd(obj interface{}, isInInitialList bool)

func (*ConfigMapRepo) OnDelete

func (this *ConfigMapRepo) OnDelete(obj interface{})

func (*ConfigMapRepo) OnUpdate

func (this *ConfigMapRepo) OnUpdate(oldObj, newObj interface{})

func (*ConfigMapRepo) Update

func (this *ConfigMapRepo) Update(item *corev1.ConfigMap) bool

返回值 是true 或false . true代表有值更新了, 否则返回false

type CoreV1ConfigMap

type CoreV1ConfigMap []*cm

func (CoreV1ConfigMap) Len

func (this CoreV1ConfigMap) Len() int

func (CoreV1ConfigMap) Less

func (this CoreV1ConfigMap) Less(i, j int) bool

func (CoreV1ConfigMap) Swap

func (this CoreV1ConfigMap) Swap(i, j int)

type CoreV1Secret

type CoreV1Secret []*corev1.Secret

func (CoreV1Secret) Len

func (this CoreV1Secret) Len() int

func (CoreV1Secret) Less

func (this CoreV1Secret) Less(i, j int) bool

func (CoreV1Secret) Swap

func (this CoreV1Secret) Swap(i, j int)

type DeploymentRepo

type DeploymentRepo struct {
	// contains filtered or unexported fields
}

func ProviderDeploymentRepo

func ProviderDeploymentRepo() *DeploymentRepo

func (*DeploymentRepo) Add

func (this *DeploymentRepo) Add(deployment *v1.Deployment)

func (*DeploymentRepo) Delete

func (this *DeploymentRepo) Delete(deployment *v1.Deployment)

func (*DeploymentRepo) GetAllDeployment

func (this *DeploymentRepo) GetAllDeployment() ([]*v1.Deployment, error)

func (*DeploymentRepo) GetDeploymentByName

func (this *DeploymentRepo) GetDeploymentByName(ns string, name string) (*v1.Deployment, error)

func (*DeploymentRepo) GetDeploymentsByNs

func (this *DeploymentRepo) GetDeploymentsByNs(ns string) ([]*v1.Deployment, error)

func (*DeploymentRepo) OnAdd

func (this *DeploymentRepo) OnAdd(obj interface{}, isInInitialList bool)

func (*DeploymentRepo) OnDelete

func (this *DeploymentRepo) OnDelete(obj interface{})

func (*DeploymentRepo) OnUpdate

func (this *DeploymentRepo) OnUpdate(oldObj, newObj interface{})

func (*DeploymentRepo) Update

func (this *DeploymentRepo) Update(deployment *v1.Deployment) error

type EventRepo

type EventRepo struct {
	// contains filtered or unexported fields
}

func ProviderEventRepo

func ProviderEventRepo() *EventRepo

func (*EventRepo) Delete

func (this *EventRepo) Delete(key string)

func (*EventRepo) GetMessage

func (this *EventRepo) GetMessage(ns string, kind string, name string) string

func (*EventRepo) OnAdd

func (this *EventRepo) OnAdd(obj interface{}, isInInitialList bool)

func (*EventRepo) OnDelete

func (this *EventRepo) OnDelete(obj interface{})

func (*EventRepo) OnUpdate

func (this *EventRepo) OnUpdate(oldObj, newObj interface{})

func (*EventRepo) Store

func (this *EventRepo) Store(key string, event *v1.Event)

type IUserGetterImpl

type IUserGetterImpl struct {
	// contains filtered or unexported fields
}

func (*IUserGetterImpl) CreateUser

func (this *IUserGetterImpl) CreateUser(user *UserModel.UserImpl) error

func (*IUserGetterImpl) DeleteUser

func (this *IUserGetterImpl) DeleteUser(id int) error

func (*IUserGetterImpl) FindUserAll

func (this *IUserGetterImpl) FindUserAll() []*UserModel.UserImpl

func (*IUserGetterImpl) FindUserByEmail

func (this *IUserGetterImpl) FindUserByEmail(email string) (*UserModel.UserImpl, error)

func (*IUserGetterImpl) FindUserById

func (this *IUserGetterImpl) FindUserById(id int64, user *UserModel.UserImpl) (*UserModel.UserImpl, error)

func (*IUserGetterImpl) FindUserByUsername

func (this *IUserGetterImpl) FindUserByUsername(username string) (*UserModel.UserImpl, error)

func (*IUserGetterImpl) UpdateUser

func (this *IUserGetterImpl) UpdateUser(id int, user *UserModel.UserImpl) error

type IUserRepo

type IUserRepo interface {
	FindUserAll() []*UserModel.UserImpl
	FindUserById(id int64, user *UserModel.UserImpl) (*UserModel.UserImpl, error)
	FindUserByUsername(username string) (*UserModel.UserImpl, error)
	FindUserByEmail(email string) (*UserModel.UserImpl, error)
	CreateUser(user *UserModel.UserImpl) error
	UpdateUser(id int, user *UserModel.UserImpl) error
	DeleteUser(id int) error
}

func NewIUserGetterImpl

func NewIUserGetterImpl(db *gorm.DB) IUserRepo

type NamespaceRepo

type NamespaceRepo struct {
	// contains filtered or unexported fields
}

func ProviderNamespaceRepo

func ProviderNamespaceRepo() *NamespaceRepo

func (*NamespaceRepo) Add

func (this *NamespaceRepo) Add(namespace *corev1.Namespace)

func (*NamespaceRepo) Delete

func (this *NamespaceRepo) Delete(namespace *corev1.Namespace)

func (*NamespaceRepo) GetAllNamespaces

func (this *NamespaceRepo) GetAllNamespaces() []string

func (*NamespaceRepo) GetNamespaceByName

func (this *NamespaceRepo) GetNamespaceByName(name string) (*corev1.Namespace, error)

func (*NamespaceRepo) OnAdd

func (this *NamespaceRepo) OnAdd(obj interface{}, isInInitialList bool)

func (*NamespaceRepo) OnDelete

func (this *NamespaceRepo) OnDelete(obj interface{})

func (*NamespaceRepo) OnUpdate

func (this *NamespaceRepo) OnUpdate(oldObj, newObj interface{})

func (*NamespaceRepo) Update

func (this *NamespaceRepo) Update(namespace *corev1.Namespace) error

type PodRepo

type PodRepo struct {
	// contains filtered or unexported fields
}

根据基本知识点,要实现自定义排序,需要实现sort.Interface接口的三个方法:Len()、Less()、Swap();

func ProviderPodRepo

func ProviderPodRepo() *PodRepo

func (*PodRepo) Add

func (this *PodRepo) Add(pod *corev1.Pod)

func (*PodRepo) Delete

func (this *PodRepo) Delete(pod *corev1.Pod)

func (*PodRepo) Get

func (this *PodRepo) Get(ns string, podName string) *corev1.Pod

func (*PodRepo) GetAllPods

func (this *PodRepo) GetAllPods() ([]*corev1.Pod, error)

func (*PodRepo) GetDetail

func (this *PodRepo) GetDetail(ns string, podName string) (*corev1.Pod, error)

func (*PodRepo) ListByLabel

func (this *PodRepo) ListByLabel(ns string, labels []map[string]string) ([]*corev1.Pod, error)

func (*PodRepo) OnAdd

func (this *PodRepo) OnAdd(obj interface{}, isInInitialList bool)

func (*PodRepo) OnDelete

func (this *PodRepo) OnDelete(obj interface{})

func (*PodRepo) OnUpdate

func (this *PodRepo) OnUpdate(oldObj, newObj interface{})

func (*PodRepo) Update

func (this *PodRepo) Update(pod *corev1.Pod) error

type RsRep

type RsRep struct {
	// contains filtered or unexported fields
}

func ProviderRsRep

func ProviderRsRep() *RsRep

func (*RsRep) Add

func (this *RsRep) Add(obj *v1.ReplicaSet)

func (*RsRep) Delete

func (this *RsRep) Delete(obj *v1.ReplicaSet)

func (*RsRep) OnAdd

func (this *RsRep) OnAdd(obj interface{}, isInInitialList bool)

func (*RsRep) OnDelete

func (this *RsRep) OnDelete(obj interface{})

func (*RsRep) OnUpdate

func (this *RsRep) OnUpdate(oldObj, newObj interface{})

func (*RsRep) RsByNs

func (this *RsRep) RsByNs(ns string) ([]*v1.ReplicaSet, error)

func (*RsRep) Update

func (this *RsRep) Update(obj *v1.ReplicaSet) error

type SecretRepo

type SecretRepo struct {
	// contains filtered or unexported fields
}

func ProvideSecretRepo

func ProvideSecretRepo() *SecretRepo

func (*SecretRepo) Add

func (this *SecretRepo) Add(item *corev1.Secret)

func (*SecretRepo) Delete

func (this *SecretRepo) Delete(svc *corev1.Secret)

func (*SecretRepo) Get

func (this *SecretRepo) Get(ns string, name string) *corev1.Secret

func (*SecretRepo) ListAll

func (this *SecretRepo) ListAll() []*corev1.Secret

func (*SecretRepo) ListAllByNs

func (this *SecretRepo) ListAllByNs(ns string) []*corev1.Secret

func (*SecretRepo) OnAdd

func (this *SecretRepo) OnAdd(obj interface{}, isInInitialList bool)

func (*SecretRepo) OnDelete

func (this *SecretRepo) OnDelete(obj interface{})

func (*SecretRepo) OnUpdate

func (this *SecretRepo) OnUpdate(oldObj, newObj interface{})

func (*SecretRepo) Update

func (this *SecretRepo) Update(item *corev1.Secret) error

Jump to

Keyboard shortcuts

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