service

package
v0.0.0-...-684cc1f Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IRouteDataService

type IRouteDataService interface {
	AddRoute(*model.Route) (int64, error)
	DeleteRoute(int64) error
	UpdateRoute(*model.Route) error
	FindRouteByID(int64) (*model.Route, error)
	FindAllRoute() ([]model.Route, error)

	CreateRouteToK8s(*route.RouteInfo) error
	DeleteRouteFromK8s(*model.Route) error
	UpdateRouteToK8s(*route.RouteInfo) error
}

这里是接口类型

func NewRouteDataService

func NewRouteDataService(routeRepository repository.IRouteRepository, clientSet *kubernetes.Clientset) IRouteDataService

创建 注意:返回值 IRouteDataService 接口类型

type RouteDataService

type RouteDataService struct {
	//注意:这里是 IRouteRepository 类型
	RouteRepository repository.IRouteRepository
	K8sClientSet    *kubernetes.Clientset
	// contains filtered or unexported fields
}

func (*RouteDataService) AddRoute

func (u *RouteDataService) AddRoute(route *model.Route) (int64, error)

插入

func (*RouteDataService) CreateRouteToK8s

func (u *RouteDataService) CreateRouteToK8s(info *route.RouteInfo) (err error)

创建k8s(把proto 属性补全)

func (*RouteDataService) DeleteRoute

func (u *RouteDataService) DeleteRoute(routeID int64) error

删除

func (*RouteDataService) DeleteRouteFromK8s

func (u *RouteDataService) DeleteRouteFromK8s(route2 *model.Route) (err error)

func (*RouteDataService) FindAllRoute

func (u *RouteDataService) FindAllRoute() ([]model.Route, error)

查找

func (*RouteDataService) FindRouteByID

func (u *RouteDataService) FindRouteByID(routeID int64) (*model.Route, error)

查找

func (*RouteDataService) UpdateRoute

func (u *RouteDataService) UpdateRoute(route *model.Route) error

更新

func (*RouteDataService) UpdateRouteToK8s

func (u *RouteDataService) UpdateRouteToK8s(info *route.RouteInfo) (err error)

更新route

Jump to

Keyboard shortcuts

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