backup

package
v0.0.0-...-a9153d3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package backup is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	CampusBackupService_GetPersonInfo_FullMethodName    = "/campusapis.backup.CampusBackupService/GetPersonInfo"
	CampusBackupService_GetStudentInfo_FullMethodName   = "/campusapis.backup.CampusBackupService/GetStudentInfo"
	CampusBackupService_GetStudentGrade_FullMethodName  = "/campusapis.backup.CampusBackupService/GetStudentGrade"
	CampusBackupService_GetStudentExam_FullMethodName   = "/campusapis.backup.CampusBackupService/GetStudentExam"
	CampusBackupService_GetScheduleNowV2_FullMethodName = "/campusapis.backup.CampusBackupService/GetScheduleNowV2"
)

Variables

View Source
var CampusBackupService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "campusapis.backup.CampusBackupService",
	HandlerType: (*CampusBackupServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPersonInfo",
			Handler:    _CampusBackupService_GetPersonInfo_Handler,
		},
		{
			MethodName: "GetStudentInfo",
			Handler:    _CampusBackupService_GetStudentInfo_Handler,
		},
		{
			MethodName: "GetStudentGrade",
			Handler:    _CampusBackupService_GetStudentGrade_Handler,
		},
		{
			MethodName: "GetStudentExam",
			Handler:    _CampusBackupService_GetStudentExam_Handler,
		},
		{
			MethodName: "GetScheduleNowV2",
			Handler:    _CampusBackupService_GetScheduleNowV2_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "campusapis/backup/backup.proto",
}

CampusBackupService_ServiceDesc is the grpc.ServiceDesc for CampusBackupService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_campusapis_backup_backup_proto protoreflect.FileDescriptor

Functions

func RegisterCampusBackupServiceHandler

func RegisterCampusBackupServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterCampusBackupServiceHandler registers the http handlers for service CampusBackupService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterCampusBackupServiceHandlerClient

func RegisterCampusBackupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CampusBackupServiceClient) error

RegisterCampusBackupServiceHandlerClient registers the http handlers for service CampusBackupService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CampusBackupServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CampusBackupServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CampusBackupServiceClient" to call the correct interceptors.

func RegisterCampusBackupServiceHandlerFromEndpoint

func RegisterCampusBackupServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterCampusBackupServiceHandlerFromEndpoint is same as RegisterCampusBackupServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterCampusBackupServiceHandlerServer

func RegisterCampusBackupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CampusBackupServiceServer) error

RegisterCampusBackupServiceHandlerServer registers the http handlers for service CampusBackupService to "mux". UnaryRPC :call CampusBackupServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCampusBackupServiceHandlerFromEndpoint instead.

func RegisterCampusBackupServiceServer

func RegisterCampusBackupServiceServer(s grpc.ServiceRegistrar, srv CampusBackupServiceServer)

Types

type CampusBackupServiceClient

type CampusBackupServiceClient interface {
	// 获取员工信息
	GetPersonInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.GetPersonInfoResponse, error)
	// 获取学生基本信息
	GetStudentInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.GetStudentInfoResponse, error)
	// 获取学生成绩信息
	GetStudentGrade(ctx context.Context, in *v1.GetStudentGradeRequest, opts ...grpc.CallOption) (*v1.GetStudentGradeResponse, error)
	// 获取学生考试信息
	GetStudentExam(ctx context.Context, in *v1.GetStudentExamRequest, opts ...grpc.CallOption) (*v1.GetStudentExamResponse, error)
	// 获取学生/教师当前课程表V2 返回更详细的信息
	GetScheduleNowV2(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v11.GetScheduleNowV2Response, error)
}

CampusBackupServiceClient is the client API for CampusBackupService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CampusBackupServiceServer

type CampusBackupServiceServer interface {
	// 获取员工信息
	GetPersonInfo(context.Context, *emptypb.Empty) (*v1.GetPersonInfoResponse, error)
	// 获取学生基本信息
	GetStudentInfo(context.Context, *emptypb.Empty) (*v1.GetStudentInfoResponse, error)
	// 获取学生成绩信息
	GetStudentGrade(context.Context, *v1.GetStudentGradeRequest) (*v1.GetStudentGradeResponse, error)
	// 获取学生考试信息
	GetStudentExam(context.Context, *v1.GetStudentExamRequest) (*v1.GetStudentExamResponse, error)
	// 获取学生/教师当前课程表V2 返回更详细的信息
	GetScheduleNowV2(context.Context, *emptypb.Empty) (*v11.GetScheduleNowV2Response, error)
	// contains filtered or unexported methods
}

CampusBackupServiceServer is the server API for CampusBackupService service. All implementations must embed UnimplementedCampusBackupServiceServer for forward compatibility

type UnimplementedCampusBackupServiceServer

type UnimplementedCampusBackupServiceServer struct {
}

UnimplementedCampusBackupServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCampusBackupServiceServer) GetPersonInfo

func (UnimplementedCampusBackupServiceServer) GetScheduleNowV2

func (UnimplementedCampusBackupServiceServer) GetStudentExam

func (UnimplementedCampusBackupServiceServer) GetStudentGrade

func (UnimplementedCampusBackupServiceServer) GetStudentInfo

type UnsafeCampusBackupServiceServer

type UnsafeCampusBackupServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCampusBackupServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CampusBackupServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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