自动生成 protobuf 代码 (tag: v1.9.0)
This commit is contained in:
166
corestack/admin/v1/adminv1connect/service.connect.go
Normal file
166
corestack/admin/v1/adminv1connect/service.connect.go
Normal file
@@ -0,0 +1,166 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: corestack/admin/v1/service.proto
|
||||
|
||||
package adminv1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "git.shenxianhe.cn/shenxianhe/sdk/corestack/admin/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// AdminServiceName is the fully-qualified name of the AdminService service.
|
||||
AdminServiceName = "corestack.admin.v1.AdminService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// AdminServiceListSMSSignProcedure is the fully-qualified name of the AdminService's ListSMSSign
|
||||
// RPC.
|
||||
AdminServiceListSMSSignProcedure = "/corestack.admin.v1.AdminService/ListSMSSign"
|
||||
// AdminServiceSendSMSProcedure is the fully-qualified name of the AdminService's SendSMS RPC.
|
||||
AdminServiceSendSMSProcedure = "/corestack.admin.v1.AdminService/SendSMS"
|
||||
// AdminServiceGetUserInfoProcedure is the fully-qualified name of the AdminService's GetUserInfo
|
||||
// RPC.
|
||||
AdminServiceGetUserInfoProcedure = "/corestack.admin.v1.AdminService/GetUserInfo"
|
||||
)
|
||||
|
||||
// AdminServiceClient is a client for the corestack.admin.v1.AdminService service.
|
||||
type AdminServiceClient interface {
|
||||
ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error)
|
||||
SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error)
|
||||
GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error)
|
||||
}
|
||||
|
||||
// NewAdminServiceClient constructs a client for the corestack.admin.v1.AdminService service. By
|
||||
// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
|
||||
// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
|
||||
// connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewAdminServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AdminServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
adminServiceMethods := v1.File_corestack_admin_v1_service_proto.Services().ByName("AdminService").Methods()
|
||||
return &adminServiceClient{
|
||||
listSMSSign: connect.NewClient[v1.ListSMSSignRequest, v1.ListSMSSignResponse](
|
||||
httpClient,
|
||||
baseURL+AdminServiceListSMSSignProcedure,
|
||||
connect.WithSchema(adminServiceMethods.ByName("ListSMSSign")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
sendSMS: connect.NewClient[v1.SendSMSRequest, v1.SendSMSResponse](
|
||||
httpClient,
|
||||
baseURL+AdminServiceSendSMSProcedure,
|
||||
connect.WithSchema(adminServiceMethods.ByName("SendSMS")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getUserInfo: connect.NewClient[v1.GetUserInfoRequest, v1.GetUserInfoResponse](
|
||||
httpClient,
|
||||
baseURL+AdminServiceGetUserInfoProcedure,
|
||||
connect.WithSchema(adminServiceMethods.ByName("GetUserInfo")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// adminServiceClient implements AdminServiceClient.
|
||||
type adminServiceClient struct {
|
||||
listSMSSign *connect.Client[v1.ListSMSSignRequest, v1.ListSMSSignResponse]
|
||||
sendSMS *connect.Client[v1.SendSMSRequest, v1.SendSMSResponse]
|
||||
getUserInfo *connect.Client[v1.GetUserInfoRequest, v1.GetUserInfoResponse]
|
||||
}
|
||||
|
||||
// ListSMSSign calls corestack.admin.v1.AdminService.ListSMSSign.
|
||||
func (c *adminServiceClient) ListSMSSign(ctx context.Context, req *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) {
|
||||
return c.listSMSSign.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SendSMS calls corestack.admin.v1.AdminService.SendSMS.
|
||||
func (c *adminServiceClient) SendSMS(ctx context.Context, req *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) {
|
||||
return c.sendSMS.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// GetUserInfo calls corestack.admin.v1.AdminService.GetUserInfo.
|
||||
func (c *adminServiceClient) GetUserInfo(ctx context.Context, req *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) {
|
||||
return c.getUserInfo.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// AdminServiceHandler is an implementation of the corestack.admin.v1.AdminService service.
|
||||
type AdminServiceHandler interface {
|
||||
ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error)
|
||||
SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error)
|
||||
GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error)
|
||||
}
|
||||
|
||||
// NewAdminServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
adminServiceMethods := v1.File_corestack_admin_v1_service_proto.Services().ByName("AdminService").Methods()
|
||||
adminServiceListSMSSignHandler := connect.NewUnaryHandler(
|
||||
AdminServiceListSMSSignProcedure,
|
||||
svc.ListSMSSign,
|
||||
connect.WithSchema(adminServiceMethods.ByName("ListSMSSign")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
adminServiceSendSMSHandler := connect.NewUnaryHandler(
|
||||
AdminServiceSendSMSProcedure,
|
||||
svc.SendSMS,
|
||||
connect.WithSchema(adminServiceMethods.ByName("SendSMS")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
adminServiceGetUserInfoHandler := connect.NewUnaryHandler(
|
||||
AdminServiceGetUserInfoProcedure,
|
||||
svc.GetUserInfo,
|
||||
connect.WithSchema(adminServiceMethods.ByName("GetUserInfo")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/corestack.admin.v1.AdminService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case AdminServiceListSMSSignProcedure:
|
||||
adminServiceListSMSSignHandler.ServeHTTP(w, r)
|
||||
case AdminServiceSendSMSProcedure:
|
||||
adminServiceSendSMSHandler.ServeHTTP(w, r)
|
||||
case AdminServiceGetUserInfoProcedure:
|
||||
adminServiceGetUserInfoHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedAdminServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedAdminServiceHandler struct{}
|
||||
|
||||
func (UnimplementedAdminServiceHandler) ListSMSSign(context.Context, *connect.Request[v1.ListSMSSignRequest]) (*connect.Response[v1.ListSMSSignResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.admin.v1.AdminService.ListSMSSign is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedAdminServiceHandler) SendSMS(context.Context, *connect.Request[v1.SendSMSRequest]) (*connect.Response[v1.SendSMSResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.admin.v1.AdminService.SendSMS is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedAdminServiceHandler) GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.admin.v1.AdminService.GetUserInfo is not implemented"))
|
||||
}
|
||||
78
corestack/admin/v1/service.pb.go
Normal file
78
corestack/admin/v1/service.pb.go
Normal file
@@ -0,0 +1,78 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/admin/v1/service.proto
|
||||
|
||||
package adminv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_corestack_admin_v1_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_admin_v1_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
" corestack/admin/v1/service.proto\x12\x12corestack.admin.v1\x1a\x1ccorestack/admin/v1/sms.proto\x1a\x1dcorestack/admin/v1/user.proto2\xa2\x02\n" +
|
||||
"\fAdminService\x12^\n" +
|
||||
"\vListSMSSign\x12&.corestack.admin.v1.ListSMSSignRequest\x1a'.corestack.admin.v1.ListSMSSignResponse\x12R\n" +
|
||||
"\aSendSMS\x12\".corestack.admin.v1.SendSMSRequest\x1a#.corestack.admin.v1.SendSMSResponse\x12^\n" +
|
||||
"\vGetUserInfo\x12&.corestack.admin.v1.GetUserInfoRequest\x1a'.corestack.admin.v1.GetUserInfoResponseB=Z;git.shenxianhe.cn/shenxianhe/sdk/corestack/admin/v1;adminv1b\x06proto3"
|
||||
|
||||
var file_corestack_admin_v1_service_proto_goTypes = []any{
|
||||
(*ListSMSSignRequest)(nil), // 0: corestack.admin.v1.ListSMSSignRequest
|
||||
(*SendSMSRequest)(nil), // 1: corestack.admin.v1.SendSMSRequest
|
||||
(*GetUserInfoRequest)(nil), // 2: corestack.admin.v1.GetUserInfoRequest
|
||||
(*ListSMSSignResponse)(nil), // 3: corestack.admin.v1.ListSMSSignResponse
|
||||
(*SendSMSResponse)(nil), // 4: corestack.admin.v1.SendSMSResponse
|
||||
(*GetUserInfoResponse)(nil), // 5: corestack.admin.v1.GetUserInfoResponse
|
||||
}
|
||||
var file_corestack_admin_v1_service_proto_depIdxs = []int32{
|
||||
0, // 0: corestack.admin.v1.AdminService.ListSMSSign:input_type -> corestack.admin.v1.ListSMSSignRequest
|
||||
1, // 1: corestack.admin.v1.AdminService.SendSMS:input_type -> corestack.admin.v1.SendSMSRequest
|
||||
2, // 2: corestack.admin.v1.AdminService.GetUserInfo:input_type -> corestack.admin.v1.GetUserInfoRequest
|
||||
3, // 3: corestack.admin.v1.AdminService.ListSMSSign:output_type -> corestack.admin.v1.ListSMSSignResponse
|
||||
4, // 4: corestack.admin.v1.AdminService.SendSMS:output_type -> corestack.admin.v1.SendSMSResponse
|
||||
5, // 5: corestack.admin.v1.AdminService.GetUserInfo:output_type -> corestack.admin.v1.GetUserInfoResponse
|
||||
3, // [3:6] is the sub-list for method output_type
|
||||
0, // [0:3] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_admin_v1_service_proto_init() }
|
||||
func file_corestack_admin_v1_service_proto_init() {
|
||||
if File_corestack_admin_v1_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_corestack_admin_v1_sms_proto_init()
|
||||
file_corestack_admin_v1_user_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_admin_v1_service_proto_rawDesc), len(file_corestack_admin_v1_service_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_corestack_admin_v1_service_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_admin_v1_service_proto_depIdxs,
|
||||
}.Build()
|
||||
File_corestack_admin_v1_service_proto = out.File
|
||||
file_corestack_admin_v1_service_proto_goTypes = nil
|
||||
file_corestack_admin_v1_service_proto_depIdxs = nil
|
||||
}
|
||||
459
corestack/admin/v1/sms.pb.go
Normal file
459
corestack/admin/v1/sms.pb.go
Normal file
@@ -0,0 +1,459 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/admin/v1/sms.proto
|
||||
|
||||
package adminv1
|
||||
|
||||
import (
|
||||
v1 "git.shenxianhe.cn/shenxianhe/sdk/corestack/enums/v1"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type SendSMSRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
SignName string `protobuf:"bytes,2,opt,name=sign_name,json=signName,proto3" json:"sign_name,omitempty"`
|
||||
TemplateCode string `protobuf:"bytes,3,opt,name=template_code,json=templateCode,proto3" json:"template_code,omitempty"`
|
||||
TemplateParams map[string]string `protobuf:"bytes,4,rep,name=template_params,json=templateParams,proto3" json:"template_params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendSMSRequest) Reset() {
|
||||
*x = SendSMSRequest{}
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendSMSRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendSMSRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SendSMSRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendSMSRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SendSMSRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_admin_v1_sms_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SendSMSRequest) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendSMSRequest) GetSignName() string {
|
||||
if x != nil {
|
||||
return x.SignName
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendSMSRequest) GetTemplateCode() string {
|
||||
if x != nil {
|
||||
return x.TemplateCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SendSMSRequest) GetTemplateParams() map[string]string {
|
||||
if x != nil {
|
||||
return x.TemplateParams
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SendSMSResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendSMSResponse) Reset() {
|
||||
*x = SendSMSResponse{}
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendSMSResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendSMSResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SendSMSResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendSMSResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SendSMSResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_admin_v1_sms_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type ListSMSSignRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Offset int32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListSMSSignRequest) Reset() {
|
||||
*x = ListSMSSignRequest{}
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListSMSSignRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListSMSSignRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListSMSSignRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListSMSSignRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListSMSSignRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_admin_v1_sms_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *ListSMSSignRequest) GetOffset() int32 {
|
||||
if x != nil {
|
||||
return x.Offset
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SMSSignReason struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
||||
SubContent string `protobuf:"bytes,2,opt,name=sub_content,json=subContent,proto3" json:"sub_content,omitempty"`
|
||||
CreateAt int32 `protobuf:"varint,3,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SMSSignReason) Reset() {
|
||||
*x = SMSSignReason{}
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SMSSignReason) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SMSSignReason) ProtoMessage() {}
|
||||
|
||||
func (x *SMSSignReason) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SMSSignReason.ProtoReflect.Descriptor instead.
|
||||
func (*SMSSignReason) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_admin_v1_sms_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *SMSSignReason) GetContent() string {
|
||||
if x != nil {
|
||||
return x.Content
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SMSSignReason) GetSubContent() string {
|
||||
if x != nil {
|
||||
return x.SubContent
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SMSSignReason) GetCreateAt() int32 {
|
||||
if x != nil {
|
||||
return x.CreateAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type SMSSign struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // 签名ID
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 签名名称
|
||||
Status v1.SMSSignStatus `protobuf:"varint,3,opt,name=status,proto3,enum=corestack.enums.v1.SMSSignStatus" json:"status,omitempty"` // 签名状态
|
||||
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // 签名类型
|
||||
Reasons *SMSSignReason `protobuf:"bytes,5,opt,name=reasons,proto3" json:"reasons,omitempty"` // 签名拒绝原因
|
||||
CreatedAt int32 `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 创建时间
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SMSSign) Reset() {
|
||||
*x = SMSSign{}
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SMSSign) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SMSSign) ProtoMessage() {}
|
||||
|
||||
func (x *SMSSign) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SMSSign.ProtoReflect.Descriptor instead.
|
||||
func (*SMSSign) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_admin_v1_sms_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *SMSSign) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SMSSign) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SMSSign) GetStatus() v1.SMSSignStatus {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return v1.SMSSignStatus(0)
|
||||
}
|
||||
|
||||
func (x *SMSSign) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SMSSign) GetReasons() *SMSSignReason {
|
||||
if x != nil {
|
||||
return x.Reasons
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *SMSSign) GetCreatedAt() int32 {
|
||||
if x != nil {
|
||||
return x.CreatedAt
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type ListSMSSignResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
List []*SMSSign `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
|
||||
Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ListSMSSignResponse) Reset() {
|
||||
*x = ListSMSSignResponse{}
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListSMSSignResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListSMSSignResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListSMSSignResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_admin_v1_sms_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListSMSSignResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListSMSSignResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_admin_v1_sms_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ListSMSSignResponse) GetList() []*SMSSign {
|
||||
if x != nil {
|
||||
return x.List
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ListSMSSignResponse) GetCount() int32 {
|
||||
if x != nil {
|
||||
return x.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_corestack_admin_v1_sms_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_admin_v1_sms_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1ccorestack/admin/v1/sms.proto\x12\x12corestack.admin.v1\x1a\x1ccorestack/enums/v1/sms.proto\"\x8c\x02\n" +
|
||||
"\x0eSendSMSRequest\x12\x14\n" +
|
||||
"\x05phone\x18\x01 \x01(\tR\x05phone\x12\x1b\n" +
|
||||
"\tsign_name\x18\x02 \x01(\tR\bsignName\x12#\n" +
|
||||
"\rtemplate_code\x18\x03 \x01(\tR\ftemplateCode\x12_\n" +
|
||||
"\x0ftemplate_params\x18\x04 \x03(\v26.corestack.admin.v1.SendSMSRequest.TemplateParamsEntryR\x0etemplateParams\x1aA\n" +
|
||||
"\x13TemplateParamsEntry\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
|
||||
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x11\n" +
|
||||
"\x0fSendSMSResponse\",\n" +
|
||||
"\x12ListSMSSignRequest\x12\x16\n" +
|
||||
"\x06offset\x18\x01 \x01(\x05R\x06offset\"g\n" +
|
||||
"\rSMSSignReason\x12\x18\n" +
|
||||
"\acontent\x18\x01 \x01(\tR\acontent\x12\x1f\n" +
|
||||
"\vsub_content\x18\x02 \x01(\tR\n" +
|
||||
"subContent\x12\x1b\n" +
|
||||
"\tcreate_at\x18\x03 \x01(\x05R\bcreateAt\"\xd8\x01\n" +
|
||||
"\aSMSSign\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n" +
|
||||
"\x04name\x18\x02 \x01(\tR\x04name\x129\n" +
|
||||
"\x06status\x18\x03 \x01(\x0e2!.corestack.enums.v1.SMSSignStatusR\x06status\x12\x12\n" +
|
||||
"\x04type\x18\x04 \x01(\tR\x04type\x12;\n" +
|
||||
"\areasons\x18\x05 \x01(\v2!.corestack.admin.v1.SMSSignReasonR\areasons\x12\x1d\n" +
|
||||
"\n" +
|
||||
"created_at\x18\x06 \x01(\x05R\tcreatedAt\"\\\n" +
|
||||
"\x13ListSMSSignResponse\x12/\n" +
|
||||
"\x04list\x18\x01 \x03(\v2\x1b.corestack.admin.v1.SMSSignR\x04list\x12\x14\n" +
|
||||
"\x05count\x18\x02 \x01(\x05R\x05countB=Z;git.shenxianhe.cn/shenxianhe/sdk/corestack/admin/v1;adminv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_corestack_admin_v1_sms_proto_rawDescOnce sync.Once
|
||||
file_corestack_admin_v1_sms_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_corestack_admin_v1_sms_proto_rawDescGZIP() []byte {
|
||||
file_corestack_admin_v1_sms_proto_rawDescOnce.Do(func() {
|
||||
file_corestack_admin_v1_sms_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_corestack_admin_v1_sms_proto_rawDesc), len(file_corestack_admin_v1_sms_proto_rawDesc)))
|
||||
})
|
||||
return file_corestack_admin_v1_sms_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_corestack_admin_v1_sms_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_corestack_admin_v1_sms_proto_goTypes = []any{
|
||||
(*SendSMSRequest)(nil), // 0: corestack.admin.v1.SendSMSRequest
|
||||
(*SendSMSResponse)(nil), // 1: corestack.admin.v1.SendSMSResponse
|
||||
(*ListSMSSignRequest)(nil), // 2: corestack.admin.v1.ListSMSSignRequest
|
||||
(*SMSSignReason)(nil), // 3: corestack.admin.v1.SMSSignReason
|
||||
(*SMSSign)(nil), // 4: corestack.admin.v1.SMSSign
|
||||
(*ListSMSSignResponse)(nil), // 5: corestack.admin.v1.ListSMSSignResponse
|
||||
nil, // 6: corestack.admin.v1.SendSMSRequest.TemplateParamsEntry
|
||||
(v1.SMSSignStatus)(0), // 7: corestack.enums.v1.SMSSignStatus
|
||||
}
|
||||
var file_corestack_admin_v1_sms_proto_depIdxs = []int32{
|
||||
6, // 0: corestack.admin.v1.SendSMSRequest.template_params:type_name -> corestack.admin.v1.SendSMSRequest.TemplateParamsEntry
|
||||
7, // 1: corestack.admin.v1.SMSSign.status:type_name -> corestack.enums.v1.SMSSignStatus
|
||||
3, // 2: corestack.admin.v1.SMSSign.reasons:type_name -> corestack.admin.v1.SMSSignReason
|
||||
4, // 3: corestack.admin.v1.ListSMSSignResponse.list:type_name -> corestack.admin.v1.SMSSign
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_admin_v1_sms_proto_init() }
|
||||
func file_corestack_admin_v1_sms_proto_init() {
|
||||
if File_corestack_admin_v1_sms_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_admin_v1_sms_proto_rawDesc), len(file_corestack_admin_v1_sms_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_corestack_admin_v1_sms_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_admin_v1_sms_proto_depIdxs,
|
||||
MessageInfos: file_corestack_admin_v1_sms_proto_msgTypes,
|
||||
}.Build()
|
||||
File_corestack_admin_v1_sms_proto = out.File
|
||||
file_corestack_admin_v1_sms_proto_goTypes = nil
|
||||
file_corestack_admin_v1_sms_proto_depIdxs = nil
|
||||
}
|
||||
232
corestack/admin/v1/user.pb.go
Normal file
232
corestack/admin/v1/user.pb.go
Normal file
@@ -0,0 +1,232 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/admin/v1/user.proto
|
||||
|
||||
package adminv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type GetUserInfoRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
||||
InvitationCode string `protobuf:"bytes,2,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserInfoRequest) Reset() {
|
||||
*x = GetUserInfoRequest{}
|
||||
mi := &file_corestack_admin_v1_user_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserInfoRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserInfoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_admin_v1_user_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserInfoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_admin_v1_user_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoRequest) GetUserId() string {
|
||||
if x != nil {
|
||||
return x.UserId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoRequest) GetInvitationCode() string {
|
||||
if x != nil {
|
||||
return x.InvitationCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetUserInfoResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
||||
InvitationCode string `protobuf:"bytes,3,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"`
|
||||
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Phone string `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) Reset() {
|
||||
*x = GetUserInfoResponse{}
|
||||
mi := &file_corestack_admin_v1_user_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserInfoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_admin_v1_user_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetUserInfoResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_admin_v1_user_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetAvatar() string {
|
||||
if x != nil {
|
||||
return x.Avatar
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetInvitationCode() string {
|
||||
if x != nil {
|
||||
return x.InvitationCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_corestack_admin_v1_user_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_admin_v1_user_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1dcorestack/admin/v1/user.proto\x12\x12corestack.admin.v1\"V\n" +
|
||||
"\x12GetUserInfoRequest\x12\x17\n" +
|
||||
"\auser_id\x18\x01 \x01(\tR\x06userId\x12'\n" +
|
||||
"\x0finvitation_code\x18\x02 \x01(\tR\x0einvitationCode\"\xc8\x01\n" +
|
||||
"\x13GetUserInfoResponse\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
|
||||
"\x06avatar\x18\x02 \x01(\tR\x06avatar\x12'\n" +
|
||||
"\x0finvitation_code\x18\x03 \x01(\tR\x0einvitationCode\x12 \n" +
|
||||
"\vdescription\x18\x04 \x01(\tR\vdescription\x12\x12\n" +
|
||||
"\x04name\x18\x05 \x01(\tR\x04name\x12\x14\n" +
|
||||
"\x05phone\x18\x06 \x01(\tR\x05phone\x12\x14\n" +
|
||||
"\x05email\x18\a \x01(\tR\x05emailB=Z;git.shenxianhe.cn/shenxianhe/sdk/corestack/admin/v1;adminv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_corestack_admin_v1_user_proto_rawDescOnce sync.Once
|
||||
file_corestack_admin_v1_user_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_corestack_admin_v1_user_proto_rawDescGZIP() []byte {
|
||||
file_corestack_admin_v1_user_proto_rawDescOnce.Do(func() {
|
||||
file_corestack_admin_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_corestack_admin_v1_user_proto_rawDesc), len(file_corestack_admin_v1_user_proto_rawDesc)))
|
||||
})
|
||||
return file_corestack_admin_v1_user_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_corestack_admin_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_corestack_admin_v1_user_proto_goTypes = []any{
|
||||
(*GetUserInfoRequest)(nil), // 0: corestack.admin.v1.GetUserInfoRequest
|
||||
(*GetUserInfoResponse)(nil), // 1: corestack.admin.v1.GetUserInfoResponse
|
||||
}
|
||||
var file_corestack_admin_v1_user_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_admin_v1_user_proto_init() }
|
||||
func file_corestack_admin_v1_user_proto_init() {
|
||||
if File_corestack_admin_v1_user_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_admin_v1_user_proto_rawDesc), len(file_corestack_admin_v1_user_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_corestack_admin_v1_user_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_admin_v1_user_proto_depIdxs,
|
||||
MessageInfos: file_corestack_admin_v1_user_proto_msgTypes,
|
||||
}.Build()
|
||||
File_corestack_admin_v1_user_proto = out.File
|
||||
file_corestack_admin_v1_user_proto_goTypes = nil
|
||||
file_corestack_admin_v1_user_proto_depIdxs = nil
|
||||
}
|
||||
138
corestack/anonymous/v1/anonymousv1connect/service.connect.go
Normal file
138
corestack/anonymous/v1/anonymousv1connect/service.connect.go
Normal file
@@ -0,0 +1,138 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: corestack/anonymous/v1/service.proto
|
||||
|
||||
package anonymousv1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "git.shenxianhe.cn/shenxianhe/sdk/corestack/anonymous/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// AnonymousServiceName is the fully-qualified name of the AnonymousService service.
|
||||
AnonymousServiceName = "corestack.anonymous.v1.AnonymousService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// AnonymousServiceAuthProcedure is the fully-qualified name of the AnonymousService's Auth RPC.
|
||||
AnonymousServiceAuthProcedure = "/corestack.anonymous.v1.AnonymousService/Auth"
|
||||
// AnonymousServiceSendCredentialProcedure is the fully-qualified name of the AnonymousService's
|
||||
// SendCredential RPC.
|
||||
AnonymousServiceSendCredentialProcedure = "/corestack.anonymous.v1.AnonymousService/SendCredential"
|
||||
)
|
||||
|
||||
// AnonymousServiceClient is a client for the corestack.anonymous.v1.AnonymousService service.
|
||||
type AnonymousServiceClient interface {
|
||||
Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error)
|
||||
SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error)
|
||||
}
|
||||
|
||||
// NewAnonymousServiceClient constructs a client for the corestack.anonymous.v1.AnonymousService
|
||||
// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
|
||||
// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
|
||||
// the connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewAnonymousServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) AnonymousServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
anonymousServiceMethods := v1.File_corestack_anonymous_v1_service_proto.Services().ByName("AnonymousService").Methods()
|
||||
return &anonymousServiceClient{
|
||||
auth: connect.NewClient[v1.AuthRequest, v1.AuthResponse](
|
||||
httpClient,
|
||||
baseURL+AnonymousServiceAuthProcedure,
|
||||
connect.WithSchema(anonymousServiceMethods.ByName("Auth")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
sendCredential: connect.NewClient[v1.SendCredentialRequest, v1.SendCredentialResponse](
|
||||
httpClient,
|
||||
baseURL+AnonymousServiceSendCredentialProcedure,
|
||||
connect.WithSchema(anonymousServiceMethods.ByName("SendCredential")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// anonymousServiceClient implements AnonymousServiceClient.
|
||||
type anonymousServiceClient struct {
|
||||
auth *connect.Client[v1.AuthRequest, v1.AuthResponse]
|
||||
sendCredential *connect.Client[v1.SendCredentialRequest, v1.SendCredentialResponse]
|
||||
}
|
||||
|
||||
// Auth calls corestack.anonymous.v1.AnonymousService.Auth.
|
||||
func (c *anonymousServiceClient) Auth(ctx context.Context, req *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) {
|
||||
return c.auth.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SendCredential calls corestack.anonymous.v1.AnonymousService.SendCredential.
|
||||
func (c *anonymousServiceClient) SendCredential(ctx context.Context, req *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) {
|
||||
return c.sendCredential.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// AnonymousServiceHandler is an implementation of the corestack.anonymous.v1.AnonymousService
|
||||
// service.
|
||||
type AnonymousServiceHandler interface {
|
||||
Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error)
|
||||
SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error)
|
||||
}
|
||||
|
||||
// NewAnonymousServiceHandler builds an HTTP handler from the service implementation. It returns the
|
||||
// path on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewAnonymousServiceHandler(svc AnonymousServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
anonymousServiceMethods := v1.File_corestack_anonymous_v1_service_proto.Services().ByName("AnonymousService").Methods()
|
||||
anonymousServiceAuthHandler := connect.NewUnaryHandler(
|
||||
AnonymousServiceAuthProcedure,
|
||||
svc.Auth,
|
||||
connect.WithSchema(anonymousServiceMethods.ByName("Auth")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
anonymousServiceSendCredentialHandler := connect.NewUnaryHandler(
|
||||
AnonymousServiceSendCredentialProcedure,
|
||||
svc.SendCredential,
|
||||
connect.WithSchema(anonymousServiceMethods.ByName("SendCredential")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/corestack.anonymous.v1.AnonymousService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case AnonymousServiceAuthProcedure:
|
||||
anonymousServiceAuthHandler.ServeHTTP(w, r)
|
||||
case AnonymousServiceSendCredentialProcedure:
|
||||
anonymousServiceSendCredentialHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedAnonymousServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedAnonymousServiceHandler struct{}
|
||||
|
||||
func (UnimplementedAnonymousServiceHandler) Auth(context.Context, *connect.Request[v1.AuthRequest]) (*connect.Response[v1.AuthResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.anonymous.v1.AnonymousService.Auth is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedAnonymousServiceHandler) SendCredential(context.Context, *connect.Request[v1.SendCredentialRequest]) (*connect.Response[v1.SendCredentialResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.anonymous.v1.AnonymousService.SendCredential is not implemented"))
|
||||
}
|
||||
72
corestack/anonymous/v1/service.pb.go
Normal file
72
corestack/anonymous/v1/service.pb.go
Normal file
@@ -0,0 +1,72 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/anonymous/v1/service.proto
|
||||
|
||||
package anonymousv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_corestack_anonymous_v1_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_anonymous_v1_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"$corestack/anonymous/v1/service.proto\x12\x16corestack.anonymous.v1\x1a!corestack/anonymous/v1/user.proto2\xd6\x01\n" +
|
||||
"\x10AnonymousService\x12Q\n" +
|
||||
"\x04Auth\x12#.corestack.anonymous.v1.AuthRequest\x1a$.corestack.anonymous.v1.AuthResponse\x12o\n" +
|
||||
"\x0eSendCredential\x12-.corestack.anonymous.v1.SendCredentialRequest\x1a..corestack.anonymous.v1.SendCredentialResponseBEZCgit.shenxianhe.cn/shenxianhe/sdk/corestack/anonymous/v1;anonymousv1b\x06proto3"
|
||||
|
||||
var file_corestack_anonymous_v1_service_proto_goTypes = []any{
|
||||
(*AuthRequest)(nil), // 0: corestack.anonymous.v1.AuthRequest
|
||||
(*SendCredentialRequest)(nil), // 1: corestack.anonymous.v1.SendCredentialRequest
|
||||
(*AuthResponse)(nil), // 2: corestack.anonymous.v1.AuthResponse
|
||||
(*SendCredentialResponse)(nil), // 3: corestack.anonymous.v1.SendCredentialResponse
|
||||
}
|
||||
var file_corestack_anonymous_v1_service_proto_depIdxs = []int32{
|
||||
0, // 0: corestack.anonymous.v1.AnonymousService.Auth:input_type -> corestack.anonymous.v1.AuthRequest
|
||||
1, // 1: corestack.anonymous.v1.AnonymousService.SendCredential:input_type -> corestack.anonymous.v1.SendCredentialRequest
|
||||
2, // 2: corestack.anonymous.v1.AnonymousService.Auth:output_type -> corestack.anonymous.v1.AuthResponse
|
||||
3, // 3: corestack.anonymous.v1.AnonymousService.SendCredential:output_type -> corestack.anonymous.v1.SendCredentialResponse
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_anonymous_v1_service_proto_init() }
|
||||
func file_corestack_anonymous_v1_service_proto_init() {
|
||||
if File_corestack_anonymous_v1_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_corestack_anonymous_v1_user_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_anonymous_v1_service_proto_rawDesc), len(file_corestack_anonymous_v1_service_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_corestack_anonymous_v1_service_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_anonymous_v1_service_proto_depIdxs,
|
||||
}.Build()
|
||||
File_corestack_anonymous_v1_service_proto = out.File
|
||||
file_corestack_anonymous_v1_service_proto_goTypes = nil
|
||||
file_corestack_anonymous_v1_service_proto_depIdxs = nil
|
||||
}
|
||||
296
corestack/anonymous/v1/user.pb.go
Normal file
296
corestack/anonymous/v1/user.pb.go
Normal file
@@ -0,0 +1,296 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/anonymous/v1/user.proto
|
||||
|
||||
package anonymousv1
|
||||
|
||||
import (
|
||||
v1 "git.shenxianhe.cn/shenxianhe/sdk/corestack/enums/v1"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type AuthRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AuthType v1.AuthenticationType `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=corestack.enums.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型
|
||||
AuthId string `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"` // 认证ID,根据auth_type存储不同的账号信息
|
||||
Credential string `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"` // 凭证,可以是验证码或密码
|
||||
InvitationCode string `protobuf:"bytes,4,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"` // 邀请码
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AuthRequest) Reset() {
|
||||
*x = AuthRequest{}
|
||||
mi := &file_corestack_anonymous_v1_user_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AuthRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AuthRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AuthRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_anonymous_v1_user_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AuthRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_anonymous_v1_user_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *AuthRequest) GetAuthType() v1.AuthenticationType {
|
||||
if x != nil {
|
||||
return x.AuthType
|
||||
}
|
||||
return v1.AuthenticationType(0)
|
||||
}
|
||||
|
||||
func (x *AuthRequest) GetAuthId() string {
|
||||
if x != nil {
|
||||
return x.AuthId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AuthRequest) GetCredential() string {
|
||||
if x != nil {
|
||||
return x.Credential
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AuthRequest) GetInvitationCode() string {
|
||||
if x != nil {
|
||||
return x.InvitationCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type AuthResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *AuthResponse) Reset() {
|
||||
*x = AuthResponse{}
|
||||
mi := &file_corestack_anonymous_v1_user_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AuthResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AuthResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AuthResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_anonymous_v1_user_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AuthResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_anonymous_v1_user_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AuthResponse) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SendCredentialRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AuthType v1.AuthenticationType `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=corestack.enums.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型
|
||||
AuthId string `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"` // 认证ID,根据auth_type存储不同的账号信息
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendCredentialRequest) Reset() {
|
||||
*x = SendCredentialRequest{}
|
||||
mi := &file_corestack_anonymous_v1_user_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendCredentialRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendCredentialRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SendCredentialRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_anonymous_v1_user_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendCredentialRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SendCredentialRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_anonymous_v1_user_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SendCredentialRequest) GetAuthType() v1.AuthenticationType {
|
||||
if x != nil {
|
||||
return x.AuthType
|
||||
}
|
||||
return v1.AuthenticationType(0)
|
||||
}
|
||||
|
||||
func (x *SendCredentialRequest) GetAuthId() string {
|
||||
if x != nil {
|
||||
return x.AuthId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SendCredentialResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SendCredentialResponse) Reset() {
|
||||
*x = SendCredentialResponse{}
|
||||
mi := &file_corestack_anonymous_v1_user_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SendCredentialResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SendCredentialResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SendCredentialResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_anonymous_v1_user_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SendCredentialResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SendCredentialResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_anonymous_v1_user_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
var File_corestack_anonymous_v1_user_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_anonymous_v1_user_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"!corestack/anonymous/v1/user.proto\x12\x16corestack.anonymous.v1\x1a\x1dcorestack/enums/v1/user.proto\"\xb4\x01\n" +
|
||||
"\vAuthRequest\x12C\n" +
|
||||
"\tauth_type\x18\x01 \x01(\x0e2&.corestack.enums.v1.AuthenticationTypeR\bauthType\x12\x17\n" +
|
||||
"\aauth_id\x18\x02 \x01(\tR\x06authId\x12\x1e\n" +
|
||||
"\n" +
|
||||
"credential\x18\x03 \x01(\tR\n" +
|
||||
"credential\x12'\n" +
|
||||
"\x0finvitation_code\x18\x04 \x01(\tR\x0einvitationCode\"$\n" +
|
||||
"\fAuthResponse\x12\x14\n" +
|
||||
"\x05token\x18\x01 \x01(\tR\x05token\"u\n" +
|
||||
"\x15SendCredentialRequest\x12C\n" +
|
||||
"\tauth_type\x18\x01 \x01(\x0e2&.corestack.enums.v1.AuthenticationTypeR\bauthType\x12\x17\n" +
|
||||
"\aauth_id\x18\x02 \x01(\tR\x06authId\"\x18\n" +
|
||||
"\x16SendCredentialResponseBEZCgit.shenxianhe.cn/shenxianhe/sdk/corestack/anonymous/v1;anonymousv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_corestack_anonymous_v1_user_proto_rawDescOnce sync.Once
|
||||
file_corestack_anonymous_v1_user_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_corestack_anonymous_v1_user_proto_rawDescGZIP() []byte {
|
||||
file_corestack_anonymous_v1_user_proto_rawDescOnce.Do(func() {
|
||||
file_corestack_anonymous_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_corestack_anonymous_v1_user_proto_rawDesc), len(file_corestack_anonymous_v1_user_proto_rawDesc)))
|
||||
})
|
||||
return file_corestack_anonymous_v1_user_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_corestack_anonymous_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_corestack_anonymous_v1_user_proto_goTypes = []any{
|
||||
(*AuthRequest)(nil), // 0: corestack.anonymous.v1.AuthRequest
|
||||
(*AuthResponse)(nil), // 1: corestack.anonymous.v1.AuthResponse
|
||||
(*SendCredentialRequest)(nil), // 2: corestack.anonymous.v1.SendCredentialRequest
|
||||
(*SendCredentialResponse)(nil), // 3: corestack.anonymous.v1.SendCredentialResponse
|
||||
(v1.AuthenticationType)(0), // 4: corestack.enums.v1.AuthenticationType
|
||||
}
|
||||
var file_corestack_anonymous_v1_user_proto_depIdxs = []int32{
|
||||
4, // 0: corestack.anonymous.v1.AuthRequest.auth_type:type_name -> corestack.enums.v1.AuthenticationType
|
||||
4, // 1: corestack.anonymous.v1.SendCredentialRequest.auth_type:type_name -> corestack.enums.v1.AuthenticationType
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_anonymous_v1_user_proto_init() }
|
||||
func file_corestack_anonymous_v1_user_proto_init() {
|
||||
if File_corestack_anonymous_v1_user_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_anonymous_v1_user_proto_rawDesc), len(file_corestack_anonymous_v1_user_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_corestack_anonymous_v1_user_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_anonymous_v1_user_proto_depIdxs,
|
||||
MessageInfos: file_corestack_anonymous_v1_user_proto_msgTypes,
|
||||
}.Build()
|
||||
File_corestack_anonymous_v1_user_proto = out.File
|
||||
file_corestack_anonymous_v1_user_proto_goTypes = nil
|
||||
file_corestack_anonymous_v1_user_proto_depIdxs = nil
|
||||
}
|
||||
137
corestack/enums/v1/sms.pb.go
Normal file
137
corestack/enums/v1/sms.pb.go
Normal file
@@ -0,0 +1,137 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/enums/v1/sms.proto
|
||||
|
||||
package enumsv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type SMSSignStatus int32
|
||||
|
||||
const (
|
||||
SMSSignStatus_SMS_SIGN_STATUS_UNSPECIFIED SMSSignStatus = 0
|
||||
SMSSignStatus_SMS_SIGN_STATUS_APPLYING SMSSignStatus = 1 // 审核中
|
||||
SMSSignStatus_SMS_SIGN_STATUS_PASSED SMSSignStatus = 2 // 审核通过
|
||||
SMSSignStatus_SMS_SIGN_STATUS_REJECTED SMSSignStatus = 3 // 审核拒绝
|
||||
SMSSignStatus_SMS_SIGN_STATUS_CANCELED SMSSignStatus = 4 // 已取消
|
||||
)
|
||||
|
||||
// Enum value maps for SMSSignStatus.
|
||||
var (
|
||||
SMSSignStatus_name = map[int32]string{
|
||||
0: "SMS_SIGN_STATUS_UNSPECIFIED",
|
||||
1: "SMS_SIGN_STATUS_APPLYING",
|
||||
2: "SMS_SIGN_STATUS_PASSED",
|
||||
3: "SMS_SIGN_STATUS_REJECTED",
|
||||
4: "SMS_SIGN_STATUS_CANCELED",
|
||||
}
|
||||
SMSSignStatus_value = map[string]int32{
|
||||
"SMS_SIGN_STATUS_UNSPECIFIED": 0,
|
||||
"SMS_SIGN_STATUS_APPLYING": 1,
|
||||
"SMS_SIGN_STATUS_PASSED": 2,
|
||||
"SMS_SIGN_STATUS_REJECTED": 3,
|
||||
"SMS_SIGN_STATUS_CANCELED": 4,
|
||||
}
|
||||
)
|
||||
|
||||
func (x SMSSignStatus) Enum() *SMSSignStatus {
|
||||
p := new(SMSSignStatus)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x SMSSignStatus) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (SMSSignStatus) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_corestack_enums_v1_sms_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (SMSSignStatus) Type() protoreflect.EnumType {
|
||||
return &file_corestack_enums_v1_sms_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x SMSSignStatus) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SMSSignStatus.Descriptor instead.
|
||||
func (SMSSignStatus) EnumDescriptor() ([]byte, []int) {
|
||||
return file_corestack_enums_v1_sms_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_corestack_enums_v1_sms_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_enums_v1_sms_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1ccorestack/enums/v1/sms.proto\x12\x12corestack.enums.v1*\xa6\x01\n" +
|
||||
"\rSMSSignStatus\x12\x1f\n" +
|
||||
"\x1bSMS_SIGN_STATUS_UNSPECIFIED\x10\x00\x12\x1c\n" +
|
||||
"\x18SMS_SIGN_STATUS_APPLYING\x10\x01\x12\x1a\n" +
|
||||
"\x16SMS_SIGN_STATUS_PASSED\x10\x02\x12\x1c\n" +
|
||||
"\x18SMS_SIGN_STATUS_REJECTED\x10\x03\x12\x1c\n" +
|
||||
"\x18SMS_SIGN_STATUS_CANCELED\x10\x04B=Z;git.shenxianhe.cn/shenxianhe/sdk/corestack/enums/v1;enumsv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_corestack_enums_v1_sms_proto_rawDescOnce sync.Once
|
||||
file_corestack_enums_v1_sms_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_corestack_enums_v1_sms_proto_rawDescGZIP() []byte {
|
||||
file_corestack_enums_v1_sms_proto_rawDescOnce.Do(func() {
|
||||
file_corestack_enums_v1_sms_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_corestack_enums_v1_sms_proto_rawDesc), len(file_corestack_enums_v1_sms_proto_rawDesc)))
|
||||
})
|
||||
return file_corestack_enums_v1_sms_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_corestack_enums_v1_sms_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_corestack_enums_v1_sms_proto_goTypes = []any{
|
||||
(SMSSignStatus)(0), // 0: corestack.enums.v1.SMSSignStatus
|
||||
}
|
||||
var file_corestack_enums_v1_sms_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_enums_v1_sms_proto_init() }
|
||||
func file_corestack_enums_v1_sms_proto_init() {
|
||||
if File_corestack_enums_v1_sms_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_enums_v1_sms_proto_rawDesc), len(file_corestack_enums_v1_sms_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_corestack_enums_v1_sms_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_enums_v1_sms_proto_depIdxs,
|
||||
EnumInfos: file_corestack_enums_v1_sms_proto_enumTypes,
|
||||
}.Build()
|
||||
File_corestack_enums_v1_sms_proto = out.File
|
||||
file_corestack_enums_v1_sms_proto_goTypes = nil
|
||||
file_corestack_enums_v1_sms_proto_depIdxs = nil
|
||||
}
|
||||
138
corestack/enums/v1/user.pb.go
Normal file
138
corestack/enums/v1/user.pb.go
Normal file
@@ -0,0 +1,138 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/enums/v1/user.proto
|
||||
|
||||
package enumsv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 认证类型枚举
|
||||
type AuthenticationType int32
|
||||
|
||||
const (
|
||||
AuthenticationType_AUTHENTICATION_TYPE_UNSPECIFIED AuthenticationType = 0
|
||||
AuthenticationType_AUTHENTICATION_TYPE_NAME AuthenticationType = 1 // 用户名
|
||||
AuthenticationType_AUTHENTICATION_TYPE_PHONE AuthenticationType = 2 // 手机号
|
||||
AuthenticationType_AUTHENTICATION_TYPE_EMAIL AuthenticationType = 3 // 邮箱
|
||||
AuthenticationType_AUTHENTICATION_TYPE_WECHAT AuthenticationType = 4 // 微信
|
||||
)
|
||||
|
||||
// Enum value maps for AuthenticationType.
|
||||
var (
|
||||
AuthenticationType_name = map[int32]string{
|
||||
0: "AUTHENTICATION_TYPE_UNSPECIFIED",
|
||||
1: "AUTHENTICATION_TYPE_NAME",
|
||||
2: "AUTHENTICATION_TYPE_PHONE",
|
||||
3: "AUTHENTICATION_TYPE_EMAIL",
|
||||
4: "AUTHENTICATION_TYPE_WECHAT",
|
||||
}
|
||||
AuthenticationType_value = map[string]int32{
|
||||
"AUTHENTICATION_TYPE_UNSPECIFIED": 0,
|
||||
"AUTHENTICATION_TYPE_NAME": 1,
|
||||
"AUTHENTICATION_TYPE_PHONE": 2,
|
||||
"AUTHENTICATION_TYPE_EMAIL": 3,
|
||||
"AUTHENTICATION_TYPE_WECHAT": 4,
|
||||
}
|
||||
)
|
||||
|
||||
func (x AuthenticationType) Enum() *AuthenticationType {
|
||||
p := new(AuthenticationType)
|
||||
*p = x
|
||||
return p
|
||||
}
|
||||
|
||||
func (x AuthenticationType) String() string {
|
||||
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
|
||||
}
|
||||
|
||||
func (AuthenticationType) Descriptor() protoreflect.EnumDescriptor {
|
||||
return file_corestack_enums_v1_user_proto_enumTypes[0].Descriptor()
|
||||
}
|
||||
|
||||
func (AuthenticationType) Type() protoreflect.EnumType {
|
||||
return &file_corestack_enums_v1_user_proto_enumTypes[0]
|
||||
}
|
||||
|
||||
func (x AuthenticationType) Number() protoreflect.EnumNumber {
|
||||
return protoreflect.EnumNumber(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AuthenticationType.Descriptor instead.
|
||||
func (AuthenticationType) EnumDescriptor() ([]byte, []int) {
|
||||
return file_corestack_enums_v1_user_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_corestack_enums_v1_user_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_enums_v1_user_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1dcorestack/enums/v1/user.proto\x12\x12corestack.enums.v1*\xb5\x01\n" +
|
||||
"\x12AuthenticationType\x12#\n" +
|
||||
"\x1fAUTHENTICATION_TYPE_UNSPECIFIED\x10\x00\x12\x1c\n" +
|
||||
"\x18AUTHENTICATION_TYPE_NAME\x10\x01\x12\x1d\n" +
|
||||
"\x19AUTHENTICATION_TYPE_PHONE\x10\x02\x12\x1d\n" +
|
||||
"\x19AUTHENTICATION_TYPE_EMAIL\x10\x03\x12\x1e\n" +
|
||||
"\x1aAUTHENTICATION_TYPE_WECHAT\x10\x04B=Z;git.shenxianhe.cn/shenxianhe/sdk/corestack/enums/v1;enumsv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_corestack_enums_v1_user_proto_rawDescOnce sync.Once
|
||||
file_corestack_enums_v1_user_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_corestack_enums_v1_user_proto_rawDescGZIP() []byte {
|
||||
file_corestack_enums_v1_user_proto_rawDescOnce.Do(func() {
|
||||
file_corestack_enums_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_corestack_enums_v1_user_proto_rawDesc), len(file_corestack_enums_v1_user_proto_rawDesc)))
|
||||
})
|
||||
return file_corestack_enums_v1_user_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_corestack_enums_v1_user_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||
var file_corestack_enums_v1_user_proto_goTypes = []any{
|
||||
(AuthenticationType)(0), // 0: corestack.enums.v1.AuthenticationType
|
||||
}
|
||||
var file_corestack_enums_v1_user_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_enums_v1_user_proto_init() }
|
||||
func file_corestack_enums_v1_user_proto_init() {
|
||||
if File_corestack_enums_v1_user_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_enums_v1_user_proto_rawDesc), len(file_corestack_enums_v1_user_proto_rawDesc)),
|
||||
NumEnums: 1,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_corestack_enums_v1_user_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_enums_v1_user_proto_depIdxs,
|
||||
EnumInfos: file_corestack_enums_v1_user_proto_enumTypes,
|
||||
}.Build()
|
||||
File_corestack_enums_v1_user_proto = out.File
|
||||
file_corestack_enums_v1_user_proto_goTypes = nil
|
||||
file_corestack_enums_v1_user_proto_depIdxs = nil
|
||||
}
|
||||
92
corestack/user/v1/service.pb.go
Normal file
92
corestack/user/v1/service.pb.go
Normal file
@@ -0,0 +1,92 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/user/v1/service.proto
|
||||
|
||||
package userv1
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
var File_corestack_user_v1_service_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_user_v1_service_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1fcorestack/user/v1/service.proto\x12\x11corestack.user.v1\x1a\x1ccorestack/user/v1/user.proto2\xcd\x04\n" +
|
||||
"\vUserService\x12\\\n" +
|
||||
"\vSetPassword\x12%.corestack.user.v1.SetPasswordRequest\x1a&.corestack.user.v1.SetPasswordResponse\x12P\n" +
|
||||
"\aSetName\x12!.corestack.user.v1.SetNameRequest\x1a\".corestack.user.v1.SetNameResponse\x12q\n" +
|
||||
"\x12GetAvatarUploadURL\x12,.corestack.user.v1.GetAvatarUploadURLRequest\x1a-.corestack.user.v1.GetAvatarUploadURLResponse\x12V\n" +
|
||||
"\tSetAvatar\x12#.corestack.user.v1.SetAvatarRequest\x1a$.corestack.user.v1.SetAvatarResponse\x12e\n" +
|
||||
"\x0eSetDescription\x12(.corestack.user.v1.SetDescriptionRequest\x1a).corestack.user.v1.SetDescriptionResponse\x12\\\n" +
|
||||
"\vGetUserInfo\x12%.corestack.user.v1.GetUserInfoRequest\x1a&.corestack.user.v1.GetUserInfoResponseB;Z9git.shenxianhe.cn/shenxianhe/sdk/corestack/user/v1;userv1b\x06proto3"
|
||||
|
||||
var file_corestack_user_v1_service_proto_goTypes = []any{
|
||||
(*SetPasswordRequest)(nil), // 0: corestack.user.v1.SetPasswordRequest
|
||||
(*SetNameRequest)(nil), // 1: corestack.user.v1.SetNameRequest
|
||||
(*GetAvatarUploadURLRequest)(nil), // 2: corestack.user.v1.GetAvatarUploadURLRequest
|
||||
(*SetAvatarRequest)(nil), // 3: corestack.user.v1.SetAvatarRequest
|
||||
(*SetDescriptionRequest)(nil), // 4: corestack.user.v1.SetDescriptionRequest
|
||||
(*GetUserInfoRequest)(nil), // 5: corestack.user.v1.GetUserInfoRequest
|
||||
(*SetPasswordResponse)(nil), // 6: corestack.user.v1.SetPasswordResponse
|
||||
(*SetNameResponse)(nil), // 7: corestack.user.v1.SetNameResponse
|
||||
(*GetAvatarUploadURLResponse)(nil), // 8: corestack.user.v1.GetAvatarUploadURLResponse
|
||||
(*SetAvatarResponse)(nil), // 9: corestack.user.v1.SetAvatarResponse
|
||||
(*SetDescriptionResponse)(nil), // 10: corestack.user.v1.SetDescriptionResponse
|
||||
(*GetUserInfoResponse)(nil), // 11: corestack.user.v1.GetUserInfoResponse
|
||||
}
|
||||
var file_corestack_user_v1_service_proto_depIdxs = []int32{
|
||||
0, // 0: corestack.user.v1.UserService.SetPassword:input_type -> corestack.user.v1.SetPasswordRequest
|
||||
1, // 1: corestack.user.v1.UserService.SetName:input_type -> corestack.user.v1.SetNameRequest
|
||||
2, // 2: corestack.user.v1.UserService.GetAvatarUploadURL:input_type -> corestack.user.v1.GetAvatarUploadURLRequest
|
||||
3, // 3: corestack.user.v1.UserService.SetAvatar:input_type -> corestack.user.v1.SetAvatarRequest
|
||||
4, // 4: corestack.user.v1.UserService.SetDescription:input_type -> corestack.user.v1.SetDescriptionRequest
|
||||
5, // 5: corestack.user.v1.UserService.GetUserInfo:input_type -> corestack.user.v1.GetUserInfoRequest
|
||||
6, // 6: corestack.user.v1.UserService.SetPassword:output_type -> corestack.user.v1.SetPasswordResponse
|
||||
7, // 7: corestack.user.v1.UserService.SetName:output_type -> corestack.user.v1.SetNameResponse
|
||||
8, // 8: corestack.user.v1.UserService.GetAvatarUploadURL:output_type -> corestack.user.v1.GetAvatarUploadURLResponse
|
||||
9, // 9: corestack.user.v1.UserService.SetAvatar:output_type -> corestack.user.v1.SetAvatarResponse
|
||||
10, // 10: corestack.user.v1.UserService.SetDescription:output_type -> corestack.user.v1.SetDescriptionResponse
|
||||
11, // 11: corestack.user.v1.UserService.GetUserInfo:output_type -> corestack.user.v1.GetUserInfoResponse
|
||||
6, // [6:12] is the sub-list for method output_type
|
||||
0, // [0:6] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_user_v1_service_proto_init() }
|
||||
func file_corestack_user_v1_service_proto_init() {
|
||||
if File_corestack_user_v1_service_proto != nil {
|
||||
return
|
||||
}
|
||||
file_corestack_user_v1_user_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_user_v1_service_proto_rawDesc), len(file_corestack_user_v1_service_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_corestack_user_v1_service_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_user_v1_service_proto_depIdxs,
|
||||
}.Build()
|
||||
File_corestack_user_v1_service_proto = out.File
|
||||
file_corestack_user_v1_service_proto_goTypes = nil
|
||||
file_corestack_user_v1_service_proto_depIdxs = nil
|
||||
}
|
||||
680
corestack/user/v1/user.pb.go
Normal file
680
corestack/user/v1/user.pb.go
Normal file
@@ -0,0 +1,680 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.7
|
||||
// protoc (unknown)
|
||||
// source: corestack/user/v1/user.proto
|
||||
|
||||
package userv1
|
||||
|
||||
import (
|
||||
v1 "git.shenxianhe.cn/shenxianhe/sdk/corestack/enums/v1"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type SetPasswordRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AuthType v1.AuthenticationType `protobuf:"varint,1,opt,name=auth_type,json=authType,proto3,enum=corestack.enums.v1.AuthenticationType" json:"auth_type,omitempty"` // 认证类型
|
||||
AuthId string `protobuf:"bytes,2,opt,name=auth_id,json=authId,proto3" json:"auth_id,omitempty"` // 认证ID,根据auth_type存储不同的账号信息
|
||||
Credential string `protobuf:"bytes,3,opt,name=credential,proto3" json:"credential,omitempty"` // 凭证,可以是验证码或旧密码
|
||||
Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // 新密码
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetPasswordRequest) Reset() {
|
||||
*x = SetPasswordRequest{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetPasswordRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetPasswordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SetPasswordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetPasswordRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SetPasswordRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *SetPasswordRequest) GetAuthType() v1.AuthenticationType {
|
||||
if x != nil {
|
||||
return x.AuthType
|
||||
}
|
||||
return v1.AuthenticationType(0)
|
||||
}
|
||||
|
||||
func (x *SetPasswordRequest) GetAuthId() string {
|
||||
if x != nil {
|
||||
return x.AuthId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SetPasswordRequest) GetCredential() string {
|
||||
if x != nil {
|
||||
return x.Credential
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *SetPasswordRequest) GetPassword() string {
|
||||
if x != nil {
|
||||
return x.Password
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SetPasswordResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetPasswordResponse) Reset() {
|
||||
*x = SetPasswordResponse{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetPasswordResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetPasswordResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SetPasswordResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetPasswordResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SetPasswordResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
type SetNameRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetNameRequest) Reset() {
|
||||
*x = SetNameRequest{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetNameRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetNameRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SetNameRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[2]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetNameRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SetNameRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *SetNameRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SetNameResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetNameResponse) Reset() {
|
||||
*x = SetNameResponse{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetNameResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetNameResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SetNameResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[3]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetNameResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SetNameResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type GetAvatarUploadURLRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetAvatarUploadURLRequest) Reset() {
|
||||
*x = GetAvatarUploadURLRequest{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetAvatarUploadURLRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetAvatarUploadURLRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetAvatarUploadURLRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[4]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetAvatarUploadURLRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetAvatarUploadURLRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type GetAvatarUploadURLResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetAvatarUploadURLResponse) Reset() {
|
||||
*x = GetAvatarUploadURLResponse{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetAvatarUploadURLResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetAvatarUploadURLResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetAvatarUploadURLResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetAvatarUploadURLResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetAvatarUploadURLResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GetAvatarUploadURLResponse) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetAvatarUploadURLResponse) GetUrl() string {
|
||||
if x != nil {
|
||||
return x.Url
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SetAvatarRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetAvatarRequest) Reset() {
|
||||
*x = SetAvatarRequest{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetAvatarRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetAvatarRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SetAvatarRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetAvatarRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SetAvatarRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *SetAvatarRequest) GetKey() string {
|
||||
if x != nil {
|
||||
return x.Key
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SetAvatarResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetAvatarResponse) Reset() {
|
||||
*x = SetAvatarResponse{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetAvatarResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetAvatarResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SetAvatarResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[7]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetAvatarResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SetAvatarResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{7}
|
||||
}
|
||||
|
||||
type SetDescriptionRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetDescriptionRequest) Reset() {
|
||||
*x = SetDescriptionRequest{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetDescriptionRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetDescriptionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *SetDescriptionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[8]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetDescriptionRequest.ProtoReflect.Descriptor instead.
|
||||
func (*SetDescriptionRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{8}
|
||||
}
|
||||
|
||||
func (x *SetDescriptionRequest) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type SetDescriptionResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetDescriptionResponse) Reset() {
|
||||
*x = SetDescriptionResponse{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *SetDescriptionResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*SetDescriptionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *SetDescriptionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[9]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use SetDescriptionResponse.ProtoReflect.Descriptor instead.
|
||||
func (*SetDescriptionResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{9}
|
||||
}
|
||||
|
||||
type GetUserInfoRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserInfoRequest) Reset() {
|
||||
*x = GetUserInfoRequest{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserInfoRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserInfoRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[10]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserInfoRequest) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{10}
|
||||
}
|
||||
|
||||
type GetUserInfoResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"`
|
||||
InvitationCode string `protobuf:"bytes,3,opt,name=invitation_code,json=invitationCode,proto3" json:"invitation_code,omitempty"`
|
||||
Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
|
||||
Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Phone string `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"`
|
||||
Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) Reset() {
|
||||
*x = GetUserInfoResponse{}
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetUserInfoResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserInfoResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_corestack_user_v1_user_proto_msgTypes[11]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GetUserInfoResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetUserInfoResponse) Descriptor() ([]byte, []int) {
|
||||
return file_corestack_user_v1_user_proto_rawDescGZIP(), []int{11}
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetAvatar() string {
|
||||
if x != nil {
|
||||
return x.Avatar
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetInvitationCode() string {
|
||||
if x != nil {
|
||||
return x.InvitationCode
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetDescription() string {
|
||||
if x != nil {
|
||||
return x.Description
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetPhone() string {
|
||||
if x != nil {
|
||||
return x.Phone
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GetUserInfoResponse) GetEmail() string {
|
||||
if x != nil {
|
||||
return x.Email
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
var File_corestack_user_v1_user_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_corestack_user_v1_user_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x1ccorestack/user/v1/user.proto\x12\x11corestack.user.v1\x1a\x1dcorestack/enums/v1/user.proto\"\xae\x01\n" +
|
||||
"\x12SetPasswordRequest\x12C\n" +
|
||||
"\tauth_type\x18\x01 \x01(\x0e2&.corestack.enums.v1.AuthenticationTypeR\bauthType\x12\x17\n" +
|
||||
"\aauth_id\x18\x02 \x01(\tR\x06authId\x12\x1e\n" +
|
||||
"\n" +
|
||||
"credential\x18\x03 \x01(\tR\n" +
|
||||
"credential\x12\x1a\n" +
|
||||
"\bpassword\x18\x04 \x01(\tR\bpassword\"\x15\n" +
|
||||
"\x13SetPasswordResponse\"$\n" +
|
||||
"\x0eSetNameRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\"\x11\n" +
|
||||
"\x0fSetNameResponse\"\x1b\n" +
|
||||
"\x19GetAvatarUploadURLRequest\"@\n" +
|
||||
"\x1aGetAvatarUploadURLResponse\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\x12\x10\n" +
|
||||
"\x03url\x18\x02 \x01(\tR\x03url\"$\n" +
|
||||
"\x10SetAvatarRequest\x12\x10\n" +
|
||||
"\x03key\x18\x01 \x01(\tR\x03key\"\x13\n" +
|
||||
"\x11SetAvatarResponse\"9\n" +
|
||||
"\x15SetDescriptionRequest\x12 \n" +
|
||||
"\vdescription\x18\x01 \x01(\tR\vdescription\"\x18\n" +
|
||||
"\x16SetDescriptionResponse\"\x14\n" +
|
||||
"\x12GetUserInfoRequest\"\xc8\x01\n" +
|
||||
"\x13GetUserInfoResponse\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
|
||||
"\x06avatar\x18\x02 \x01(\tR\x06avatar\x12'\n" +
|
||||
"\x0finvitation_code\x18\x03 \x01(\tR\x0einvitationCode\x12 \n" +
|
||||
"\vdescription\x18\x04 \x01(\tR\vdescription\x12\x12\n" +
|
||||
"\x04name\x18\x05 \x01(\tR\x04name\x12\x14\n" +
|
||||
"\x05phone\x18\x06 \x01(\tR\x05phone\x12\x14\n" +
|
||||
"\x05email\x18\a \x01(\tR\x05emailB;Z9git.shenxianhe.cn/shenxianhe/sdk/corestack/user/v1;userv1b\x06proto3"
|
||||
|
||||
var (
|
||||
file_corestack_user_v1_user_proto_rawDescOnce sync.Once
|
||||
file_corestack_user_v1_user_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_corestack_user_v1_user_proto_rawDescGZIP() []byte {
|
||||
file_corestack_user_v1_user_proto_rawDescOnce.Do(func() {
|
||||
file_corestack_user_v1_user_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_corestack_user_v1_user_proto_rawDesc), len(file_corestack_user_v1_user_proto_rawDesc)))
|
||||
})
|
||||
return file_corestack_user_v1_user_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_corestack_user_v1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_corestack_user_v1_user_proto_goTypes = []any{
|
||||
(*SetPasswordRequest)(nil), // 0: corestack.user.v1.SetPasswordRequest
|
||||
(*SetPasswordResponse)(nil), // 1: corestack.user.v1.SetPasswordResponse
|
||||
(*SetNameRequest)(nil), // 2: corestack.user.v1.SetNameRequest
|
||||
(*SetNameResponse)(nil), // 3: corestack.user.v1.SetNameResponse
|
||||
(*GetAvatarUploadURLRequest)(nil), // 4: corestack.user.v1.GetAvatarUploadURLRequest
|
||||
(*GetAvatarUploadURLResponse)(nil), // 5: corestack.user.v1.GetAvatarUploadURLResponse
|
||||
(*SetAvatarRequest)(nil), // 6: corestack.user.v1.SetAvatarRequest
|
||||
(*SetAvatarResponse)(nil), // 7: corestack.user.v1.SetAvatarResponse
|
||||
(*SetDescriptionRequest)(nil), // 8: corestack.user.v1.SetDescriptionRequest
|
||||
(*SetDescriptionResponse)(nil), // 9: corestack.user.v1.SetDescriptionResponse
|
||||
(*GetUserInfoRequest)(nil), // 10: corestack.user.v1.GetUserInfoRequest
|
||||
(*GetUserInfoResponse)(nil), // 11: corestack.user.v1.GetUserInfoResponse
|
||||
(v1.AuthenticationType)(0), // 12: corestack.enums.v1.AuthenticationType
|
||||
}
|
||||
var file_corestack_user_v1_user_proto_depIdxs = []int32{
|
||||
12, // 0: corestack.user.v1.SetPasswordRequest.auth_type:type_name -> corestack.enums.v1.AuthenticationType
|
||||
1, // [1:1] is the sub-list for method output_type
|
||||
1, // [1:1] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_corestack_user_v1_user_proto_init() }
|
||||
func file_corestack_user_v1_user_proto_init() {
|
||||
if File_corestack_user_v1_user_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_corestack_user_v1_user_proto_rawDesc), len(file_corestack_user_v1_user_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 12,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_corestack_user_v1_user_proto_goTypes,
|
||||
DependencyIndexes: file_corestack_user_v1_user_proto_depIdxs,
|
||||
MessageInfos: file_corestack_user_v1_user_proto_msgTypes,
|
||||
}.Build()
|
||||
File_corestack_user_v1_user_proto = out.File
|
||||
file_corestack_user_v1_user_proto_goTypes = nil
|
||||
file_corestack_user_v1_user_proto_depIdxs = nil
|
||||
}
|
||||
250
corestack/user/v1/userv1connect/service.connect.go
Normal file
250
corestack/user/v1/userv1connect/service.connect.go
Normal file
@@ -0,0 +1,250 @@
|
||||
// Code generated by protoc-gen-connect-go. DO NOT EDIT.
|
||||
//
|
||||
// Source: corestack/user/v1/service.proto
|
||||
|
||||
package userv1connect
|
||||
|
||||
import (
|
||||
connect "connectrpc.com/connect"
|
||||
context "context"
|
||||
errors "errors"
|
||||
v1 "git.shenxianhe.cn/shenxianhe/sdk/corestack/user/v1"
|
||||
http "net/http"
|
||||
strings "strings"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file and the connect package are
|
||||
// compatible. If you get a compiler error that this constant is not defined, this code was
|
||||
// generated with a version of connect newer than the one compiled into your binary. You can fix the
|
||||
// problem by either regenerating this code with an older version of connect or updating the connect
|
||||
// version compiled into your binary.
|
||||
const _ = connect.IsAtLeastVersion1_13_0
|
||||
|
||||
const (
|
||||
// UserServiceName is the fully-qualified name of the UserService service.
|
||||
UserServiceName = "corestack.user.v1.UserService"
|
||||
)
|
||||
|
||||
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
||||
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
|
||||
//
|
||||
// Note that these are different from the fully-qualified method names used by
|
||||
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
||||
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
||||
// period.
|
||||
const (
|
||||
// UserServiceSetPasswordProcedure is the fully-qualified name of the UserService's SetPassword RPC.
|
||||
UserServiceSetPasswordProcedure = "/corestack.user.v1.UserService/SetPassword"
|
||||
// UserServiceSetNameProcedure is the fully-qualified name of the UserService's SetName RPC.
|
||||
UserServiceSetNameProcedure = "/corestack.user.v1.UserService/SetName"
|
||||
// UserServiceGetAvatarUploadURLProcedure is the fully-qualified name of the UserService's
|
||||
// GetAvatarUploadURL RPC.
|
||||
UserServiceGetAvatarUploadURLProcedure = "/corestack.user.v1.UserService/GetAvatarUploadURL"
|
||||
// UserServiceSetAvatarProcedure is the fully-qualified name of the UserService's SetAvatar RPC.
|
||||
UserServiceSetAvatarProcedure = "/corestack.user.v1.UserService/SetAvatar"
|
||||
// UserServiceSetDescriptionProcedure is the fully-qualified name of the UserService's
|
||||
// SetDescription RPC.
|
||||
UserServiceSetDescriptionProcedure = "/corestack.user.v1.UserService/SetDescription"
|
||||
// UserServiceGetUserInfoProcedure is the fully-qualified name of the UserService's GetUserInfo RPC.
|
||||
UserServiceGetUserInfoProcedure = "/corestack.user.v1.UserService/GetUserInfo"
|
||||
)
|
||||
|
||||
// UserServiceClient is a client for the corestack.user.v1.UserService service.
|
||||
type UserServiceClient interface {
|
||||
SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error)
|
||||
SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error)
|
||||
GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error)
|
||||
SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error)
|
||||
SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error)
|
||||
GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error)
|
||||
}
|
||||
|
||||
// NewUserServiceClient constructs a client for the corestack.user.v1.UserService service. By
|
||||
// default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses,
|
||||
// and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
|
||||
// connect.WithGRPC() or connect.WithGRPCWeb() options.
|
||||
//
|
||||
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
|
||||
// http://api.acme.com or https://acme.com/grpc).
|
||||
func NewUserServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) UserServiceClient {
|
||||
baseURL = strings.TrimRight(baseURL, "/")
|
||||
userServiceMethods := v1.File_corestack_user_v1_service_proto.Services().ByName("UserService").Methods()
|
||||
return &userServiceClient{
|
||||
setPassword: connect.NewClient[v1.SetPasswordRequest, v1.SetPasswordResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceSetPasswordProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("SetPassword")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
setName: connect.NewClient[v1.SetNameRequest, v1.SetNameResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceSetNameProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("SetName")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getAvatarUploadURL: connect.NewClient[v1.GetAvatarUploadURLRequest, v1.GetAvatarUploadURLResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceGetAvatarUploadURLProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("GetAvatarUploadURL")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
setAvatar: connect.NewClient[v1.SetAvatarRequest, v1.SetAvatarResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceSetAvatarProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("SetAvatar")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
setDescription: connect.NewClient[v1.SetDescriptionRequest, v1.SetDescriptionResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceSetDescriptionProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("SetDescription")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
getUserInfo: connect.NewClient[v1.GetUserInfoRequest, v1.GetUserInfoResponse](
|
||||
httpClient,
|
||||
baseURL+UserServiceGetUserInfoProcedure,
|
||||
connect.WithSchema(userServiceMethods.ByName("GetUserInfo")),
|
||||
connect.WithClientOptions(opts...),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// userServiceClient implements UserServiceClient.
|
||||
type userServiceClient struct {
|
||||
setPassword *connect.Client[v1.SetPasswordRequest, v1.SetPasswordResponse]
|
||||
setName *connect.Client[v1.SetNameRequest, v1.SetNameResponse]
|
||||
getAvatarUploadURL *connect.Client[v1.GetAvatarUploadURLRequest, v1.GetAvatarUploadURLResponse]
|
||||
setAvatar *connect.Client[v1.SetAvatarRequest, v1.SetAvatarResponse]
|
||||
setDescription *connect.Client[v1.SetDescriptionRequest, v1.SetDescriptionResponse]
|
||||
getUserInfo *connect.Client[v1.GetUserInfoRequest, v1.GetUserInfoResponse]
|
||||
}
|
||||
|
||||
// SetPassword calls corestack.user.v1.UserService.SetPassword.
|
||||
func (c *userServiceClient) SetPassword(ctx context.Context, req *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) {
|
||||
return c.setPassword.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SetName calls corestack.user.v1.UserService.SetName.
|
||||
func (c *userServiceClient) SetName(ctx context.Context, req *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) {
|
||||
return c.setName.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// GetAvatarUploadURL calls corestack.user.v1.UserService.GetAvatarUploadURL.
|
||||
func (c *userServiceClient) GetAvatarUploadURL(ctx context.Context, req *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) {
|
||||
return c.getAvatarUploadURL.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SetAvatar calls corestack.user.v1.UserService.SetAvatar.
|
||||
func (c *userServiceClient) SetAvatar(ctx context.Context, req *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) {
|
||||
return c.setAvatar.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// SetDescription calls corestack.user.v1.UserService.SetDescription.
|
||||
func (c *userServiceClient) SetDescription(ctx context.Context, req *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error) {
|
||||
return c.setDescription.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// GetUserInfo calls corestack.user.v1.UserService.GetUserInfo.
|
||||
func (c *userServiceClient) GetUserInfo(ctx context.Context, req *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) {
|
||||
return c.getUserInfo.CallUnary(ctx, req)
|
||||
}
|
||||
|
||||
// UserServiceHandler is an implementation of the corestack.user.v1.UserService service.
|
||||
type UserServiceHandler interface {
|
||||
SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error)
|
||||
SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error)
|
||||
GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error)
|
||||
SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error)
|
||||
SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error)
|
||||
GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error)
|
||||
}
|
||||
|
||||
// NewUserServiceHandler builds an HTTP handler from the service implementation. It returns the path
|
||||
// on which to mount the handler and the handler itself.
|
||||
//
|
||||
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
|
||||
// and JSON codecs. They also support gzip compression.
|
||||
func NewUserServiceHandler(svc UserServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
|
||||
userServiceMethods := v1.File_corestack_user_v1_service_proto.Services().ByName("UserService").Methods()
|
||||
userServiceSetPasswordHandler := connect.NewUnaryHandler(
|
||||
UserServiceSetPasswordProcedure,
|
||||
svc.SetPassword,
|
||||
connect.WithSchema(userServiceMethods.ByName("SetPassword")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceSetNameHandler := connect.NewUnaryHandler(
|
||||
UserServiceSetNameProcedure,
|
||||
svc.SetName,
|
||||
connect.WithSchema(userServiceMethods.ByName("SetName")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceGetAvatarUploadURLHandler := connect.NewUnaryHandler(
|
||||
UserServiceGetAvatarUploadURLProcedure,
|
||||
svc.GetAvatarUploadURL,
|
||||
connect.WithSchema(userServiceMethods.ByName("GetAvatarUploadURL")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceSetAvatarHandler := connect.NewUnaryHandler(
|
||||
UserServiceSetAvatarProcedure,
|
||||
svc.SetAvatar,
|
||||
connect.WithSchema(userServiceMethods.ByName("SetAvatar")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceSetDescriptionHandler := connect.NewUnaryHandler(
|
||||
UserServiceSetDescriptionProcedure,
|
||||
svc.SetDescription,
|
||||
connect.WithSchema(userServiceMethods.ByName("SetDescription")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
userServiceGetUserInfoHandler := connect.NewUnaryHandler(
|
||||
UserServiceGetUserInfoProcedure,
|
||||
svc.GetUserInfo,
|
||||
connect.WithSchema(userServiceMethods.ByName("GetUserInfo")),
|
||||
connect.WithHandlerOptions(opts...),
|
||||
)
|
||||
return "/corestack.user.v1.UserService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.URL.Path {
|
||||
case UserServiceSetPasswordProcedure:
|
||||
userServiceSetPasswordHandler.ServeHTTP(w, r)
|
||||
case UserServiceSetNameProcedure:
|
||||
userServiceSetNameHandler.ServeHTTP(w, r)
|
||||
case UserServiceGetAvatarUploadURLProcedure:
|
||||
userServiceGetAvatarUploadURLHandler.ServeHTTP(w, r)
|
||||
case UserServiceSetAvatarProcedure:
|
||||
userServiceSetAvatarHandler.ServeHTTP(w, r)
|
||||
case UserServiceSetDescriptionProcedure:
|
||||
userServiceSetDescriptionHandler.ServeHTTP(w, r)
|
||||
case UserServiceGetUserInfoProcedure:
|
||||
userServiceGetUserInfoHandler.ServeHTTP(w, r)
|
||||
default:
|
||||
http.NotFound(w, r)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// UnimplementedUserServiceHandler returns CodeUnimplemented from all methods.
|
||||
type UnimplementedUserServiceHandler struct{}
|
||||
|
||||
func (UnimplementedUserServiceHandler) SetPassword(context.Context, *connect.Request[v1.SetPasswordRequest]) (*connect.Response[v1.SetPasswordResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.user.v1.UserService.SetPassword is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) SetName(context.Context, *connect.Request[v1.SetNameRequest]) (*connect.Response[v1.SetNameResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.user.v1.UserService.SetName is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) GetAvatarUploadURL(context.Context, *connect.Request[v1.GetAvatarUploadURLRequest]) (*connect.Response[v1.GetAvatarUploadURLResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.user.v1.UserService.GetAvatarUploadURL is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) SetAvatar(context.Context, *connect.Request[v1.SetAvatarRequest]) (*connect.Response[v1.SetAvatarResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.user.v1.UserService.SetAvatar is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) SetDescription(context.Context, *connect.Request[v1.SetDescriptionRequest]) (*connect.Response[v1.SetDescriptionResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.user.v1.UserService.SetDescription is not implemented"))
|
||||
}
|
||||
|
||||
func (UnimplementedUserServiceHandler) GetUserInfo(context.Context, *connect.Request[v1.GetUserInfoRequest]) (*connect.Response[v1.GetUserInfoResponse], error) {
|
||||
return nil, connect.NewError(connect.CodeUnimplemented, errors.New("corestack.user.v1.UserService.GetUserInfo is not implemented"))
|
||||
}
|
||||
Reference in New Issue
Block a user