Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type AuthServiceClient
- type AuthServiceServer
- type Create
- type Create_Request
- func (*Create_Request) Descriptor() ([]byte, []int)deprecated
- func (x *Create_Request) GetPassword() string
- func (x *Create_Request) GetUsername() string
- func (*Create_Request) ProtoMessage()
- func (x *Create_Request) ProtoReflect() protoreflect.Message
- func (x *Create_Request) Reset()
- func (x *Create_Request) String() string
- type Create_Response
- func (*Create_Response) Descriptor() ([]byte, []int)deprecated
- func (x *Create_Response) GetId() int64
- func (x *Create_Response) GetSuccess() bool
- func (*Create_Response) ProtoMessage()
- func (x *Create_Response) ProtoReflect() protoreflect.Message
- func (x *Create_Response) Reset()
- func (x *Create_Response) String() string
- type Get
- type Get_Request
- type Get_Response
- func (*Get_Response) Descriptor() ([]byte, []int)deprecated
- func (x *Get_Response) GetCreateAt() string
- func (x *Get_Response) GetId() int64
- func (x *Get_Response) GetUsername() string
- func (*Get_Response) ProtoMessage()
- func (x *Get_Response) ProtoReflect() protoreflect.Message
- func (x *Get_Response) Reset()
- func (x *Get_Response) String() string
- type Login
- type Login_Request
- func (*Login_Request) Descriptor() ([]byte, []int)deprecated
- func (x *Login_Request) GetPassword() string
- func (x *Login_Request) GetUsername() string
- func (*Login_Request) ProtoMessage()
- func (x *Login_Request) ProtoReflect() protoreflect.Message
- func (x *Login_Request) Reset()
- func (x *Login_Request) String() string
- type Login_Response
- type UnimplementedAuthServiceServer
- type UnimplementedUserServiceServer
- type UnsafeAuthServiceServer
- type UnsafeUserServiceServer
- type UserServiceClient
- type UserServiceServer
Constants ¶
const ( UserService_Create_FullMethodName = "/gskeleton.grpc.user.UserService/Create" UserService_Get_FullMethodName = "/gskeleton.grpc.user.UserService/Get" )
const (
AuthService_Login_FullMethodName = "/gskeleton.grpc.user.AuthService/Login"
)
Variables ¶
var AuthService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gskeleton.grpc.user.AuthService", HandlerType: (*AuthServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _AuthService_Login_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth.proto", }
AuthService_ServiceDesc is the grpc.ServiceDesc for AuthService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_auth_proto protoreflect.FileDescriptor
var File_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gskeleton.grpc.user.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _UserService_Create_Handler, }, { MethodName: "Get", Handler: _UserService_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterAuthServiceServer ¶
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type AuthServiceClient ¶
type AuthServiceClient interface {
Login(ctx context.Context, in *Login_Request, opts ...grpc.CallOption) (*Login_Response, error)
}
AuthServiceClient is the client API for AuthService 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.
func NewAuthServiceClient ¶
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient
type AuthServiceServer ¶
type AuthServiceServer interface { Login(context.Context, *Login_Request) (*Login_Response, error) // contains filtered or unexported methods }
AuthServiceServer is the server API for AuthService service. All implementations must embed UnimplementedAuthServiceServer for forward compatibility.
type Create ¶
type Create struct {
// contains filtered or unexported fields
}
func (*Create) Descriptor
deprecated
func (*Create) ProtoMessage ¶
func (*Create) ProtoMessage()
func (*Create) ProtoReflect ¶
func (x *Create) ProtoReflect() protoreflect.Message
type Create_Request ¶
type Create_Request struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Create_Request) Descriptor
deprecated
func (*Create_Request) Descriptor() ([]byte, []int)
Deprecated: Use Create_Request.ProtoReflect.Descriptor instead.
func (*Create_Request) GetPassword ¶
func (x *Create_Request) GetPassword() string
func (*Create_Request) GetUsername ¶
func (x *Create_Request) GetUsername() string
func (*Create_Request) ProtoMessage ¶
func (*Create_Request) ProtoMessage()
func (*Create_Request) ProtoReflect ¶
func (x *Create_Request) ProtoReflect() protoreflect.Message
func (*Create_Request) Reset ¶
func (x *Create_Request) Reset()
func (*Create_Request) String ¶
func (x *Create_Request) String() string
type Create_Response ¶
type Create_Response struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*Create_Response) Descriptor
deprecated
func (*Create_Response) Descriptor() ([]byte, []int)
Deprecated: Use Create_Response.ProtoReflect.Descriptor instead.
func (*Create_Response) GetId ¶
func (x *Create_Response) GetId() int64
func (*Create_Response) GetSuccess ¶
func (x *Create_Response) GetSuccess() bool
func (*Create_Response) ProtoMessage ¶
func (*Create_Response) ProtoMessage()
func (*Create_Response) ProtoReflect ¶
func (x *Create_Response) ProtoReflect() protoreflect.Message
func (*Create_Response) Reset ¶
func (x *Create_Response) Reset()
func (*Create_Response) String ¶
func (x *Create_Response) String() string
type Get ¶
type Get struct {
// contains filtered or unexported fields
}
func (*Get) Descriptor
deprecated
func (*Get) ProtoMessage ¶
func (*Get) ProtoMessage()
func (*Get) ProtoReflect ¶
func (x *Get) ProtoReflect() protoreflect.Message
type Get_Request ¶
type Get_Request struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // contains filtered or unexported fields }
func (*Get_Request) Descriptor
deprecated
func (*Get_Request) Descriptor() ([]byte, []int)
Deprecated: Use Get_Request.ProtoReflect.Descriptor instead.
func (*Get_Request) GetUsername ¶
func (x *Get_Request) GetUsername() string
func (*Get_Request) ProtoMessage ¶
func (*Get_Request) ProtoMessage()
func (*Get_Request) ProtoReflect ¶
func (x *Get_Request) ProtoReflect() protoreflect.Message
func (*Get_Request) Reset ¶
func (x *Get_Request) Reset()
func (*Get_Request) String ¶
func (x *Get_Request) String() string
type Get_Response ¶
type Get_Response struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` CreateAt string `protobuf:"bytes,3,opt,name=createAt,proto3" json:"createAt,omitempty"` // contains filtered or unexported fields }
func (*Get_Response) Descriptor
deprecated
func (*Get_Response) Descriptor() ([]byte, []int)
Deprecated: Use Get_Response.ProtoReflect.Descriptor instead.
func (*Get_Response) GetCreateAt ¶
func (x *Get_Response) GetCreateAt() string
func (*Get_Response) GetId ¶
func (x *Get_Response) GetId() int64
func (*Get_Response) GetUsername ¶
func (x *Get_Response) GetUsername() string
func (*Get_Response) ProtoMessage ¶
func (*Get_Response) ProtoMessage()
func (*Get_Response) ProtoReflect ¶
func (x *Get_Response) ProtoReflect() protoreflect.Message
func (*Get_Response) Reset ¶
func (x *Get_Response) Reset()
func (*Get_Response) String ¶
func (x *Get_Response) String() string
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
func (*Login) Descriptor
deprecated
func (*Login) ProtoMessage ¶
func (*Login) ProtoMessage()
func (*Login) ProtoReflect ¶
func (x *Login) ProtoReflect() protoreflect.Message
type Login_Request ¶
type Login_Request struct { Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Login_Request) Descriptor
deprecated
func (*Login_Request) Descriptor() ([]byte, []int)
Deprecated: Use Login_Request.ProtoReflect.Descriptor instead.
func (*Login_Request) GetPassword ¶
func (x *Login_Request) GetPassword() string
func (*Login_Request) GetUsername ¶
func (x *Login_Request) GetUsername() string
func (*Login_Request) ProtoMessage ¶
func (*Login_Request) ProtoMessage()
func (*Login_Request) ProtoReflect ¶
func (x *Login_Request) ProtoReflect() protoreflect.Message
func (*Login_Request) Reset ¶
func (x *Login_Request) Reset()
func (*Login_Request) String ¶
func (x *Login_Request) String() string
type Login_Response ¶
type Login_Response struct { AccessToken string `protobuf:"bytes,1,opt,name=accessToken,proto3" json:"accessToken,omitempty"` // contains filtered or unexported fields }
func (*Login_Response) Descriptor
deprecated
func (*Login_Response) Descriptor() ([]byte, []int)
Deprecated: Use Login_Response.ProtoReflect.Descriptor instead.
func (*Login_Response) GetAccessToken ¶
func (x *Login_Response) GetAccessToken() string
func (*Login_Response) ProtoMessage ¶
func (*Login_Response) ProtoMessage()
func (*Login_Response) ProtoReflect ¶
func (x *Login_Response) ProtoReflect() protoreflect.Message
func (*Login_Response) Reset ¶
func (x *Login_Response) Reset()
func (*Login_Response) String ¶
func (x *Login_Response) String() string
type UnimplementedAuthServiceServer ¶
type UnimplementedAuthServiceServer struct{}
UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAuthServiceServer) Login ¶
func (UnimplementedAuthServiceServer) Login(context.Context, *Login_Request) (*Login_Response, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct{}
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedUserServiceServer) Create ¶
func (UnimplementedUserServiceServer) Create(context.Context, *Create_Request) (*Create_Response, error)
func (UnimplementedUserServiceServer) Get ¶
func (UnimplementedUserServiceServer) Get(context.Context, *Get_Request) (*Get_Response, error)
type UnsafeAuthServiceServer ¶
type UnsafeAuthServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServiceServer will result in compilation errors.
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UserServiceClient ¶
type UserServiceClient interface { Create(ctx context.Context, in *Create_Request, opts ...grpc.CallOption) (*Create_Response, error) Get(ctx context.Context, in *Get_Request, opts ...grpc.CallOption) (*Get_Response, error) }
UserServiceClient is the client API for UserService 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.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { Create(context.Context, *Create_Request) (*Create_Response, error) Get(context.Context, *Get_Request) (*Get_Response, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.