You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

299 lines
9.7 KiB

2 years ago
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2 years ago
// - protoc-gen-go-grpc v1.3.0
2 years ago
// - protoc v3.17.3
2 years ago
// source: user.proto
2 years ago
package user
2 years ago
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
2 years ago
const (
1 year ago
User_List_FullMethodName = "/com.diulo.api.user/list"
User_All_FullMethodName = "/com.diulo.api.user/all"
1 year ago
User_Auto_FullMethodName = "/com.diulo.api.user/auto"
1 year ago
User_LoginWithList_FullMethodName = "/com.diulo.api.user/loginWithList"
User_Login_FullMethodName = "/com.diulo.api.user/login"
1 year ago
User_Login1_FullMethodName = "/com.diulo.api.user/login1"
2 years ago
)
2 years ago
// UserClient is the client API for User service.
2 years ago
//
// 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.
2 years ago
type UserClient interface {
1 year ago
List(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
All(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
1 year ago
Auto(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
1 year ago
// 有 "user:list"
LoginWithList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
// 没有 "user:list" 权限
Login(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
1 year ago
Login1(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
2 years ago
}
2 years ago
type userClient struct {
2 years ago
cc grpc.ClientConnInterface
}
2 years ago
func NewUserClient(cc grpc.ClientConnInterface) UserClient {
return &userClient{cc}
2 years ago
}
1 year ago
func (c *userClient) List(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
2 years ago
err := c.cc.Invoke(ctx, User_List_FullMethodName, in, out, opts...)
2 years ago
if err != nil {
2 years ago
return nil, err
}
2 years ago
return out, nil
2 years ago
}
1 year ago
func (c *userClient) All(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
1 year ago
out := new(Response)
1 year ago
err := c.cc.Invoke(ctx, User_All_FullMethodName, in, out, opts...)
2 years ago
if err != nil {
2 years ago
return nil, err
}
2 years ago
return out, nil
2 years ago
}
1 year ago
func (c *userClient) Auto(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
1 year ago
out := new(Response)
1 year ago
err := c.cc.Invoke(ctx, User_Auto_FullMethodName, in, out, opts...)
1 year ago
if err != nil {
return nil, err
}
return out, nil
}
1 year ago
func (c *userClient) LoginWithList(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, User_LoginWithList_FullMethodName, in, out, opts...)
1 year ago
if err != nil {
return nil, err
}
return out, nil
}
1 year ago
func (c *userClient) Login(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, User_Login_FullMethodName, in, out, opts...)
1 year ago
if err != nil {
return nil, err
}
return out, nil
}
1 year ago
func (c *userClient) Login1(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
out := new(Response)
err := c.cc.Invoke(ctx, User_Login1_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
2 years ago
// UserServer is the server API for User service.
// All implementations must embed UnimplementedUserServer
// for forward compatibility
type UserServer interface {
1 year ago
List(context.Context, *Request) (*Response, error)
All(context.Context, *Request) (*Response, error)
1 year ago
Auto(context.Context, *Request) (*Response, error)
1 year ago
// 有 "user:list"
LoginWithList(context.Context, *Request) (*Response, error)
// 没有 "user:list" 权限
Login(context.Context, *Request) (*Response, error)
1 year ago
Login1(context.Context, *Request) (*Response, error)
2 years ago
mustEmbedUnimplementedUserServer()
2 years ago
}
2 years ago
2 years ago
// UnimplementedUserServer must be embedded to have forward compatible implementations.
type UnimplementedUserServer struct {
2 years ago
}
2 years ago
1 year ago
func (UnimplementedUserServer) List(context.Context, *Request) (*Response, error) {
2 years ago
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
2 years ago
}
1 year ago
func (UnimplementedUserServer) All(context.Context, *Request) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method All not implemented")
1 year ago
}
1 year ago
func (UnimplementedUserServer) Auto(context.Context, *Request) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Auto not implemented")
}
1 year ago
func (UnimplementedUserServer) LoginWithList(context.Context, *Request) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoginWithList not implemented")
2 years ago
}
1 year ago
func (UnimplementedUserServer) Login(context.Context, *Request) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
1 year ago
}
1 year ago
func (UnimplementedUserServer) Login1(context.Context, *Request) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Login1 not implemented")
}
2 years ago
func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
2 years ago
2 years ago
// UnsafeUserServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServer will
// result in compilation errors.
type UnsafeUserServer interface {
mustEmbedUnimplementedUserServer()
2 years ago
}
2 years ago
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer) {
s.RegisterService(&User_ServiceDesc, srv)
2 years ago
}
2 years ago
func _User_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1 year ago
in := new(Request)
2 years ago
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2 years ago
return srv.(UserServer).List(ctx, in)
2 years ago
}
info := &grpc.UnaryServerInfo{
Server: srv,
2 years ago
FullMethod: User_List_FullMethodName,
2 years ago
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1 year ago
return srv.(UserServer).List(ctx, req.(*Request))
2 years ago
}
return interceptor(ctx, in, info, handler)
}
1 year ago
func _User_All_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1 year ago
in := new(Request)
1 year ago
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
1 year ago
return srv.(UserServer).All(ctx, in)
1 year ago
}
info := &grpc.UnaryServerInfo{
Server: srv,
1 year ago
FullMethod: User_All_FullMethodName,
1 year ago
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1 year ago
return srv.(UserServer).All(ctx, req.(*Request))
1 year ago
}
return interceptor(ctx, in, info, handler)
}
1 year ago
func _User_Auto_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
1 year ago
in := new(Request)
1 year ago
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
1 year ago
return srv.(UserServer).Auto(ctx, in)
1 year ago
}
info := &grpc.UnaryServerInfo{
Server: srv,
1 year ago
FullMethod: User_Auto_FullMethodName,
1 year ago
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1 year ago
return srv.(UserServer).Auto(ctx, req.(*Request))
1 year ago
}
return interceptor(ctx, in, info, handler)
}
1 year ago
func _User_LoginWithList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Request)
2 years ago
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
1 year ago
return srv.(UserServer).LoginWithList(ctx, in)
2 years ago
}
info := &grpc.UnaryServerInfo{
Server: srv,
1 year ago
FullMethod: User_LoginWithList_FullMethodName,
2 years ago
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1 year ago
return srv.(UserServer).LoginWithList(ctx, req.(*Request))
2 years ago
}
return interceptor(ctx, in, info, handler)
}
1 year ago
func _User_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Request)
1 year ago
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
1 year ago
return srv.(UserServer).Login(ctx, in)
1 year ago
}
info := &grpc.UnaryServerInfo{
Server: srv,
1 year ago
FullMethod: User_Login_FullMethodName,
1 year ago
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
1 year ago
return srv.(UserServer).Login(ctx, req.(*Request))
1 year ago
}
return interceptor(ctx, in, info, handler)
}
1 year ago
func _User_Login1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Request)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServer).Login1(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: User_Login1_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServer).Login1(ctx, req.(*Request))
}
return interceptor(ctx, in, info, handler)
}
2 years ago
// User_ServiceDesc is the grpc.ServiceDesc for User service.
2 years ago
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
2 years ago
var User_ServiceDesc = grpc.ServiceDesc{
2 years ago
ServiceName: "com.diulo.api.user",
2 years ago
HandlerType: (*UserServer)(nil),
2 years ago
Methods: []grpc.MethodDesc{
{
2 years ago
MethodName: "list",
Handler: _User_List_Handler,
2 years ago
},
1 year ago
{
1 year ago
MethodName: "all",
Handler: _User_All_Handler,
1 year ago
},
1 year ago
{
MethodName: "auto",
Handler: _User_Auto_Handler,
},
1 year ago
{
1 year ago
MethodName: "loginWithList",
Handler: _User_LoginWithList_Handler,
1 year ago
},
2 years ago
{
1 year ago
MethodName: "login",
Handler: _User_Login_Handler,
1 year ago
},
1 year ago
{
MethodName: "login1",
Handler: _User_Login1_Handler,
},
2 years ago
},
Streams: []grpc.StreamDesc{},
Metadata: "user.proto",
}