Documentation
¶
Overview ¶
Package yuquepb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func InitUserServiceClient(addr string, alias ...string)
- func InitYuqueClient(addr string, alias ...string)
- func RegisterUserService(srv service.Service, impl UserServiceServer)
- func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
- func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- func RegisterYuque(srv service.Service, impl YuqueServer)
- func RegisterYuqueHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterYuqueHandlerClient(ctx context.Context, mux *runtime.ServeMux, client YuqueClient) error
- func RegisterYuqueHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterYuqueHandlerServer(ctx context.Context, mux *runtime.ServeMux, server YuqueServer) error
- func RegisterYuqueServer(s grpc.ServiceRegistrar, srv YuqueServer)
- type CreateGroupReq
- func (*CreateGroupReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateGroupReq) GetDescription() string
- func (x *CreateGroupReq) GetLogin() string
- func (x *CreateGroupReq) GetName() string
- func (*CreateGroupReq) ProtoMessage()
- func (x *CreateGroupReq) ProtoReflect() protoreflect.Message
- func (x *CreateGroupReq) Reset()
- func (x *CreateGroupReq) String() string
- type CreateGroupResp
- func (*CreateGroupResp) Descriptor() ([]byte, []int)deprecated
- func (x *CreateGroupResp) GetData() []*CreateGroupResp_Data
- func (x *CreateGroupResp) GetResponse() *lava.Response
- func (*CreateGroupResp) ProtoMessage()
- func (x *CreateGroupResp) ProtoReflect() protoreflect.Message
- func (x *CreateGroupResp) Reset()
- func (x *CreateGroupResp) String() string
- type CreateGroupResp_Data
- func (*CreateGroupResp_Data) Descriptor() ([]byte, []int)deprecated
- func (x *CreateGroupResp_Data) GetAvatarUrl() string
- func (x *CreateGroupResp_Data) GetCreatedAt() string
- func (x *CreateGroupResp_Data) GetDescription() string
- func (x *CreateGroupResp_Data) GetId() uint32
- func (x *CreateGroupResp_Data) GetLogin() string
- func (x *CreateGroupResp_Data) GetName() string
- func (x *CreateGroupResp_Data) GetUpdatedAt() string
- func (*CreateGroupResp_Data) ProtoMessage()
- func (x *CreateGroupResp_Data) ProtoReflect() protoreflect.Message
- func (x *CreateGroupResp_Data) Reset()
- func (x *CreateGroupResp_Data) String() string
- type DoormanConfig
- func (*DoormanConfig) Descriptor() ([]byte, []int)deprecated
- func (x *DoormanConfig) GetGrpcPort() uint32
- func (x *DoormanConfig) GetWssPort() uint32
- func (*DoormanConfig) ProtoMessage()
- func (x *DoormanConfig) ProtoReflect() protoreflect.Message
- func (x *DoormanConfig) Reset()
- func (x *DoormanConfig) String() string
- type FacebookConfig
- func (*FacebookConfig) Descriptor() ([]byte, []int)deprecated
- func (x *FacebookConfig) GetAuthUrl() string
- func (x *FacebookConfig) GetAvatarUrl() string
- func (x *FacebookConfig) GetBaseUrl() string
- func (*FacebookConfig) ProtoMessage()
- func (x *FacebookConfig) ProtoReflect() protoreflect.Message
- func (x *FacebookConfig) Reset()
- func (x *FacebookConfig) String() string
- type GuardianConfig
- func (*GuardianConfig) Descriptor() ([]byte, []int)deprecated
- func (x *GuardianConfig) GetConnStr() string
- func (x *GuardianConfig) GetExpiringDays() uint32
- func (x *GuardianConfig) GetFacebook() *FacebookConfig
- func (x *GuardianConfig) GetTokenSecret() string
- func (*GuardianConfig) ProtoMessage()
- func (x *GuardianConfig) ProtoReflect() protoreflect.Message
- func (x *GuardianConfig) Reset()
- func (x *GuardianConfig) String() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) ResetPassword(context.Context, *UserInfoReq) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) Signin(context.Context, *UserInfoReq) (*UserInfoResp, error)
- func (UnimplementedUserServiceServer) Signin1(context.Context, *UserInfoReq) (*UserInfoResp, error)
- type UnimplementedYuqueServer
- func (UnimplementedYuqueServer) CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error)
- func (UnimplementedYuqueServer) UserInfo(context.Context, *emptypb.Empty) (*UserInfoResp, error)
- func (UnimplementedYuqueServer) UserInfoByLogin(context.Context, *UserInfoReq) (*UserInfoResp, error)
- type UnsafeUserServiceServer
- type UnsafeYuqueServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetBirthday() int64
- func (x *User) GetEmail() string
- func (x *User) GetFirstName() string
- func (x *User) GetGender() string
- func (x *User) GetId() string
- func (x *User) GetLastName() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserInfoReq
- type UserInfoResp
- func (*UserInfoResp) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoResp) GetData() *UserInfoResp_Data
- func (x *UserInfoResp) GetResponse() *lava.Response
- func (*UserInfoResp) ProtoMessage()
- func (x *UserInfoResp) ProtoReflect() protoreflect.Message
- func (x *UserInfoResp) Reset()
- func (x *UserInfoResp) String() string
- type UserInfoResp_Data
- func (*UserInfoResp_Data) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoResp_Data) GetAvatarUrl() string
- func (x *UserInfoResp_Data) GetCreatedAt() string
- func (x *UserInfoResp_Data) GetDescription() string
- func (x *UserInfoResp_Data) GetId() uint32
- func (x *UserInfoResp_Data) GetLogin() string
- func (x *UserInfoResp_Data) GetName() string
- func (x *UserInfoResp_Data) GetType() string
- func (x *UserInfoResp_Data) GetUpdatedAt() string
- func (*UserInfoResp_Data) ProtoMessage()
- func (x *UserInfoResp_Data) ProtoReflect() protoreflect.Message
- func (x *UserInfoResp_Data) Reset()
- func (x *UserInfoResp_Data) String() string
- type UserServiceClient
- type UserServiceServer
- type YuqueClient
- type YuqueServer
Constants ¶
This section is empty.
Variables ¶
var File_proto_yuque_yuque_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuque.v2.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Signin", Handler: _UserService_Signin_Handler, }, { MethodName: "Signin1", Handler: _UserService_Signin1_Handler, }, { MethodName: "ResetPassword", Handler: _UserService_ResetPassword_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/yuque/yuque.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)
var Yuque_ServiceDesc = grpc.ServiceDesc{ ServiceName: "yuque.v2.Yuque", HandlerType: (*YuqueServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UserInfo", Handler: _Yuque_UserInfo_Handler, }, { MethodName: "UserInfoByLogin", Handler: _Yuque_UserInfoByLogin_Handler, }, { MethodName: "CreateGroup", Handler: _Yuque_CreateGroup_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/yuque/yuque.proto", }
Yuque_ServiceDesc is the grpc.ServiceDesc for Yuque service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func InitUserServiceClient ¶
func InitYuqueClient ¶
func RegisterUserService ¶
func RegisterUserService(srv service.Service, impl UserServiceServer)
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserServiceHandler registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserServiceHandlerClient ¶
func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
RegisterUserServiceHandlerClient registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserServiceClient" to call the correct interceptors.
func RegisterUserServiceHandlerFromEndpoint ¶
func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserServiceHandlerServer ¶
func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". UnaryRPC :call UserServiceServer 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 RegisterUserServiceHandlerFromEndpoint instead.
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
func RegisterYuque ¶
func RegisterYuque(srv service.Service, impl YuqueServer)
func RegisterYuqueHandler ¶
RegisterYuqueHandler registers the http handlers for service Yuque to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterYuqueHandlerClient ¶
func RegisterYuqueHandlerClient(ctx context.Context, mux *runtime.ServeMux, client YuqueClient) error
RegisterYuqueHandlerClient registers the http handlers for service Yuque to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "YuqueClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "YuqueClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "YuqueClient" to call the correct interceptors.
func RegisterYuqueHandlerFromEndpoint ¶
func RegisterYuqueHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterYuqueHandlerFromEndpoint is same as RegisterYuqueHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterYuqueHandlerServer ¶
func RegisterYuqueHandlerServer(ctx context.Context, mux *runtime.ServeMux, server YuqueServer) error
RegisterYuqueHandlerServer registers the http handlers for service Yuque to "mux". UnaryRPC :call YuqueServer 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 RegisterYuqueHandlerFromEndpoint instead.
func RegisterYuqueServer ¶
func RegisterYuqueServer(s grpc.ServiceRegistrar, srv YuqueServer)
Types ¶
type CreateGroupReq ¶
type CreateGroupReq struct {
// login
Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
// 组织名称
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// 介绍
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
// contains filtered or unexported fields
}
func (*CreateGroupReq) Descriptor
deprecated
func (*CreateGroupReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateGroupReq.ProtoReflect.Descriptor instead.
func (*CreateGroupReq) GetDescription ¶
func (x *CreateGroupReq) GetDescription() string
func (*CreateGroupReq) GetLogin ¶
func (x *CreateGroupReq) GetLogin() string
func (*CreateGroupReq) GetName ¶
func (x *CreateGroupReq) GetName() string
func (*CreateGroupReq) ProtoMessage ¶
func (*CreateGroupReq) ProtoMessage()
func (*CreateGroupReq) ProtoReflect ¶
func (x *CreateGroupReq) ProtoReflect() protoreflect.Message
func (*CreateGroupReq) Reset ¶
func (x *CreateGroupReq) Reset()
func (*CreateGroupReq) String ¶
func (x *CreateGroupReq) String() string
type CreateGroupResp ¶
type CreateGroupResp struct {
Data []*CreateGroupResp_Data `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
Response *lava.Response `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
// contains filtered or unexported fields
}
func (*CreateGroupResp) Descriptor
deprecated
func (*CreateGroupResp) Descriptor() ([]byte, []int)
Deprecated: Use CreateGroupResp.ProtoReflect.Descriptor instead.
func (*CreateGroupResp) GetData ¶
func (x *CreateGroupResp) GetData() []*CreateGroupResp_Data
func (*CreateGroupResp) GetResponse ¶
func (x *CreateGroupResp) GetResponse() *lava.Response
func (*CreateGroupResp) ProtoMessage ¶
func (*CreateGroupResp) ProtoMessage()
func (*CreateGroupResp) ProtoReflect ¶
func (x *CreateGroupResp) ProtoReflect() protoreflect.Message
func (*CreateGroupResp) Reset ¶
func (x *CreateGroupResp) Reset()
func (*CreateGroupResp) String ¶
func (x *CreateGroupResp) String() string
type CreateGroupResp_Data ¶
type CreateGroupResp_Data struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Login string `protobuf:"bytes,2,opt,name=login,proto3" json:"login,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
AvatarUrl string `protobuf:"bytes,4,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
CreatedAt string `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt string `protobuf:"bytes,7,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
func (*CreateGroupResp_Data) Descriptor
deprecated
func (*CreateGroupResp_Data) Descriptor() ([]byte, []int)
Deprecated: Use CreateGroupResp_Data.ProtoReflect.Descriptor instead.
func (*CreateGroupResp_Data) GetAvatarUrl ¶
func (x *CreateGroupResp_Data) GetAvatarUrl() string
func (*CreateGroupResp_Data) GetCreatedAt ¶
func (x *CreateGroupResp_Data) GetCreatedAt() string
func (*CreateGroupResp_Data) GetDescription ¶
func (x *CreateGroupResp_Data) GetDescription() string
func (*CreateGroupResp_Data) GetId ¶
func (x *CreateGroupResp_Data) GetId() uint32
func (*CreateGroupResp_Data) GetLogin ¶
func (x *CreateGroupResp_Data) GetLogin() string
func (*CreateGroupResp_Data) GetName ¶
func (x *CreateGroupResp_Data) GetName() string
func (*CreateGroupResp_Data) GetUpdatedAt ¶
func (x *CreateGroupResp_Data) GetUpdatedAt() string
func (*CreateGroupResp_Data) ProtoMessage ¶
func (*CreateGroupResp_Data) ProtoMessage()
func (*CreateGroupResp_Data) ProtoReflect ¶
func (x *CreateGroupResp_Data) ProtoReflect() protoreflect.Message
func (*CreateGroupResp_Data) Reset ¶
func (x *CreateGroupResp_Data) Reset()
func (*CreateGroupResp_Data) String ¶
func (x *CreateGroupResp_Data) String() string
type DoormanConfig ¶
type DoormanConfig struct {
// gRPC port
GrpcPort uint32 `protobuf:"varint,1,opt,name=grpc_port,json=grpcPort,proto3" json:"grpc_port,omitempty"`
// websocket port
WssPort uint32 `protobuf:"varint,2,opt,name=wss_port,json=wssPort,proto3" json:"wss_port,omitempty"`
// contains filtered or unexported fields
}
doorman service config
func (*DoormanConfig) Descriptor
deprecated
func (*DoormanConfig) Descriptor() ([]byte, []int)
Deprecated: Use DoormanConfig.ProtoReflect.Descriptor instead.
func (*DoormanConfig) GetGrpcPort ¶
func (x *DoormanConfig) GetGrpcPort() uint32
func (*DoormanConfig) GetWssPort ¶
func (x *DoormanConfig) GetWssPort() uint32
func (*DoormanConfig) ProtoMessage ¶
func (*DoormanConfig) ProtoMessage()
func (*DoormanConfig) ProtoReflect ¶
func (x *DoormanConfig) ProtoReflect() protoreflect.Message
func (*DoormanConfig) Reset ¶
func (x *DoormanConfig) Reset()
func (*DoormanConfig) String ¶
func (x *DoormanConfig) String() string
type FacebookConfig ¶
type FacebookConfig struct {
BaseUrl string `protobuf:"bytes,1,opt,name=base_url,json=baseUrl,proto3" json:"base_url,omitempty"`
AuthUrl string `protobuf:"bytes,2,opt,name=auth_url,json=authUrl,proto3" json:"auth_url,omitempty"`
AvatarUrl string `protobuf:"bytes,3,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
// contains filtered or unexported fields
}
facebook auth configuration
func (*FacebookConfig) Descriptor
deprecated
func (*FacebookConfig) Descriptor() ([]byte, []int)
Deprecated: Use FacebookConfig.ProtoReflect.Descriptor instead.
func (*FacebookConfig) GetAuthUrl ¶
func (x *FacebookConfig) GetAuthUrl() string
func (*FacebookConfig) GetAvatarUrl ¶
func (x *FacebookConfig) GetAvatarUrl() string
func (*FacebookConfig) GetBaseUrl ¶
func (x *FacebookConfig) GetBaseUrl() string
func (*FacebookConfig) ProtoMessage ¶
func (*FacebookConfig) ProtoMessage()
func (*FacebookConfig) ProtoReflect ¶
func (x *FacebookConfig) ProtoReflect() protoreflect.Message
func (*FacebookConfig) Reset ¶
func (x *FacebookConfig) Reset()
func (*FacebookConfig) String ¶
func (x *FacebookConfig) String() string
type GuardianConfig ¶
type GuardianConfig struct {
// auth token secret
TokenSecret string `protobuf:"bytes,1,opt,name=token_secret,json=tokenSecret,proto3" json:"token_secret,omitempty"`
// auth db conn str
ConnStr string `protobuf:"bytes,2,opt,name=conn_str,json=connStr,proto3" json:"conn_str,omitempty"`
// auth token expiration
ExpiringDays uint32 `protobuf:"varint,3,opt,name=expiring_days,json=expiringDays,proto3" json:"expiring_days,omitempty"`
// facebook configuration
Facebook *FacebookConfig `protobuf:"bytes,4,opt,name=facebook,proto3" json:"facebook,omitempty"`
// contains filtered or unexported fields
}
guardian service config
func (*GuardianConfig) Descriptor
deprecated
func (*GuardianConfig) Descriptor() ([]byte, []int)
Deprecated: Use GuardianConfig.ProtoReflect.Descriptor instead.
func (*GuardianConfig) GetConnStr ¶
func (x *GuardianConfig) GetConnStr() string
func (*GuardianConfig) GetExpiringDays ¶
func (x *GuardianConfig) GetExpiringDays() uint32
func (*GuardianConfig) GetFacebook ¶
func (x *GuardianConfig) GetFacebook() *FacebookConfig
func (*GuardianConfig) GetTokenSecret ¶
func (x *GuardianConfig) GetTokenSecret() string
func (*GuardianConfig) ProtoMessage ¶
func (*GuardianConfig) ProtoMessage()
func (*GuardianConfig) ProtoReflect ¶
func (x *GuardianConfig) ProtoReflect() protoreflect.Message
func (*GuardianConfig) Reset ¶
func (x *GuardianConfig) Reset()
func (*GuardianConfig) String ¶
func (x *GuardianConfig) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct {
}
UnimplementedUserServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) ResetPassword ¶
func (UnimplementedUserServiceServer) ResetPassword(context.Context, *UserInfoReq) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) Signin ¶
func (UnimplementedUserServiceServer) Signin(context.Context, *UserInfoReq) (*UserInfoResp, error)
func (UnimplementedUserServiceServer) Signin1 ¶
func (UnimplementedUserServiceServer) Signin1(context.Context, *UserInfoReq) (*UserInfoResp, error)
type UnimplementedYuqueServer ¶
type UnimplementedYuqueServer struct {
}
UnimplementedYuqueServer should be embedded to have forward compatible implementations.
func (UnimplementedYuqueServer) CreateGroup ¶
func (UnimplementedYuqueServer) CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error)
func (UnimplementedYuqueServer) UserInfo ¶
func (UnimplementedYuqueServer) UserInfo(context.Context, *emptypb.Empty) (*UserInfoResp, error)
func (UnimplementedYuqueServer) UserInfoByLogin ¶
func (UnimplementedYuqueServer) UserInfoByLogin(context.Context, *UserInfoReq) (*UserInfoResp, error)
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 UnsafeYuqueServer ¶
type UnsafeYuqueServer interface {
// contains filtered or unexported methods
}
UnsafeYuqueServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to YuqueServer will result in compilation errors.
type User ¶
type User struct {
// user id
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// user's email
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
// user's first name
FirstName string `protobuf:"bytes,3,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
// user's last name
LastName string `protobuf:"bytes,4,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
// user's gender - Unspecified if none
Gender string `protobuf:"bytes,5,opt,name=gender,proto3" json:"gender,omitempty"`
// user's birthday in UTC timestamp, 0 if none
Birthday int64 `protobuf:"varint,6,opt,name=birthday,proto3" json:"birthday,omitempty"`
// user's avatar
Avatar string `protobuf:"bytes,7,opt,name=avatar,proto3" json:"avatar,omitempty"`
// contains filtered or unexported fields
}
basic user information
func (*User) Descriptor
deprecated
func (*User) GetBirthday ¶
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserInfoReq ¶
type UserInfoReq struct {
// login or id
Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty" param:"login" param1:"login1"`
// contains filtered or unexported fields
}
func (*UserInfoReq) Descriptor
deprecated
func (*UserInfoReq) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoReq.ProtoReflect.Descriptor instead.
func (*UserInfoReq) GetLogin ¶
func (x *UserInfoReq) GetLogin() string
func (*UserInfoReq) ProtoMessage ¶
func (*UserInfoReq) ProtoMessage()
func (*UserInfoReq) ProtoReflect ¶
func (x *UserInfoReq) ProtoReflect() protoreflect.Message
func (*UserInfoReq) Reset ¶
func (x *UserInfoReq) Reset()
func (*UserInfoReq) String ¶
func (x *UserInfoReq) String() string
type UserInfoResp ¶
type UserInfoResp struct {
Data *UserInfoResp_Data `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
Response *lava.Response `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
// contains filtered or unexported fields
}
func (*UserInfoResp) Descriptor
deprecated
func (*UserInfoResp) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoResp.ProtoReflect.Descriptor instead.
func (*UserInfoResp) GetData ¶
func (x *UserInfoResp) GetData() *UserInfoResp_Data
func (*UserInfoResp) GetResponse ¶
func (x *UserInfoResp) GetResponse() *lava.Response
func (*UserInfoResp) ProtoMessage ¶
func (*UserInfoResp) ProtoMessage()
func (*UserInfoResp) ProtoReflect ¶
func (x *UserInfoResp) ProtoReflect() protoreflect.Message
func (*UserInfoResp) Reset ¶
func (x *UserInfoResp) Reset()
func (*UserInfoResp) String ¶
func (x *UserInfoResp) String() string
type UserInfoResp_Data ¶
type UserInfoResp_Data struct {
Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Login string `protobuf:"bytes,3,opt,name=login,proto3" json:"login,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
AvatarUrl string `protobuf:"bytes,6,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"`
CreatedAt string `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
UpdatedAt string `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// contains filtered or unexported fields
}
func (*UserInfoResp_Data) Descriptor
deprecated
func (*UserInfoResp_Data) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoResp_Data.ProtoReflect.Descriptor instead.
func (*UserInfoResp_Data) GetAvatarUrl ¶
func (x *UserInfoResp_Data) GetAvatarUrl() string
func (*UserInfoResp_Data) GetCreatedAt ¶
func (x *UserInfoResp_Data) GetCreatedAt() string
func (*UserInfoResp_Data) GetDescription ¶
func (x *UserInfoResp_Data) GetDescription() string
func (*UserInfoResp_Data) GetId ¶
func (x *UserInfoResp_Data) GetId() uint32
func (*UserInfoResp_Data) GetLogin ¶
func (x *UserInfoResp_Data) GetLogin() string
func (*UserInfoResp_Data) GetName ¶
func (x *UserInfoResp_Data) GetName() string
func (*UserInfoResp_Data) GetType ¶
func (x *UserInfoResp_Data) GetType() string
func (*UserInfoResp_Data) GetUpdatedAt ¶
func (x *UserInfoResp_Data) GetUpdatedAt() string
func (*UserInfoResp_Data) ProtoMessage ¶
func (*UserInfoResp_Data) ProtoMessage()
func (*UserInfoResp_Data) ProtoReflect ¶
func (x *UserInfoResp_Data) ProtoReflect() protoreflect.Message
func (*UserInfoResp_Data) Reset ¶
func (x *UserInfoResp_Data) Reset()
func (*UserInfoResp_Data) String ¶
func (x *UserInfoResp_Data) String() string
type UserServiceClient ¶
type UserServiceClient interface {
// user signin
Signin(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, error)
Signin1(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, error)
// user resets password
ResetPassword(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*emptypb.Empty, 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 {
// user signin
Signin(context.Context, *UserInfoReq) (*UserInfoResp, error)
Signin1(context.Context, *UserInfoReq) (*UserInfoResp, error)
// user resets password
ResetPassword(context.Context, *UserInfoReq) (*emptypb.Empty, error)
}
UserServiceServer is the server API for UserService service. All implementations should embed UnimplementedUserServiceServer for forward compatibility
type YuqueClient ¶
type YuqueClient interface {
// 获取认证的用户的个人信息
UserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfoResp, error)
// 获取单个用户信息
UserInfoByLogin(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, error)
// 创建 Group
CreateGroup(ctx context.Context, in *CreateGroupReq, opts ...grpc.CallOption) (*CreateGroupResp, error)
}
YuqueClient is the client API for Yuque 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 NewYuqueClient ¶
func NewYuqueClient(cc grpc.ClientConnInterface) YuqueClient
type YuqueServer ¶
type YuqueServer interface {
// 获取认证的用户的个人信息
UserInfo(context.Context, *emptypb.Empty) (*UserInfoResp, error)
// 获取单个用户信息
UserInfoByLogin(context.Context, *UserInfoReq) (*UserInfoResp, error)
// 创建 Group
CreateGroup(context.Context, *CreateGroupReq) (*CreateGroupResp, error)
}
YuqueServer is the server API for Yuque service. All implementations should embed UnimplementedYuqueServer for forward compatibility