service

package
v0.0.0-...-a7198d8 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 17 Imported by: 0

README

Service

业务逻辑层说明

当业务逻辑较多并且复杂时可以在 service 目录下划分二级目录,例如:

  • service/order
  • service/payment

文件说明

为了加以区分,httpservice 的实现方式和 grpcserver 实现方式根据文件后缀进行区分

  • _svc.go 结尾的为 http 服务的 service 实现
  • _grpc_svc.go 结尾的为 grpcserver 实现

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is service providers.

Functions

This section is empty.

Types

type GreeterService

type GreeterService interface {
	Hello(ctx context.Context, name string) (string, error)
}

GreeterService define a interface

func NewGreeterService

func NewGreeterService(repo repository.UserRepo) GreeterService

NewGreeterService create a service

type UserServiceServer

type UserServiceServer struct {
	pb.UnimplementedUserServiceServer
	// contains filtered or unexported fields
}

func NewUserServiceServer

func NewUserServiceServer(repo repository.UserRepo) *UserServiceServer

func (*UserServiceServer) BatchGetUsers

func (*UserServiceServer) CreateUser

func (*UserServiceServer) GetUser

func (*UserServiceServer) Login

func (*UserServiceServer) Logout

func (*UserServiceServer) Register

func (*UserServiceServer) UpdatePassword

func (*UserServiceServer) UpdateUser

Jump to

Keyboard shortcuts

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