Documentation ¶
Index ¶
- type IMiddleTypeDataService
- type IMiddlewareDataService
- type MiddleTypeDataService
- func (u *MiddleTypeDataService) AddMiddleType(middleType *model.MiddleType) (int64, error)
- func (u *MiddleTypeDataService) DeleteMiddleType(middleTypeID int64) error
- func (u *MiddleTypeDataService) FindAllMiddleType() ([]model.MiddleType, error)
- func (u *MiddleTypeDataService) FindAllVersionByTypeID(middleTypeID int64) ([]model.MiddleVersion, error)
- func (u *MiddleTypeDataService) FindImageVersionByID(middleVersionID int64) (string, error)
- func (u *MiddleTypeDataService) FindMiddleTypeByID(middleTypeID int64) (*model.MiddleType, error)
- func (u *MiddleTypeDataService) FindVersionByID(middleVersionID int64) (*model.MiddleVersion, error)
- func (u *MiddleTypeDataService) UpdateMiddleType(middleType *model.MiddleType) error
- type MiddlewareDataService
- func (u *MiddlewareDataService) AddMiddleware(middleware *model.Middleware) (int64, error)
- func (u *MiddlewareDataService) CreateToK8s(info *middleware.MiddlewareInfo) error
- func (u *MiddlewareDataService) DeleteFromK8s(middleware *model.Middleware) (err error)
- func (u *MiddlewareDataService) DeleteMiddleware(middlewareID int64) error
- func (u *MiddlewareDataService) FindAllMiddleware() ([]model.Middleware, error)
- func (u *MiddlewareDataService) FindAllMiddlewareByTypeID(typeID int64) ([]model.Middleware, error)
- func (u *MiddlewareDataService) FindMiddlewareByID(middlewareID int64) (*model.Middleware, error)
- func (u *MiddlewareDataService) UpdateMiddleware(middleware *model.Middleware) error
- func (u *MiddlewareDataService) UpdateToK8s(info *middleware.MiddlewareInfo) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMiddleTypeDataService ¶
type IMiddleTypeDataService interface { AddMiddleType(*model.MiddleType) (int64, error) DeleteMiddleType(int64) error UpdateMiddleType(*model.MiddleType) error FindMiddleTypeByID(int64) (*model.MiddleType, error) FindAllMiddleType() ([]model.MiddleType, error) //根据ID返回地址 FindImageVersionByID(int64) (string, error) FindVersionByID(int64) (*model.MiddleVersion, error) FindAllVersionByTypeID(int64) ([]model.MiddleVersion, error) }
定义接口类型
func NewMiddleTypeDataService ¶
func NewMiddleTypeDataService(repository repository.IMiddleTypeRepository) IMiddleTypeDataService
注意:返回值的类型
type IMiddlewareDataService ¶
type IMiddlewareDataService interface { AddMiddleware(*model.Middleware) (int64, error) DeleteMiddleware(int64) error UpdateMiddleware(*model.Middleware) error FindMiddlewareByID(int64) (*model.Middleware, error) FindAllMiddleware() ([]model.Middleware, error) //根据类型查找中间件 FindAllMiddlewareByTypeID(int64) ([]model.Middleware, error) //操作中间件s CreateToK8s(*middleware.MiddlewareInfo) error DeleteFromK8s(*model.Middleware) error UpdateToK8s(*middleware.MiddlewareInfo) error }
这里是接口类型
func NewMiddlewareDataService ¶
func NewMiddlewareDataService(middlewareRepository repository.IMiddlewareRepository, clientSet *kubernetes.Clientset) IMiddlewareDataService
创建 注意:返回值 IMiddlewareDataService 接口类型
type MiddleTypeDataService ¶
type MiddleTypeDataService struct {
MiddleTypeRepository repository.IMiddleTypeRepository
}
func (*MiddleTypeDataService) AddMiddleType ¶
func (u *MiddleTypeDataService) AddMiddleType(middleType *model.MiddleType) (int64, error)
插入
func (*MiddleTypeDataService) DeleteMiddleType ¶
func (u *MiddleTypeDataService) DeleteMiddleType(middleTypeID int64) error
删除
func (*MiddleTypeDataService) FindAllMiddleType ¶
func (u *MiddleTypeDataService) FindAllMiddleType() ([]model.MiddleType, error)
查找所有
func (*MiddleTypeDataService) FindAllVersionByTypeID ¶
func (u *MiddleTypeDataService) FindAllVersionByTypeID(middleTypeID int64) ([]model.MiddleVersion, error)
根据中间件类型查找对应的所有版本
func (*MiddleTypeDataService) FindImageVersionByID ¶
func (u *MiddleTypeDataService) FindImageVersionByID(middleVersionID int64) (string, error)
根据version ID查找镜像地址
func (*MiddleTypeDataService) FindMiddleTypeByID ¶
func (u *MiddleTypeDataService) FindMiddleTypeByID(middleTypeID int64) (*model.MiddleType, error)
查找
func (*MiddleTypeDataService) FindVersionByID ¶
func (u *MiddleTypeDataService) FindVersionByID(middleVersionID int64) (*model.MiddleVersion, error)
根据versionID 查找单个镜像
func (*MiddleTypeDataService) UpdateMiddleType ¶
func (u *MiddleTypeDataService) UpdateMiddleType(middleType *model.MiddleType) error
更新
type MiddlewareDataService ¶
type MiddlewareDataService struct { //注意:这里是 IMiddlewareRepository 类型 MiddlewareRepository repository.IMiddlewareRepository K8sClientSet *kubernetes.Clientset }
func (*MiddlewareDataService) AddMiddleware ¶
func (u *MiddlewareDataService) AddMiddleware(middleware *model.Middleware) (int64, error)
插入
func (*MiddlewareDataService) CreateToK8s ¶
func (u *MiddlewareDataService) CreateToK8s(info *middleware.MiddlewareInfo) error
在k8s中创建中间件
func (*MiddlewareDataService) DeleteFromK8s ¶
func (u *MiddlewareDataService) DeleteFromK8s(middleware *model.Middleware) (err error)
删除中间件
func (*MiddlewareDataService) DeleteMiddleware ¶
func (u *MiddlewareDataService) DeleteMiddleware(middlewareID int64) error
删除
func (*MiddlewareDataService) FindAllMiddleware ¶
func (u *MiddlewareDataService) FindAllMiddleware() ([]model.Middleware, error)
查找
func (*MiddlewareDataService) FindAllMiddlewareByTypeID ¶
func (u *MiddlewareDataService) FindAllMiddlewareByTypeID(typeID int64) ([]model.Middleware, error)
func (*MiddlewareDataService) FindMiddlewareByID ¶
func (u *MiddlewareDataService) FindMiddlewareByID(middlewareID int64) (*model.Middleware, error)
查找
func (*MiddlewareDataService) UpdateMiddleware ¶
func (u *MiddlewareDataService) UpdateMiddleware(middleware *model.Middleware) error
更新
func (*MiddlewareDataService) UpdateToK8s ¶
func (u *MiddlewareDataService) UpdateToK8s(info *middleware.MiddlewareInfo) error
更新中间件到k8s
Click to show internal directories.
Click to hide internal directories.