service

package
v0.0.0-...-6fd52d9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 9 Imported by: 0

README

Service

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is service providers.

Functions

This section is empty.

Types

type GreeterService

type GreeterService struct {
	v1.UnimplementedGreeterServer
	// contains filtered or unexported fields
}

GreeterService is a greeter service.

func NewGreeterService

func NewGreeterService(uc *biz.GreeterUsecase) *GreeterService

NewGreeterService new a greeter service.

func (*GreeterService) SayHello

func (s *GreeterService) SayHello(ctx context.Context, in *v1.HelloRequest) (*v1.HelloReply, error)

SayHello implements helloworld.GreeterServer.

type IPodDataService

type IPodDataService interface {
	AddPod(*model.Pod) (int64, error)
	DeletePod(int64) error
	UpdatePod(*model.Pod) error
	FindPodByID(int64) (*model.Pod, error)
	FindAllPod() ([]model.Pod, error)
	CreateToK8s(*pb.PodInfo) error
	DeleteFromK8s(*model.Pod) error
	UpdateToK8s(*pb.PodInfo) error
}

type PodService

type PodService struct {
	pb.UnimplementedPodServer
	// contains filtered or unexported fields
}

func NewPodService

func NewPodService(pu *biz.PodUsecase, logger log.Logger) *PodService

func (*PodService) AddPod

func (s *PodService) AddPod(ctx context.Context, req *pb.PodInfo) (*pb.Response, error)

AddPod 创建pod

func (*PodService) DeletePod

func (s *PodService) DeletePod(ctx context.Context, req *pb.PodId) (*pb.Response, error)

DeletePod 删除pod和数据库中的数据

func (*PodService) FindAllPod

func (s *PodService) FindAllPod(ctx context.Context, req *pb.FindAll) (*pb.AllPod, error)

func (*PodService) FindPodByID

func (s *PodService) FindPodByID(ctx context.Context, req *pb.PodId) (*pb.PodInfo, error)

FindPodByID 查询单个信息

func (*PodService) UpdatePod

func (s *PodService) UpdatePod(ctx context.Context, req *pb.PodInfo) (*pb.Response, error)

UpdatePod 更新指定pod

Jump to

Keyboard shortcuts

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