Documentation ¶
Index ¶
- type IRouteDataService
- type RouteDataService
- func (u *RouteDataService) AddRoute(route *model.Route) (int64, error)
- func (u *RouteDataService) CreateRouteToK8s(info *route.RouteInfo) (err error)
- func (u *RouteDataService) DeleteRoute(routeID int64) error
- func (u *RouteDataService) DeleteRouteFromK8s(route2 *model.Route) (err error)
- func (u *RouteDataService) FindAllRoute() ([]model.Route, error)
- func (u *RouteDataService) FindRouteByID(routeID int64) (*model.Route, error)
- func (u *RouteDataService) UpdateRoute(route *model.Route) error
- func (u *RouteDataService) UpdateRouteToK8s(info *route.RouteInfo) (err error)
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
Click to show internal directories.
Click to hide internal directories.