Ver Fonte

基本架构

luoyangwei há 1 ano atrás
pai
commit
e97c6bb086

+ 2 - 1
cmd/user/main.go

@@ -7,6 +7,7 @@ import (
 	"gopkg.in/natefinch/lumberjack.v2"
 	"os"
 	"sikey/w303a/http/internal/conf"
+	"sikey/w303a/http/pkg/registry"
 	"sikey/w303a/http/pkg/zaplog"
 	"time"
 
@@ -47,7 +48,7 @@ func newApp(c *conf.Server, gs *grpc.Server, hs *http.Server) *kratos.App {
 		kratos.Name(Name),
 		kratos.Version(Version),
 		kratos.Metadata(map[string]string{}),
-		//kratos.Registrar(registry.New(c.Registry.Etcd.Endpoints)),
+		kratos.Registrar(registry.New(c.Registry.Etcd.Endpoints)),
 		kratos.Server(
 			gs,
 			hs,

+ 1 - 1
internal/biz/biz.go

@@ -3,4 +3,4 @@ package biz
 import "github.com/google/wire"
 
 // ProviderSet is biz providers.
-var ProviderSet = wire.NewSet(NewUserUsecase)
+var ProviderSet = wire.NewSet(NewUserUsecase, NewChildUsecase)

+ 20 - 0
internal/biz/child.go

@@ -0,0 +1,20 @@
+package biz
+
+import "sikey/w303a/http/pkg/zaplog"
+
+type Child struct {
+	ID string
+}
+
+type ChildRepo interface {
+}
+
+type ChildUsecase struct {
+	log *zaplog.Logger
+
+	childRepo ChildRepo
+}
+
+func NewChildUsecase(log *zaplog.Logger, childRepo ChildRepo) *ChildUsecase {
+	return &ChildUsecase{log: log, childRepo: childRepo}
+}

+ 29 - 0
internal/biz/user.go

@@ -1,5 +1,10 @@
 package biz
 
+import (
+	"context"
+	pb "sikey/w303a/http/api/user/v2"
+)
+
 type UserRepo interface {
 }
 
@@ -10,3 +15,27 @@ type UserUsecase struct {
 func NewUserUsecase(userRepo UserRepo) *UserUsecase {
 	return &UserUsecase{userRepo: userRepo}
 }
+
+func (uc *UserUsecase) SignIn(ctx context.Context, req *pb.SignInRequest) (*pb.SignInResponse, error) {
+	return nil, nil
+}
+
+func (uc *UserUsecase) SignUp(ctx context.Context, req *pb.SignUpRequest) (*pb.SignUpResponse, error) {
+	return nil, nil
+}
+
+func (uc *UserUsecase) Unregister(ctx context.Context, req *pb.UnregisterRequest) (*pb.UnregisterResponse, error) {
+	return nil, nil
+}
+
+func (uc *UserUsecase) ResetPassword(ctx context.Context, req *pb.ResetPasswordRequest) (*pb.ResetPasswordResponse, error) {
+	return nil, nil
+}
+
+func (uc *UserUsecase) RetrievePassword(ctx context.Context, req *pb.RetrievePasswordRequest) (*pb.RetrievePasswordResponse, error) {
+	return nil, nil
+}
+
+func (uc *UserUsecase) SMSCode(ctx context.Context, req *pb.SMSCodeRequest) (*pb.SMSCodeResponse, error) {
+	return nil, nil
+}

+ 256 - 115
internal/conf/conf.pb.go

@@ -81,11 +81,12 @@ type Server struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Http      *Server_HTTP   `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"`
-	Grpc      *Server_GRPC   `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"`
-	SecretKey string         `protobuf:"bytes,3,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
-	Ucloud    *Server_UCloud `protobuf:"bytes,4,opt,name=ucloud,proto3" json:"ucloud,omitempty"`
-	Logger    *Server_Logger `protobuf:"bytes,5,opt,name=logger,proto3" json:"logger,omitempty"`
+	Http      *Server_HTTP     `protobuf:"bytes,1,opt,name=http,proto3" json:"http,omitempty"`
+	Grpc      *Server_GRPC     `protobuf:"bytes,2,opt,name=grpc,proto3" json:"grpc,omitempty"`
+	SecretKey string           `protobuf:"bytes,3,opt,name=secret_key,json=secretKey,proto3" json:"secret_key,omitempty"`
+	Ucloud    *Server_UCloud   `protobuf:"bytes,4,opt,name=ucloud,proto3" json:"ucloud,omitempty"`
+	Registry  *Server_Registry `protobuf:"bytes,5,opt,name=registry,proto3" json:"registry,omitempty"`
+	Logger    *Server_Logger   `protobuf:"bytes,6,opt,name=logger,proto3" json:"logger,omitempty"`
 }
 
 func (x *Server) Reset() {
@@ -148,6 +149,13 @@ func (x *Server) GetUcloud() *Server_UCloud {
 	return nil
 }
 
+func (x *Server) GetRegistry() *Server_Registry {
+	if x != nil {
+		return x.Registry
+	}
+	return nil
+}
+
 func (x *Server) GetLogger() *Server_Logger {
 	if x != nil {
 		return x.Logger
@@ -344,6 +352,53 @@ func (x *Server_GRPC) GetTimeout() *durationpb.Duration {
 	return nil
 }
 
+type Server_Registry struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Etcd *Server_Registry_Etcd `protobuf:"bytes,1,opt,name=etcd,proto3" json:"etcd,omitempty"`
+}
+
+func (x *Server_Registry) Reset() {
+	*x = Server_Registry{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_conf_conf_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Server_Registry) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Server_Registry) ProtoMessage() {}
+
+func (x *Server_Registry) ProtoReflect() protoreflect.Message {
+	mi := &file_conf_conf_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Server_Registry.ProtoReflect.Descriptor instead.
+func (*Server_Registry) Descriptor() ([]byte, []int) {
+	return file_conf_conf_proto_rawDescGZIP(), []int{1, 2}
+}
+
+func (x *Server_Registry) GetEtcd() *Server_Registry_Etcd {
+	if x != nil {
+		return x.Etcd
+	}
+	return nil
+}
+
 type Server_UCloud struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -357,7 +412,7 @@ type Server_UCloud struct {
 func (x *Server_UCloud) Reset() {
 	*x = Server_UCloud{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_conf_conf_proto_msgTypes[5]
+		mi := &file_conf_conf_proto_msgTypes[6]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -370,7 +425,7 @@ func (x *Server_UCloud) String() string {
 func (*Server_UCloud) ProtoMessage() {}
 
 func (x *Server_UCloud) ProtoReflect() protoreflect.Message {
-	mi := &file_conf_conf_proto_msgTypes[5]
+	mi := &file_conf_conf_proto_msgTypes[6]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -383,7 +438,7 @@ func (x *Server_UCloud) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use Server_UCloud.ProtoReflect.Descriptor instead.
 func (*Server_UCloud) Descriptor() ([]byte, []int) {
-	return file_conf_conf_proto_rawDescGZIP(), []int{1, 2}
+	return file_conf_conf_proto_rawDescGZIP(), []int{1, 3}
 }
 
 func (x *Server_UCloud) GetProjectId() string {
@@ -422,7 +477,7 @@ type Server_Logger struct {
 func (x *Server_Logger) Reset() {
 	*x = Server_Logger{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_conf_conf_proto_msgTypes[6]
+		mi := &file_conf_conf_proto_msgTypes[7]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -435,7 +490,7 @@ func (x *Server_Logger) String() string {
 func (*Server_Logger) ProtoMessage() {}
 
 func (x *Server_Logger) ProtoReflect() protoreflect.Message {
-	mi := &file_conf_conf_proto_msgTypes[6]
+	mi := &file_conf_conf_proto_msgTypes[7]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -448,7 +503,7 @@ func (x *Server_Logger) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use Server_Logger.ProtoReflect.Descriptor instead.
 func (*Server_Logger) Descriptor() ([]byte, []int) {
-	return file_conf_conf_proto_rawDescGZIP(), []int{1, 3}
+	return file_conf_conf_proto_rawDescGZIP(), []int{1, 4}
 }
 
 func (x *Server_Logger) GetOutput() string {
@@ -486,6 +541,53 @@ func (x *Server_Logger) GetCompress() bool {
 	return false
 }
 
+type Server_Registry_Etcd struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Endpoints []string `protobuf:"bytes,1,rep,name=endpoints,proto3" json:"endpoints,omitempty"`
+}
+
+func (x *Server_Registry_Etcd) Reset() {
+	*x = Server_Registry_Etcd{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_conf_conf_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Server_Registry_Etcd) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Server_Registry_Etcd) ProtoMessage() {}
+
+func (x *Server_Registry_Etcd) ProtoReflect() protoreflect.Message {
+	mi := &file_conf_conf_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use Server_Registry_Etcd.ProtoReflect.Descriptor instead.
+func (*Server_Registry_Etcd) Descriptor() ([]byte, []int) {
+	return file_conf_conf_proto_rawDescGZIP(), []int{1, 2, 0}
+}
+
+func (x *Server_Registry_Etcd) GetEndpoints() []string {
+	if x != nil {
+		return x.Endpoints
+	}
+	return nil
+}
+
 type Data_Database struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -498,7 +600,7 @@ type Data_Database struct {
 func (x *Data_Database) Reset() {
 	*x = Data_Database{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_conf_conf_proto_msgTypes[7]
+		mi := &file_conf_conf_proto_msgTypes[9]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -511,7 +613,7 @@ func (x *Data_Database) String() string {
 func (*Data_Database) ProtoMessage() {}
 
 func (x *Data_Database) ProtoReflect() protoreflect.Message {
-	mi := &file_conf_conf_proto_msgTypes[7]
+	mi := &file_conf_conf_proto_msgTypes[9]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -557,7 +659,7 @@ type Data_Redis struct {
 func (x *Data_Redis) Reset() {
 	*x = Data_Redis{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_conf_conf_proto_msgTypes[8]
+		mi := &file_conf_conf_proto_msgTypes[10]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -570,7 +672,7 @@ func (x *Data_Redis) String() string {
 func (*Data_Redis) ProtoMessage() {}
 
 func (x *Data_Redis) ProtoReflect() protoreflect.Message {
-	mi := &file_conf_conf_proto_msgTypes[8]
+	mi := &file_conf_conf_proto_msgTypes[10]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -640,7 +742,7 @@ type Data_Mongo struct {
 func (x *Data_Mongo) Reset() {
 	*x = Data_Mongo{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_conf_conf_proto_msgTypes[9]
+		mi := &file_conf_conf_proto_msgTypes[11]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -653,7 +755,7 @@ func (x *Data_Mongo) String() string {
 func (*Data_Mongo) ProtoMessage() {}
 
 func (x *Data_Mongo) ProtoReflect() protoreflect.Message {
-	mi := &file_conf_conf_proto_msgTypes[9]
+	mi := &file_conf_conf_proto_msgTypes[11]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -695,7 +797,7 @@ var file_conf_conf_proto_rawDesc = []byte{
 	0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06,
 	0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02,
 	0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70,
-	0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xba, 0x05, 0x0a,
+	0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xdb, 0x06, 0x0a,
 	0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18,
 	0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61,
 	0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52, 0x04,
@@ -707,73 +809,84 @@ var file_conf_conf_proto_rawDesc = []byte{
 	0x12, 0x31, 0x0a, 0x06, 0x75, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
 	0x32, 0x19, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65,
 	0x72, 0x76, 0x65, 0x72, 0x2e, 0x55, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x52, 0x06, 0x75, 0x63, 0x6c,
-	0x6f, 0x75, 0x64, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x18, 0x05, 0x20,
-	0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69,
-	0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x52, 0x06,
-	0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x1a, 0x69, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x12, 0x18,
-	0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x33, 0x0a, 0x07,
-	0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
-	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
-	0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
-	0x74, 0x1a, 0x69, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74,
-	0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77,
-	0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
-	0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
-	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
-	0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x67, 0x0a, 0x06,
-	0x55, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63,
-	0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x6a,
-	0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f,
-	0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69,
-	0x63, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f,
-	0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61,
-	0x74, 0x65, 0x4b, 0x65, 0x79, 0x1a, 0x91, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72,
-	0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f,
-	0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x53,
-	0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75,
-	0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61, 0x63,
-	0x6b, 0x75, 0x70, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65, 0x18,
-	0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, 0x12, 0x1a, 0x0a,
-	0x08, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
-	0x08, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf0, 0x03, 0x0a, 0x04, 0x44, 0x61,
-	0x74, 0x61, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70,
-	0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x52,
-	0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x72, 0x65, 0x64,
-	0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f,
-	0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73,
-	0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x67, 0x6f,
-	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e,
-	0x61, 0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x52, 0x05,
-	0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x1a, 0x3a, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73,
-	0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75,
-	0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63,
-	0x65, 0x1a, 0xdf, 0x01, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e,
-	0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65,
-	0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73,
-	0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73,
-	0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28,
-	0x05, 0x52, 0x02, 0x64, 0x62, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69,
-	0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
+	0x6f, 0x75, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61,
+	0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+	0x72, 0x79, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x06,
+	0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6b,
+	0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
+	0x2e, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x52, 0x06, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x1a,
+	0x69, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f,
+	0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
+	0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
+	0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x69, 0x0a, 0x04, 0x47, 0x52,
+	0x50, 0x43, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04,
+	0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72,
+	0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69,
+	0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x66, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+	0x79, 0x12, 0x34, 0x0a, 0x04, 0x65, 0x74, 0x63, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+	0x20, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72,
+	0x76, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x45, 0x74, 0x63,
+	0x64, 0x52, 0x04, 0x65, 0x74, 0x63, 0x64, 0x1a, 0x24, 0x0a, 0x04, 0x45, 0x74, 0x63, 0x64, 0x12,
+	0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
+	0x28, 0x09, 0x52, 0x09, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x67, 0x0a,
+	0x06, 0x55, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x6a, 0x65,
+	0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x72, 0x6f,
+	0x6a, 0x65, 0x63, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63,
+	0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c,
+	0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
+	0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76,
+	0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x1a, 0x91, 0x01, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x67, 0x65,
+	0x72, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78,
+	0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78,
+	0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x61, 0x63, 0x6b,
+	0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x42, 0x61,
+	0x63, 0x6b, 0x75, 0x70, 0x73, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x61, 0x67, 0x65,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x41, 0x67, 0x65, 0x12, 0x1a,
+	0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
+	0x52, 0x08, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x22, 0xf0, 0x03, 0x0a, 0x04, 0x44,
+	0x61, 0x74, 0x61, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61,
+	0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
+	0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x72, 0x65,
+	0x64, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6b, 0x72, 0x61, 0x74,
+	0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x64, 0x69,
+	0x73, 0x52, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x6d, 0x6f, 0x6e, 0x67,
+	0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73,
+	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x52,
+	0x05, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x1a, 0x3a, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
+	0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f,
+	0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72,
+	0x63, 0x65, 0x1a, 0xdf, 0x01, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07,
+	0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e,
+	0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
+	0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
+	0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, 0x01,
+	0x28, 0x05, 0x52, 0x02, 0x64, 0x62, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74,
+	0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
+	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
+	0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d,
+	0x65, 0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69,
+	0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
 	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,
-	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65,
-	0x6f, 0x75, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
-	0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
-	0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
-	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
-	0x6f, 0x75, 0x74, 0x1a, 0x37, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x12, 0x12, 0x0a, 0x04,
-	0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72,
-	0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28,
-	0x77, 0x33, 0x30, 0x33, 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70, 0x70,
-	0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63,
-	0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d,
+	0x65, 0x6f, 0x75, 0x74, 0x1a, 0x37, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x12, 0x12, 0x0a,
+	0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64,
+	0x72, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x42, 0x2a, 0x5a,
+	0x28, 0x77, 0x33, 0x30, 0x33, 0x61, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, 0x70,
+	0x70, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f,
+	0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x33,
 }
 
 var (
@@ -788,39 +901,43 @@ func file_conf_conf_proto_rawDescGZIP() []byte {
 	return file_conf_conf_proto_rawDescData
 }
 
-var file_conf_conf_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_conf_conf_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
 var file_conf_conf_proto_goTypes = []any{
-	(*Bootstrap)(nil),           // 0: kratos.api.Bootstrap
-	(*Server)(nil),              // 1: kratos.api.Server
-	(*Data)(nil),                // 2: kratos.api.Data
-	(*Server_HTTP)(nil),         // 3: kratos.api.Server.HTTP
-	(*Server_GRPC)(nil),         // 4: kratos.api.Server.GRPC
-	(*Server_UCloud)(nil),       // 5: kratos.api.Server.UCloud
-	(*Server_Logger)(nil),       // 6: kratos.api.Server.Logger
-	(*Data_Database)(nil),       // 7: kratos.api.Data.Database
-	(*Data_Redis)(nil),          // 8: kratos.api.Data.Redis
-	(*Data_Mongo)(nil),          // 9: kratos.api.Data.Mongo
-	(*durationpb.Duration)(nil), // 10: google.protobuf.Duration
+	(*Bootstrap)(nil),            // 0: kratos.api.Bootstrap
+	(*Server)(nil),               // 1: kratos.api.Server
+	(*Data)(nil),                 // 2: kratos.api.Data
+	(*Server_HTTP)(nil),          // 3: kratos.api.Server.HTTP
+	(*Server_GRPC)(nil),          // 4: kratos.api.Server.GRPC
+	(*Server_Registry)(nil),      // 5: kratos.api.Server.Registry
+	(*Server_UCloud)(nil),        // 6: kratos.api.Server.UCloud
+	(*Server_Logger)(nil),        // 7: kratos.api.Server.Logger
+	(*Server_Registry_Etcd)(nil), // 8: kratos.api.Server.Registry.Etcd
+	(*Data_Database)(nil),        // 9: kratos.api.Data.Database
+	(*Data_Redis)(nil),           // 10: kratos.api.Data.Redis
+	(*Data_Mongo)(nil),           // 11: kratos.api.Data.Mongo
+	(*durationpb.Duration)(nil),  // 12: google.protobuf.Duration
 }
 var file_conf_conf_proto_depIdxs = []int32{
 	1,  // 0: kratos.api.Bootstrap.server:type_name -> kratos.api.Server
 	2,  // 1: kratos.api.Bootstrap.data:type_name -> kratos.api.Data
 	3,  // 2: kratos.api.Server.http:type_name -> kratos.api.Server.HTTP
 	4,  // 3: kratos.api.Server.grpc:type_name -> kratos.api.Server.GRPC
-	5,  // 4: kratos.api.Server.ucloud:type_name -> kratos.api.Server.UCloud
-	6,  // 5: kratos.api.Server.logger:type_name -> kratos.api.Server.Logger
-	7,  // 6: kratos.api.Data.database:type_name -> kratos.api.Data.Database
-	8,  // 7: kratos.api.Data.redis:type_name -> kratos.api.Data.Redis
-	9,  // 8: kratos.api.Data.mongo:type_name -> kratos.api.Data.Mongo
-	10, // 9: kratos.api.Server.HTTP.timeout:type_name -> google.protobuf.Duration
-	10, // 10: kratos.api.Server.GRPC.timeout:type_name -> google.protobuf.Duration
-	10, // 11: kratos.api.Data.Redis.read_timeout:type_name -> google.protobuf.Duration
-	10, // 12: kratos.api.Data.Redis.write_timeout:type_name -> google.protobuf.Duration
-	13, // [13:13] is the sub-list for method output_type
-	13, // [13:13] is the sub-list for method input_type
-	13, // [13:13] is the sub-list for extension type_name
-	13, // [13:13] is the sub-list for extension extendee
-	0,  // [0:13] is the sub-list for field type_name
+	6,  // 4: kratos.api.Server.ucloud:type_name -> kratos.api.Server.UCloud
+	5,  // 5: kratos.api.Server.registry:type_name -> kratos.api.Server.Registry
+	7,  // 6: kratos.api.Server.logger:type_name -> kratos.api.Server.Logger
+	9,  // 7: kratos.api.Data.database:type_name -> kratos.api.Data.Database
+	10, // 8: kratos.api.Data.redis:type_name -> kratos.api.Data.Redis
+	11, // 9: kratos.api.Data.mongo:type_name -> kratos.api.Data.Mongo
+	12, // 10: kratos.api.Server.HTTP.timeout:type_name -> google.protobuf.Duration
+	12, // 11: kratos.api.Server.GRPC.timeout:type_name -> google.protobuf.Duration
+	8,  // 12: kratos.api.Server.Registry.etcd:type_name -> kratos.api.Server.Registry.Etcd
+	12, // 13: kratos.api.Data.Redis.read_timeout:type_name -> google.protobuf.Duration
+	12, // 14: kratos.api.Data.Redis.write_timeout:type_name -> google.protobuf.Duration
+	15, // [15:15] is the sub-list for method output_type
+	15, // [15:15] is the sub-list for method input_type
+	15, // [15:15] is the sub-list for extension type_name
+	15, // [15:15] is the sub-list for extension extendee
+	0,  // [0:15] is the sub-list for field type_name
 }
 
 func init() { file_conf_conf_proto_init() }
@@ -890,7 +1007,7 @@ func file_conf_conf_proto_init() {
 			}
 		}
 		file_conf_conf_proto_msgTypes[5].Exporter = func(v any, i int) any {
-			switch v := v.(*Server_UCloud); i {
+			switch v := v.(*Server_Registry); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -902,7 +1019,7 @@ func file_conf_conf_proto_init() {
 			}
 		}
 		file_conf_conf_proto_msgTypes[6].Exporter = func(v any, i int) any {
-			switch v := v.(*Server_Logger); i {
+			switch v := v.(*Server_UCloud); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -914,7 +1031,7 @@ func file_conf_conf_proto_init() {
 			}
 		}
 		file_conf_conf_proto_msgTypes[7].Exporter = func(v any, i int) any {
-			switch v := v.(*Data_Database); i {
+			switch v := v.(*Server_Logger); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -926,7 +1043,7 @@ func file_conf_conf_proto_init() {
 			}
 		}
 		file_conf_conf_proto_msgTypes[8].Exporter = func(v any, i int) any {
-			switch v := v.(*Data_Redis); i {
+			switch v := v.(*Server_Registry_Etcd); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -938,6 +1055,30 @@ func file_conf_conf_proto_init() {
 			}
 		}
 		file_conf_conf_proto_msgTypes[9].Exporter = func(v any, i int) any {
+			switch v := v.(*Data_Database); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_conf_conf_proto_msgTypes[10].Exporter = func(v any, i int) any {
+			switch v := v.(*Data_Redis); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_conf_conf_proto_msgTypes[11].Exporter = func(v any, i int) any {
 			switch v := v.(*Data_Mongo); i {
 			case 0:
 				return &v.state
@@ -956,7 +1097,7 @@ func file_conf_conf_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_conf_conf_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   10,
+			NumMessages:   12,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

+ 16 - 1
internal/conf/conf.proto

@@ -16,16 +16,26 @@ message Server {
         string addr = 2;
         google.protobuf.Duration timeout = 3;
     }
+
     message GRPC {
         string network = 1;
         string addr = 2;
         google.protobuf.Duration timeout = 3;
     }
+
+    message Registry {
+        message Etcd {
+            repeated string endpoints = 1;
+        }
+        Etcd etcd = 1;
+    }
+
     message UCloud {
         string project_id = 1;
         string public_key = 2;
         string private_key = 3;
     }
+
     message Logger {
         string output = 1;
         int32  max_size = 2;
@@ -33,11 +43,13 @@ message Server {
         int32  max_age = 4;
         bool  compress = 5;
     }
+
     HTTP http = 1;
     GRPC grpc = 2;
     string secret_key = 3;
     UCloud ucloud = 4;
-    Logger logger = 5;
+    Registry registry = 5;
+    Logger logger = 6;
 }
 
 message Data {
@@ -45,6 +57,7 @@ message Data {
         string driver = 1;
         string source = 2;
     }
+
     message Redis {
         string network = 1;
         string addr = 2;
@@ -53,10 +66,12 @@ message Data {
         google.protobuf.Duration read_timeout = 5;
         google.protobuf.Duration write_timeout = 6;
     }
+
     message Mongo {
         string addr = 1;
         string database = 2;
     }
+
     Database database = 1;
     Redis redis = 2;
     Mongo mongo = 3;

+ 31 - 0
internal/service/alarm_clock.go

@@ -0,0 +1,31 @@
+package service
+
+import (
+	"context"
+
+	pb "sikey/w303a/http/api/user/v2"
+)
+
+type AlarmClockService struct {
+	pb.UnimplementedAlarmClockServer
+}
+
+func NewAlarmClockService() *AlarmClockService {
+	return &AlarmClockService{}
+}
+
+func (s *AlarmClockService) GetWristwatchAlarmClock(ctx context.Context, req *pb.GetWristwatchAlarmClockRequest) (*pb.GetWristwatchAlarmClockResponse, error) {
+	return &pb.GetWristwatchAlarmClockResponse{}, nil
+}
+func (s *AlarmClockService) GetAlarmClock(ctx context.Context, req *pb.GetAlarmClockRequest) (*pb.GetAlarmClockResponse, error) {
+	return &pb.GetAlarmClockResponse{}, nil
+}
+func (s *AlarmClockService) CreateAlarmClock(ctx context.Context, req *pb.CreateAlarmClockRequest) (*pb.CreateAlarmClockResponse, error) {
+	return &pb.CreateAlarmClockResponse{}, nil
+}
+func (s *AlarmClockService) UpdateAlarmClock(ctx context.Context, req *pb.UpdateAlarmClockRequest) (*pb.UpdateAlarmClockResponse, error) {
+	return &pb.UpdateAlarmClockResponse{}, nil
+}
+func (s *AlarmClockService) DeleteAlarmClock(ctx context.Context, req *pb.DeleteAlarmClockRequest) (*pb.DeleteAlarmClockResponse, error) {
+	return &pb.DeleteAlarmClockResponse{}, nil
+}

+ 28 - 0
internal/service/child.go

@@ -0,0 +1,28 @@
+package service
+
+import (
+	"context"
+
+	pb "sikey/w303a/http/api/user/v2"
+)
+
+type ChildService struct {
+	pb.UnimplementedChildServer
+}
+
+func NewChildService() *ChildService {
+	return &ChildService{}
+}
+
+func (s *ChildService) GetChild(ctx context.Context, req *pb.GetChildRequest) (*pb.GetChildResponse, error) {
+	return &pb.GetChildResponse{}, nil
+}
+func (s *ChildService) CreateChild(ctx context.Context, req *pb.CreateChildRequest) (*pb.CreateChildResponse, error) {
+	return &pb.CreateChildResponse{}, nil
+}
+func (s *ChildService) UpdateChild(ctx context.Context, req *pb.UpdateChildRequest) (*pb.UpdateChildResponse, error) {
+	return &pb.UpdateChildResponse{}, nil
+}
+func (s *ChildService) DeleteChild(ctx context.Context, req *pb.DeleteChildRequest) (*pb.DeleteChildResponse, error) {
+	return &pb.DeleteChildResponse{}, nil
+}

+ 43 - 0
internal/service/contacts.go

@@ -0,0 +1,43 @@
+package service
+
+import (
+	"context"
+
+	pb "sikey/w303a/http/api/user/v2"
+)
+
+type ContactsService struct {
+	pb.UnimplementedContactsServer
+}
+
+func NewContactsService() *ContactsService {
+	return &ContactsService{}
+}
+
+func (s *ContactsService) GetWristwatchContactPerson(ctx context.Context, req *pb.GetWristwatchContactPersonRequest) (*pb.GetWristwatchContactPersonResponse, error) {
+	return &pb.GetWristwatchContactPersonResponse{}, nil
+}
+func (s *ContactsService) GetContactPerson(ctx context.Context, req *pb.GetContactPersonRequest) (*pb.GetContactPersonResponse, error) {
+	return &pb.GetContactPersonResponse{}, nil
+}
+func (s *ContactsService) CreateContactPerson(ctx context.Context, req *pb.CreateContactPersonRequest) (*pb.CreateContactPersonResponse, error) {
+	return &pb.CreateContactPersonResponse{}, nil
+}
+func (s *ContactsService) UpdateContactPerson(ctx context.Context, req *pb.UpdateContactPersonRequest) (*pb.UpdateContactPersonResponse, error) {
+	return &pb.UpdateContactPersonResponse{}, nil
+}
+func (s *ContactsService) DeleteContactPerson(ctx context.Context, req *pb.DeleteContactPersonRequest) (*pb.DeleteContactPersonResponse, error) {
+	return &pb.DeleteContactPersonResponse{}, nil
+}
+func (s *ContactsService) GenerateFirendCode(ctx context.Context, req *pb.GenerateFirendCodeRequest) (*pb.GenerateFirendCodeResponse, error) {
+	return &pb.GenerateFirendCodeResponse{}, nil
+}
+func (s *ContactsService) AddFirend(ctx context.Context, req *pb.AddFirendRequest) (*pb.AddFirendResponse, error) {
+	return &pb.AddFirendResponse{}, nil
+}
+func (s *ContactsService) GetFirend(ctx context.Context, req *pb.GetFirendRequest) (*pb.GetFirendResponse, error) {
+	return &pb.GetFirendResponse{}, nil
+}
+func (s *ContactsService) DeleteFirend(ctx context.Context, req *pb.DeleteFirendRequest) (*pb.DeleteFirendResponse, error) {
+	return &pb.DeleteFirendResponse{}, nil
+}

+ 28 - 0
internal/service/device.go

@@ -0,0 +1,28 @@
+package service
+
+import (
+	"context"
+
+	pb "sikey/w303a/http/api/user/v2"
+)
+
+type DeviceService struct {
+	pb.UnimplementedDeviceServer
+}
+
+func NewDeviceService() *DeviceService {
+	return &DeviceService{}
+}
+
+func (s *DeviceService) DeviceBinding(ctx context.Context, req *pb.DeviceBindingRequest) (*pb.DeviceBindingResponse, error) {
+	return &pb.DeviceBindingResponse{}, nil
+}
+func (s *DeviceService) DeviceBind(ctx context.Context, req *pb.DeviceBindRequest) (*pb.DeviceBindResponse, error) {
+	return &pb.DeviceBindResponse{}, nil
+}
+func (s *DeviceService) DeviceUnbind(ctx context.Context, req *pb.DeviceUnbindRequest) (*pb.DeviceUnbindResponse, error) {
+	return &pb.DeviceUnbindResponse{}, nil
+}
+func (s *DeviceService) DeviceExchange(ctx context.Context, req *pb.DeviceExchangeRequest) (*pb.DeviceExchangeResponse, error) {
+	return &pb.DeviceExchangeResponse{}, nil
+}

+ 31 - 0
internal/service/school_disable.go

@@ -0,0 +1,31 @@
+package service
+
+import (
+	"context"
+
+	pb "sikey/w303a/http/api/user/v2"
+)
+
+type SchoolDisableService struct {
+	pb.UnimplementedSchoolDisableServer
+}
+
+func NewSchoolDisableService() *SchoolDisableService {
+	return &SchoolDisableService{}
+}
+
+func (s *SchoolDisableService) GetWristwatchSchoolDisable(ctx context.Context, req *pb.GetWristwatchSchoolDisableRequest) (*pb.GetWristwatchSchoolDisableResponse, error) {
+	return &pb.GetWristwatchSchoolDisableResponse{}, nil
+}
+func (s *SchoolDisableService) GetSchoolDisable(ctx context.Context, req *pb.GetSchoolDisableRequest) (*pb.GetSchoolDisableResponse, error) {
+	return &pb.GetSchoolDisableResponse{}, nil
+}
+func (s *SchoolDisableService) CreateSchoolDisable(ctx context.Context, req *pb.CreateSchoolDisableRequest) (*pb.CreateSchoolDisableResponse, error) {
+	return &pb.CreateSchoolDisableResponse{}, nil
+}
+func (s *SchoolDisableService) UpdateSchoolDisable(ctx context.Context, req *pb.UpdateSchoolDisableRequest) (*pb.UpdateSchoolDisableResponse, error) {
+	return &pb.UpdateSchoolDisableResponse{}, nil
+}
+func (s *SchoolDisableService) DeleteSchoolDisable(ctx context.Context, req *pb.DeleteSchoolDisableRequest) (*pb.DeleteSchoolDisableResponse, error) {
+	return &pb.DeleteSchoolDisableResponse{}, nil
+}

+ 35 - 4
internal/service/user.go

@@ -1,11 +1,42 @@
 package service
 
-import "sikey/w303a/http/internal/biz"
+import (
+	"context"
+	"sikey/w303a/http/internal/biz"
+
+	pb "sikey/w303a/http/api/user/v2"
+)
 
 type UserService struct {
-	usecase *biz.UserUsecase
+	pb.UnimplementedUserServer
+
+	userUsecase *biz.UserUsecase
+}
+
+func NewUserService(userUsecase *biz.UserUsecase) *UserService {
+	return &UserService{userUsecase: userUsecase}
+}
+
+func (s *UserService) SignIn(ctx context.Context, req *pb.SignInRequest) (*pb.SignInResponse, error) {
+	return s.userUsecase.SignIn(ctx, req)
+}
+
+func (s *UserService) SignUp(ctx context.Context, req *pb.SignUpRequest) (*pb.SignUpResponse, error) {
+	return s.userUsecase.SignUp(ctx, req)
+}
+
+func (s *UserService) Unregister(ctx context.Context, req *pb.UnregisterRequest) (*pb.UnregisterResponse, error) {
+	return s.userUsecase.Unregister(ctx, req)
+}
+
+func (s *UserService) ResetPassword(ctx context.Context, req *pb.ResetPasswordRequest) (*pb.ResetPasswordResponse, error) {
+	return s.userUsecase.ResetPassword(ctx, req)
+}
+
+func (s *UserService) RetrievePassword(ctx context.Context, req *pb.RetrievePasswordRequest) (*pb.RetrievePasswordResponse, error) {
+	return s.userUsecase.RetrievePassword(ctx, req)
 }
 
-func NewUserService(usecase *biz.UserUsecase) *UserService {
-	return &UserService{usecase: usecase}
+func (s *UserService) SMSCode(ctx context.Context, req *pb.SMSCodeRequest) (*pb.SMSCodeResponse, error) {
+	return s.userUsecase.SMSCode(ctx, req)
 }

+ 0 - 5
pkg/protox/protox_test.go

@@ -1,13 +1,8 @@
 package protox_test
 
 import (
-	"fmt"
 	"testing"
-	v2 "w303a/server/apis/msg/v2"
-	"w303a/server/pkg/protox"
 )
 
 func TestGetFullName(t *testing.T) {
-	content := &v2.PublishTextContent{}
-	fmt.Println(protox.GetFullNameByMessage(content))
 }