wfz 3 anos atrás
pai
commit
07bb54668a

+ 33 - 32
api/chat/chat.pb.go

@@ -7,11 +7,8 @@
 package chat
 
 import (
-	_ "google.golang.org/genproto/googleapis/api/annotations"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	_ "google.golang.org/protobuf/types/known/emptypb"
-	_ "google.golang.org/protobuf/types/known/structpb"
 	reflect "reflect"
 	sync "sync"
 )
@@ -29,6 +26,7 @@ type CheckUserPartnerIsRelationshipRequest struct {
 	unknownFields protoimpl.UnknownFields
 
 	PartnerID string `protobuf:"bytes,1,opt,name=partnerID,proto3" json:"partnerID"`
+	UserID    string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID"`
 }
 
 func (x *CheckUserPartnerIsRelationshipRequest) Reset() {
@@ -70,6 +68,13 @@ func (x *CheckUserPartnerIsRelationshipRequest) GetPartnerID() string {
 	return ""
 }
 
+func (x *CheckUserPartnerIsRelationshipRequest) GetUserID() string {
+	if x != nil {
+		return x.UserID
+	}
+	return ""
+}
+
 type CheckUserPartnerIsRelationshipReply struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -129,37 +134,33 @@ var File_chat_proto protoreflect.FileDescriptor
 
 var file_chat_proto_rawDesc = []byte{
 	0x0a, 0x0a, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x61, 0x70,
-	0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
-	0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
-	0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f,
-	0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
-	0x45, 0x0a, 0x25, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74,
-	0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69,
-	0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74,
-	0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72,
-	0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x22, 0x6f, 0x0a, 0x23, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55,
+	0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x22, 0x5d, 0x0a, 0x25, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55,
 	0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61,
-	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a,
-	0x13, 0x69, 0x73, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
-	0x73, 0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, 0x42, 0x75,
-	0x69, 0x6c, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12,
-	0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
-	0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x32, 0x89, 0x01, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74,
-	0x12, 0x80, 0x01, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61,
-	0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
-	0x68, 0x69, 0x70, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43,
+	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+	0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x12, 0x16, 0x0a,
+	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
+	0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x6f, 0x0a, 0x23, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73,
+	0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x13,
+	0x69, 0x73, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+	0x68, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x69, 0x73, 0x42, 0x75, 0x69,
+	0x6c, 0x64, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x16,
+	0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
+	0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x32, 0x89, 0x01, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12,
+	0x80, 0x01, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72,
+	0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68,
+	0x69, 0x70, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68,
+	0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73,
+	0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43,
 	0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49,
-	0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71,
-	0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
-	0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72,
-	0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65,
-	0x70, 0x6c, 0x79, 0x42, 0x3d, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x50,
-	0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f,
-	0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x3b, 0x63, 0x68,
-	0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70,
+	0x6c, 0x79, 0x42, 0x3d, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x50, 0x01,
+	0x5a, 0x2f, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d,
+	0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x3b, 0x63, 0x68, 0x61,
+	0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (

+ 4 - 3
api/chat/chat.proto

@@ -2,9 +2,9 @@ syntax = "proto3";
 
 package api.chat;
 
-import "google/api/annotations.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/empty.proto";
+//import "google/api/annotations.proto";
+//import "google/protobuf/struct.proto";
+//import "google/protobuf/empty.proto";
 
 option go_package = "git.ikuban.com/server/pw-protobuf/api/chat;chat";
 option java_multiple_files = true;
@@ -16,6 +16,7 @@ service Chat {
 
 message CheckUserPartnerIsRelationshipRequest{
   string partnerID = 1;
+  string userID = 2;
 }
 
 message CheckUserPartnerIsRelationshipReply{

+ 0 - 228
api/companion/companion.pb.go

@@ -1,228 +0,0 @@
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// versions:
-// 	protoc-gen-go v1.26.0-devel
-// 	protoc        v3.15.8
-// source: companion.proto
-
-package companion
-
-import (
-	_ "google.golang.org/genproto/googleapis/api/annotations"
-	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
-	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
-	_ "google.golang.org/protobuf/types/known/emptypb"
-	_ "google.golang.org/protobuf/types/known/structpb"
-	reflect "reflect"
-	sync "sync"
-)
-
-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 AuthorizationRequest struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	JsCode string `protobuf:"bytes,1,opt,name=jsCode,proto3" json:"jsCode"`
-}
-
-func (x *AuthorizationRequest) Reset() {
-	*x = AuthorizationRequest{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_companion_proto_msgTypes[0]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *AuthorizationRequest) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*AuthorizationRequest) ProtoMessage() {}
-
-func (x *AuthorizationRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_companion_proto_msgTypes[0]
-	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 AuthorizationRequest.ProtoReflect.Descriptor instead.
-func (*AuthorizationRequest) Descriptor() ([]byte, []int) {
-	return file_companion_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *AuthorizationRequest) GetJsCode() string {
-	if x != nil {
-		return x.JsCode
-	}
-	return ""
-}
-
-type TokenReply struct {
-	state         protoimpl.MessageState
-	sizeCache     protoimpl.SizeCache
-	unknownFields protoimpl.UnknownFields
-
-	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
-}
-
-func (x *TokenReply) Reset() {
-	*x = TokenReply{}
-	if protoimpl.UnsafeEnabled {
-		mi := &file_companion_proto_msgTypes[1]
-		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
-		ms.StoreMessageInfo(mi)
-	}
-}
-
-func (x *TokenReply) String() string {
-	return protoimpl.X.MessageStringOf(x)
-}
-
-func (*TokenReply) ProtoMessage() {}
-
-func (x *TokenReply) ProtoReflect() protoreflect.Message {
-	mi := &file_companion_proto_msgTypes[1]
-	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 TokenReply.ProtoReflect.Descriptor instead.
-func (*TokenReply) Descriptor() ([]byte, []int) {
-	return file_companion_proto_rawDescGZIP(), []int{1}
-}
-
-func (x *TokenReply) GetToken() string {
-	if x != nil {
-		return x.Token
-	}
-	return ""
-}
-
-var File_companion_proto protoreflect.FileDescriptor
-
-var file_companion_proto_rawDesc = []byte{
-	0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x12, 0x0d, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e,
-	0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e,
-	0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c,
-	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
-	0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f,
-	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d,
-	0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x14, 0x41, 0x75, 0x74,
-	0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x54, 0x6f, 0x6b,
-	0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
-	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x80, 0x01,
-	0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x73, 0x0a, 0x0d, 0x41,
-	0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x61,
-	0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x75, 0x74,
-	0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f,
-	0x6e, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x22, 0x82, 0xd3,
-	0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f,
-	0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a,
-	0x42, 0x4c, 0x0a, 0x0d, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f,
-	0x6e, 0x50, 0x01, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e,
-	0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x61,
-	0x6e, 0x69, 0x6f, 0x6e, 0x3b, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x69, 0x6f, 0x6e, 0x62, 0x06,
-	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
-	file_companion_proto_rawDescOnce sync.Once
-	file_companion_proto_rawDescData = file_companion_proto_rawDesc
-)
-
-func file_companion_proto_rawDescGZIP() []byte {
-	file_companion_proto_rawDescOnce.Do(func() {
-		file_companion_proto_rawDescData = protoimpl.X.CompressGZIP(file_companion_proto_rawDescData)
-	})
-	return file_companion_proto_rawDescData
-}
-
-var file_companion_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_companion_proto_goTypes = []interface{}{
-	(*AuthorizationRequest)(nil), // 0: api.companion.AuthorizationRequest
-	(*TokenReply)(nil),           // 1: api.companion.TokenReply
-}
-var file_companion_proto_depIdxs = []int32{
-	0, // 0: api.companion.Companion.Authorization:input_type -> api.companion.AuthorizationRequest
-	1, // 1: api.companion.Companion.Authorization:output_type -> api.companion.TokenReply
-	1, // [1:2] is the sub-list for method output_type
-	0, // [0:1] 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_companion_proto_init() }
-func file_companion_proto_init() {
-	if File_companion_proto != nil {
-		return
-	}
-	if !protoimpl.UnsafeEnabled {
-		file_companion_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*AuthorizationRequest); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-		file_companion_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*TokenReply); i {
-			case 0:
-				return &v.state
-			case 1:
-				return &v.sizeCache
-			case 2:
-				return &v.unknownFields
-			default:
-				return nil
-			}
-		}
-	}
-	type x struct{}
-	out := protoimpl.TypeBuilder{
-		File: protoimpl.DescBuilder{
-			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
-			RawDescriptor: file_companion_proto_rawDesc,
-			NumEnums:      0,
-			NumMessages:   2,
-			NumExtensions: 0,
-			NumServices:   1,
-		},
-		GoTypes:           file_companion_proto_goTypes,
-		DependencyIndexes: file_companion_proto_depIdxs,
-		MessageInfos:      file_companion_proto_msgTypes,
-	}.Build()
-	File_companion_proto = out.File
-	file_companion_proto_rawDesc = nil
-	file_companion_proto_goTypes = nil
-	file_companion_proto_depIdxs = nil
-}

+ 0 - 101
api/companion/companion_grpc.pb.go

@@ -1,101 +0,0 @@
-// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
-
-package companion
-
-import (
-	context "context"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
-)
-
-// This is a compile-time assertion to ensure that this generated file
-// is compatible with the grpc package it is being compiled against.
-// Requires gRPC-Go v1.32.0 or later.
-const _ = grpc.SupportPackageIsVersion7
-
-// CompanionClient is the client API for Companion service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type CompanionClient interface {
-	Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error)
-}
-
-type companionClient struct {
-	cc grpc.ClientConnInterface
-}
-
-func NewCompanionClient(cc grpc.ClientConnInterface) CompanionClient {
-	return &companionClient{cc}
-}
-
-func (c *companionClient) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error) {
-	out := new(TokenReply)
-	err := c.cc.Invoke(ctx, "/api.companion.Companion/Authorization", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// CompanionServer is the server API for Companion service.
-// All implementations must embed UnimplementedCompanionServer
-// for forward compatibility
-type CompanionServer interface {
-	Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error)
-	mustEmbedUnimplementedCompanionServer()
-}
-
-// UnimplementedCompanionServer must be embedded to have forward compatible implementations.
-type UnimplementedCompanionServer struct {
-}
-
-func (UnimplementedCompanionServer) Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method Authorization not implemented")
-}
-func (UnimplementedCompanionServer) mustEmbedUnimplementedCompanionServer() {}
-
-// UnsafeCompanionServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to CompanionServer will
-// result in compilation errors.
-type UnsafeCompanionServer interface {
-	mustEmbedUnimplementedCompanionServer()
-}
-
-func RegisterCompanionServer(s grpc.ServiceRegistrar, srv CompanionServer) {
-	s.RegisterService(&Companion_ServiceDesc, srv)
-}
-
-func _Companion_Authorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(AuthorizationRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(CompanionServer).Authorization(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/api.companion.Companion/Authorization",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(CompanionServer).Authorization(ctx, req.(*AuthorizationRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-// Companion_ServiceDesc is the grpc.ServiceDesc for Companion service.
-// It's only intended for direct use with grpc.RegisterService,
-// and not to be introspected or modified (even as a copy)
-var Companion_ServiceDesc = grpc.ServiceDesc{
-	ServiceName: "api.companion.Companion",
-	HandlerType: (*CompanionServer)(nil),
-	Methods: []grpc.MethodDesc{
-		{
-			MethodName: "Authorization",
-			Handler:    _Companion_Authorization_Handler,
-		},
-	},
-	Streams:  []grpc.StreamDesc{},
-	Metadata: "companion.proto",
-}

+ 221 - 0
api/partner/partner.pb.go

@@ -0,0 +1,221 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// 	protoc-gen-go v1.26.0-devel
+// 	protoc        v3.15.8
+// source: partner.proto
+
+package partner
+
+import (
+	_ "google.golang.org/genproto/googleapis/api/annotations"
+	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+	reflect "reflect"
+	sync "sync"
+)
+
+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 AuthorizationRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	JsCode string `protobuf:"bytes,1,opt,name=jsCode,proto3" json:"jsCode"`
+}
+
+func (x *AuthorizationRequest) Reset() {
+	*x = AuthorizationRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_partner_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *AuthorizationRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AuthorizationRequest) ProtoMessage() {}
+
+func (x *AuthorizationRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_partner_proto_msgTypes[0]
+	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 AuthorizationRequest.ProtoReflect.Descriptor instead.
+func (*AuthorizationRequest) Descriptor() ([]byte, []int) {
+	return file_partner_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *AuthorizationRequest) GetJsCode() string {
+	if x != nil {
+		return x.JsCode
+	}
+	return ""
+}
+
+type TokenReply struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"`
+}
+
+func (x *TokenReply) Reset() {
+	*x = TokenReply{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_partner_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *TokenReply) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TokenReply) ProtoMessage() {}
+
+func (x *TokenReply) ProtoReflect() protoreflect.Message {
+	mi := &file_partner_proto_msgTypes[1]
+	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 TokenReply.ProtoReflect.Descriptor instead.
+func (*TokenReply) Descriptor() ([]byte, []int) {
+	return file_partner_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *TokenReply) GetToken() string {
+	if x != nil {
+		return x.Token
+	}
+	return ""
+}
+
+var File_partner_proto protoreflect.FileDescriptor
+
+var file_partner_proto_rawDesc = []byte{
+	0x0a, 0x0d, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
+	0x0b, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x1a, 0x1c, 0x67, 0x6f,
+	0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2e, 0x0a, 0x14, 0x41, 0x75,
+	0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x54, 0x6f,
+	0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
+	0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0x7d,
+	0x0a, 0x07, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x12, 0x72, 0x0a, 0x0d, 0x41, 0x75, 0x74,
+	0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69,
+	0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
+	0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
+	0x61, 0x70, 0x69, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x6b, 0x65,
+	0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x22, 0x1a,
+	0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74,
+	0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x42, 0x46, 0x0a,
+	0x0b, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x35,
+	0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73,
+	0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+	0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x3b, 0x70, 0x61,
+	0x72, 0x74, 0x6e, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+	file_partner_proto_rawDescOnce sync.Once
+	file_partner_proto_rawDescData = file_partner_proto_rawDesc
+)
+
+func file_partner_proto_rawDescGZIP() []byte {
+	file_partner_proto_rawDescOnce.Do(func() {
+		file_partner_proto_rawDescData = protoimpl.X.CompressGZIP(file_partner_proto_rawDescData)
+	})
+	return file_partner_proto_rawDescData
+}
+
+var file_partner_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_partner_proto_goTypes = []interface{}{
+	(*AuthorizationRequest)(nil), // 0: api.partner.AuthorizationRequest
+	(*TokenReply)(nil),           // 1: api.partner.TokenReply
+}
+var file_partner_proto_depIdxs = []int32{
+	0, // 0: api.partner.Partner.Authorization:input_type -> api.partner.AuthorizationRequest
+	1, // 1: api.partner.Partner.Authorization:output_type -> api.partner.TokenReply
+	1, // [1:2] is the sub-list for method output_type
+	0, // [0:1] 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_partner_proto_init() }
+func file_partner_proto_init() {
+	if File_partner_proto != nil {
+		return
+	}
+	if !protoimpl.UnsafeEnabled {
+		file_partner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AuthorizationRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_partner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*TokenReply); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+	}
+	type x struct{}
+	out := protoimpl.TypeBuilder{
+		File: protoimpl.DescBuilder{
+			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+			RawDescriptor: file_partner_proto_rawDesc,
+			NumEnums:      0,
+			NumMessages:   2,
+			NumExtensions: 0,
+			NumServices:   1,
+		},
+		GoTypes:           file_partner_proto_goTypes,
+		DependencyIndexes: file_partner_proto_depIdxs,
+		MessageInfos:      file_partner_proto_msgTypes,
+	}.Build()
+	File_partner_proto = out.File
+	file_partner_proto_rawDesc = nil
+	file_partner_proto_goTypes = nil
+	file_partner_proto_depIdxs = nil
+}

+ 7 - 7
api/companion/companion.proto → api/partner/partner.proto

@@ -1,19 +1,19 @@
 syntax = "proto3";
 
-package api.companion;
+package api.partner;
 
 import "google/api/annotations.proto";
-import "google/protobuf/struct.proto";
-import "google/protobuf/empty.proto";
+//import "google/protobuf/struct.proto";
+//import "google/protobuf/empty.proto";
 
-option go_package = "git.ikuban.com/server/pw-protobuf/api/companion;companion";
+option go_package = "git.ikuban.com/server/pw-protobuf/api/partner;partner";
 option java_multiple_files = true;
-option java_package = "api.companion";
+option java_package = "api.partner";
 
-service Companion {
+service Partner {
   rpc Authorization (AuthorizationRequest) returns (TokenReply){
     option (google.api.http) = {
-      post: "/api/user/authorization",
+      post: "/api/partner/authorization",
       body:"*"
     };
   };

+ 101 - 0
api/partner/partner_grpc.pb.go

@@ -0,0 +1,101 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+
+package partner
+
+import (
+	context "context"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// PartnerClient is the client API for Partner service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type PartnerClient interface {
+	Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error)
+}
+
+type partnerClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewPartnerClient(cc grpc.ClientConnInterface) PartnerClient {
+	return &partnerClient{cc}
+}
+
+func (c *partnerClient) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error) {
+	out := new(TokenReply)
+	err := c.cc.Invoke(ctx, "/api.partner.Partner/Authorization", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// PartnerServer is the server API for Partner service.
+// All implementations must embed UnimplementedPartnerServer
+// for forward compatibility
+type PartnerServer interface {
+	Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error)
+	mustEmbedUnimplementedPartnerServer()
+}
+
+// UnimplementedPartnerServer must be embedded to have forward compatible implementations.
+type UnimplementedPartnerServer struct {
+}
+
+func (UnimplementedPartnerServer) Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method Authorization not implemented")
+}
+func (UnimplementedPartnerServer) mustEmbedUnimplementedPartnerServer() {}
+
+// UnsafePartnerServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to PartnerServer will
+// result in compilation errors.
+type UnsafePartnerServer interface {
+	mustEmbedUnimplementedPartnerServer()
+}
+
+func RegisterPartnerServer(s grpc.ServiceRegistrar, srv PartnerServer) {
+	s.RegisterService(&Partner_ServiceDesc, srv)
+}
+
+func _Partner_Authorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(AuthorizationRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(PartnerServer).Authorization(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.partner.Partner/Authorization",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(PartnerServer).Authorization(ctx, req.(*AuthorizationRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// Partner_ServiceDesc is the grpc.ServiceDesc for Partner service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Partner_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "api.partner.Partner",
+	HandlerType: (*PartnerServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "Authorization",
+			Handler:    _Partner_Authorization_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "partner.proto",
+}

+ 13 - 13
api/companion/companion_http.pb.go → api/partner/partner_http.pb.go

@@ -2,7 +2,7 @@
 // versions:
 // protoc-gen-go-http v2.0.0
 
-package companion
+package partner
 
 import (
 	context "context"
@@ -25,16 +25,16 @@ var _ = new(base.Html)
 
 const _ = http.SupportPackageIsVersion1
 
-type CompanionHTTPServer interface {
+type PartnerHTTPServer interface {
 	Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error)
 }
 
-func RegisterCompanionHTTPServer(s *http.Server, srv CompanionHTTPServer) {
+func RegisterPartnerHTTPServer(s *http.Server, srv PartnerHTTPServer) {
 	r := s.Route("/")
-	r.POST("/api/user/authorization", _Companion_Authorization0_HTTP_Handler(srv))
+	r.POST("/api/partner/authorization", _Partner_Authorization0_HTTP_Handler(srv))
 }
 
-func _Companion_Authorization0_HTTP_Handler(srv CompanionHTTPServer) func(ctx http.Context) error {
+func _Partner_Authorization0_HTTP_Handler(srv PartnerHTTPServer) func(ctx http.Context) error {
 	return func(ctx http.Context) error {
 		var in AuthorizationRequest
 		if err := ctx.Bind(&in); err != nil {
@@ -43,7 +43,7 @@ func _Companion_Authorization0_HTTP_Handler(srv CompanionHTTPServer) func(ctx ht
 		if err := ctx.BindQuery(&in); err != nil {
 			return err
 		}
-		http.SetOperation(ctx, "/api.companion.Companion/Authorization")
+		http.SetOperation(ctx, "/api.partner.Partner/Authorization")
 		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
 			return srv.Authorization(ctx, req.(*AuthorizationRequest))
 		})
@@ -61,23 +61,23 @@ func _Companion_Authorization0_HTTP_Handler(srv CompanionHTTPServer) func(ctx ht
 	}
 }
 
-type CompanionHTTPClient interface {
+type PartnerHTTPClient interface {
 	Authorization(ctx context.Context, req *AuthorizationRequest, opts ...http.CallOption) (rsp *TokenReply, err error)
 }
 
-type CompanionHTTPClientImpl struct {
+type PartnerHTTPClientImpl struct {
 	cc *http.Client
 }
 
-func NewCompanionHTTPClient(client *http.Client) CompanionHTTPClient {
-	return &CompanionHTTPClientImpl{client}
+func NewPartnerHTTPClient(client *http.Client) PartnerHTTPClient {
+	return &PartnerHTTPClientImpl{client}
 }
 
-func (c *CompanionHTTPClientImpl) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...http.CallOption) (*TokenReply, error) {
+func (c *PartnerHTTPClientImpl) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...http.CallOption) (*TokenReply, error) {
 	var out TokenReply
-	pattern := "/api/user/authorization"
+	pattern := "/api/partner/authorization"
 	path := binding.EncodeURL(pattern, in, false)
-	opts = append(opts, http.Operation("/api.companion.Companion/Authorization"))
+	opts = append(opts, http.Operation("/api.partner.Partner/Authorization"))
 	opts = append(opts, http.PathTemplate(pattern))
 	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
 	if err != nil {

+ 202 - 139
api/user/user.pb.go

@@ -23,6 +23,53 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
+type CheckUserPartnerIsRelationshipRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	PartnerID string `protobuf:"bytes,1,opt,name=partnerID,proto3" json:"partnerID"`
+}
+
+func (x *CheckUserPartnerIsRelationshipRequest) Reset() {
+	*x = CheckUserPartnerIsRelationshipRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_user_proto_msgTypes[0]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CheckUserPartnerIsRelationshipRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CheckUserPartnerIsRelationshipRequest) ProtoMessage() {}
+
+func (x *CheckUserPartnerIsRelationshipRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_user_proto_msgTypes[0]
+	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 CheckUserPartnerIsRelationshipRequest.ProtoReflect.Descriptor instead.
+func (*CheckUserPartnerIsRelationshipRequest) Descriptor() ([]byte, []int) {
+	return file_user_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CheckUserPartnerIsRelationshipRequest) GetPartnerID() string {
+	if x != nil {
+		return x.PartnerID
+	}
+	return ""
+}
+
 type UserInfo struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -39,7 +86,7 @@ type UserInfo struct {
 func (x *UserInfo) Reset() {
 	*x = UserInfo{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_user_proto_msgTypes[0]
+		mi := &file_user_proto_msgTypes[1]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -52,7 +99,7 @@ func (x *UserInfo) String() string {
 func (*UserInfo) ProtoMessage() {}
 
 func (x *UserInfo) ProtoReflect() protoreflect.Message {
-	mi := &file_user_proto_msgTypes[0]
+	mi := &file_user_proto_msgTypes[1]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -65,7 +112,7 @@ func (x *UserInfo) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use UserInfo.ProtoReflect.Descriptor instead.
 func (*UserInfo) Descriptor() ([]byte, []int) {
-	return file_user_proto_rawDescGZIP(), []int{0}
+	return file_user_proto_rawDescGZIP(), []int{1}
 }
 
 func (x *UserInfo) GetId() string {
@@ -123,7 +170,7 @@ type UpdateUserInformationRequest struct {
 func (x *UpdateUserInformationRequest) Reset() {
 	*x = UpdateUserInformationRequest{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_user_proto_msgTypes[1]
+		mi := &file_user_proto_msgTypes[2]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -136,7 +183,7 @@ func (x *UpdateUserInformationRequest) String() string {
 func (*UpdateUserInformationRequest) ProtoMessage() {}
 
 func (x *UpdateUserInformationRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_user_proto_msgTypes[1]
+	mi := &file_user_proto_msgTypes[2]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -149,7 +196,7 @@ func (x *UpdateUserInformationRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use UpdateUserInformationRequest.ProtoReflect.Descriptor instead.
 func (*UpdateUserInformationRequest) Descriptor() ([]byte, []int) {
-	return file_user_proto_rawDescGZIP(), []int{1}
+	return file_user_proto_rawDescGZIP(), []int{2}
 }
 
 func (x *UpdateUserInformationRequest) GetNickname() string {
@@ -184,7 +231,7 @@ type SendPhoneCodeRequest struct {
 func (x *SendPhoneCodeRequest) Reset() {
 	*x = SendPhoneCodeRequest{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_user_proto_msgTypes[2]
+		mi := &file_user_proto_msgTypes[3]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -197,7 +244,7 @@ func (x *SendPhoneCodeRequest) String() string {
 func (*SendPhoneCodeRequest) ProtoMessage() {}
 
 func (x *SendPhoneCodeRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_user_proto_msgTypes[2]
+	mi := &file_user_proto_msgTypes[3]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -210,7 +257,7 @@ func (x *SendPhoneCodeRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use SendPhoneCodeRequest.ProtoReflect.Descriptor instead.
 func (*SendPhoneCodeRequest) Descriptor() ([]byte, []int) {
-	return file_user_proto_rawDescGZIP(), []int{2}
+	return file_user_proto_rawDescGZIP(), []int{3}
 }
 
 func (x *SendPhoneCodeRequest) GetPhone() string {
@@ -232,7 +279,7 @@ type CheckPhoneCodeRequest struct {
 func (x *CheckPhoneCodeRequest) Reset() {
 	*x = CheckPhoneCodeRequest{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_user_proto_msgTypes[3]
+		mi := &file_user_proto_msgTypes[4]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -245,7 +292,7 @@ func (x *CheckPhoneCodeRequest) String() string {
 func (*CheckPhoneCodeRequest) ProtoMessage() {}
 
 func (x *CheckPhoneCodeRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_user_proto_msgTypes[3]
+	mi := &file_user_proto_msgTypes[4]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -258,7 +305,7 @@ func (x *CheckPhoneCodeRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use CheckPhoneCodeRequest.ProtoReflect.Descriptor instead.
 func (*CheckPhoneCodeRequest) Descriptor() ([]byte, []int) {
-	return file_user_proto_rawDescGZIP(), []int{3}
+	return file_user_proto_rawDescGZIP(), []int{4}
 }
 
 func (x *CheckPhoneCodeRequest) GetPhone() string {
@@ -287,7 +334,7 @@ type DebugLoginRequest struct {
 func (x *DebugLoginRequest) Reset() {
 	*x = DebugLoginRequest{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_user_proto_msgTypes[4]
+		mi := &file_user_proto_msgTypes[5]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -300,7 +347,7 @@ func (x *DebugLoginRequest) String() string {
 func (*DebugLoginRequest) ProtoMessage() {}
 
 func (x *DebugLoginRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_user_proto_msgTypes[4]
+	mi := &file_user_proto_msgTypes[5]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -313,7 +360,7 @@ func (x *DebugLoginRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use DebugLoginRequest.ProtoReflect.Descriptor instead.
 func (*DebugLoginRequest) Descriptor() ([]byte, []int) {
-	return file_user_proto_rawDescGZIP(), []int{4}
+	return file_user_proto_rawDescGZIP(), []int{5}
 }
 
 func (x *DebugLoginRequest) GetUserId() string {
@@ -341,7 +388,7 @@ type AuthorizationRequest struct {
 func (x *AuthorizationRequest) Reset() {
 	*x = AuthorizationRequest{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_user_proto_msgTypes[5]
+		mi := &file_user_proto_msgTypes[6]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -354,7 +401,7 @@ func (x *AuthorizationRequest) String() string {
 func (*AuthorizationRequest) ProtoMessage() {}
 
 func (x *AuthorizationRequest) ProtoReflect() protoreflect.Message {
-	mi := &file_user_proto_msgTypes[5]
+	mi := &file_user_proto_msgTypes[6]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -367,7 +414,7 @@ func (x *AuthorizationRequest) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use AuthorizationRequest.ProtoReflect.Descriptor instead.
 func (*AuthorizationRequest) Descriptor() ([]byte, []int) {
-	return file_user_proto_rawDescGZIP(), []int{5}
+	return file_user_proto_rawDescGZIP(), []int{6}
 }
 
 func (x *AuthorizationRequest) GetJsCode() string {
@@ -388,7 +435,7 @@ type TokenReply struct {
 func (x *TokenReply) Reset() {
 	*x = TokenReply{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_user_proto_msgTypes[6]
+		mi := &file_user_proto_msgTypes[7]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
@@ -401,7 +448,7 @@ func (x *TokenReply) String() string {
 func (*TokenReply) ProtoMessage() {}
 
 func (x *TokenReply) ProtoReflect() protoreflect.Message {
-	mi := &file_user_proto_msgTypes[6]
+	mi := &file_user_proto_msgTypes[7]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -414,7 +461,7 @@ func (x *TokenReply) ProtoReflect() protoreflect.Message {
 
 // Deprecated: Use TokenReply.ProtoReflect.Descriptor instead.
 func (*TokenReply) Descriptor() ([]byte, []int) {
-	return file_user_proto_rawDescGZIP(), []int{6}
+	return file_user_proto_rawDescGZIP(), []int{7}
 }
 
 func (x *TokenReply) GetToken() string {
@@ -433,95 +480,99 @@ var file_user_proto_rawDesc = []byte{
 	0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
 	0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
 	0x6f, 0x1a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f, 0x63, 0x68, 0x61, 0x74,
-	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x94, 0x01, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49,
-	0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12,
-	0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01,
-	0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a,
-	0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68,
-	0x6f, 0x6e, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x18,
-	0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x22, 0x6a, 0x0a,
-	0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72,
-	0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a,
-	0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61,
-	0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76,
-	0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x03,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x78, 0x22, 0x2c, 0x0a, 0x14, 0x53, 0x65, 0x6e,
-	0x64, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
-	0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x41, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b,
-	0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x3f, 0x0a, 0x11, 0x44, 0x65,
-	0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
-	0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x2e, 0x0a, 0x14, 0x41,
+	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a, 0x25, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55,
+	0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+	0x1c, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x44, 0x22, 0x94, 0x01,
+	0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x69,
+	0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x69,
+	0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72,
+	0x55, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61,
+	0x72, 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x04, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65,
+	0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x78, 0x12, 0x16, 0x0a, 0x06,
+	0x63, 0x72, 0x65, 0x64, 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x63, 0x72,
+	0x65, 0x64, 0x69, 0x74, 0x22, 0x6a, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73,
+	0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x4e, 0x69, 0x63, 0x6b, 0x6e, 0x61, 0x6d, 0x65,
+	0x12, 0x1c, 0x0a, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x76, 0x61, 0x74, 0x61, 0x72, 0x55, 0x72, 0x6c, 0x12, 0x10,
+	0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x78,
+	0x22, 0x2c, 0x0a, 0x14, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64,
+	0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e,
+	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x22, 0x41,
+	0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x0a,
+	0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
+	0x65, 0x22, 0x3f, 0x0a, 0x11, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52,
+	0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x12,
+	0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
+	0x64, 0x65, 0x22, 0x2e, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x73,
+	0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6a, 0x73, 0x43, 0x6f,
+	0x64, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xae, 0x06, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12,
+	0x61, 0x0a, 0x0a, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e,
+	0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f,
+	0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69,
+	0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75,
+	0x73, 0x65, 0x72, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x3a,
+	0x01, 0x2a, 0x12, 0x69, 0x0a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74,
+	0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41,
 	0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
-	0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x06, 0x6a, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x22, 0x22, 0x0a, 0x0a, 0x54,
-	0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b,
-	0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x32,
-	0xae, 0x06, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x61, 0x0a, 0x0a, 0x44, 0x65, 0x62, 0x75,
-	0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65,
-	0x72, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75,
 	0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x54,
-	0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02,
-	0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x6c, 0x6f, 0x67,
-	0x69, 0x6e, 0x2f, 0x64, 0x65, 0x62, 0x75, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0x69, 0x0a, 0x0d, 0x41,
-	0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x61,
-	0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
-	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x61,
-	0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70,
-	0x6c, 0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69,
-	0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74,
-	0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x80, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74,
-	0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
-	0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61,
-	0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
-	0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
-	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
-	0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75,
-	0x73, 0x65, 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x72,
-	0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x54, 0x0a, 0x0b, 0x47, 0x65, 0x74,
-	0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
-	0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
-	0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72,
-	0x49, 0x6e, 0x66, 0x6f, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61,
-	0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x3a, 0x01, 0x2a, 0x12,
-	0x67, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65,
-	0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64,
-	0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
-	0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18,
-	0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65,
-	0x2f, 0x73, 0x65, 0x6e, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x6a, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63,
-	0x6b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69,
-	0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x68, 0x6f, 0x6e, 0x65,
-	0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f,
-	0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d,
-	0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x22, 0x14, 0x2f, 0x61, 0x70,
-	0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x63, 0x68, 0x65, 0x63,
-	0x6b, 0x3a, 0x01, 0x2a, 0x12, 0xa9, 0x01, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73,
-	0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74,
-	0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68,
-	0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74,
-	0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69,
-	0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63,
-	0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72,
-	0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68,
-	0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22,
-	0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b,
-	0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x3a, 0x01, 0x2a,
-	0x42, 0x3d, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x2f,
-	0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73,
-	0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
-	0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62,
-	0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+	0x1c, 0x22, 0x17, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x61, 0x75, 0x74,
+	0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a, 0x12, 0x80, 0x01,
+	0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
+	0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73,
+	0x65, 0x72, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66,
+	0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+	0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22,
+	0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x70, 0x64, 0x61, 0x74,
+	0x65, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x01, 0x2a,
+	0x12, 0x54, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12,
+	0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+	0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73,
+	0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x19, 0x82, 0xd3, 0xe4,
+	0x93, 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x69,
+	0x6e, 0x66, 0x6f, 0x3a, 0x01, 0x2a, 0x12, 0x67, 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x68,
+	0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73,
+	0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
+	0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73,
+	0x65, 0x72, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2f, 0x73, 0x65, 0x6e, 0x64, 0x3a, 0x01, 0x2a, 0x12,
+	0x6a, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64,
+	0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65,
+	0x63, 0x6b, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+	0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93,
+	0x02, 0x19, 0x22, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x6f,
+	0x64, 0x65, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x3a, 0x01, 0x2a, 0x12, 0xa9, 0x01, 0x0a, 0x1e,
+	0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72,
+	0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x2f,
+	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55,
+	0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x2d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b,
+	0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x27,
+	0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65,
+	0x72, 0x2f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+	0x73, 0x68, 0x69, 0x70, 0x3a, 0x01, 0x2a, 0x42, 0x3d, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x2e, 0x75,
+	0x73, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61,
+	0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d,
+	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65,
+	0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -536,33 +587,33 @@ func file_user_proto_rawDescGZIP() []byte {
 	return file_user_proto_rawDescData
 }
 
-var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
 var file_user_proto_goTypes = []interface{}{
-	(*UserInfo)(nil),                                   // 0: api.user.UserInfo
-	(*UpdateUserInformationRequest)(nil),               // 1: api.user.UpdateUserInformationRequest
-	(*SendPhoneCodeRequest)(nil),                       // 2: api.user.SendPhoneCodeRequest
-	(*CheckPhoneCodeRequest)(nil),                      // 3: api.user.CheckPhoneCodeRequest
-	(*DebugLoginRequest)(nil),                          // 4: api.user.DebugLoginRequest
-	(*AuthorizationRequest)(nil),                       // 5: api.user.AuthorizationRequest
-	(*TokenReply)(nil),                                 // 6: api.user.TokenReply
-	(*emptypb.Empty)(nil),                              // 7: google.protobuf.Empty
-	(*chat.CheckUserPartnerIsRelationshipRequest)(nil), // 8: api.chat.CheckUserPartnerIsRelationshipRequest
-	(*chat.CheckUserPartnerIsRelationshipReply)(nil),   // 9: api.chat.CheckUserPartnerIsRelationshipReply
+	(*CheckUserPartnerIsRelationshipRequest)(nil), // 0: api.user.CheckUserPartnerIsRelationshipRequest
+	(*UserInfo)(nil),                                 // 1: api.user.UserInfo
+	(*UpdateUserInformationRequest)(nil),             // 2: api.user.UpdateUserInformationRequest
+	(*SendPhoneCodeRequest)(nil),                     // 3: api.user.SendPhoneCodeRequest
+	(*CheckPhoneCodeRequest)(nil),                    // 4: api.user.CheckPhoneCodeRequest
+	(*DebugLoginRequest)(nil),                        // 5: api.user.DebugLoginRequest
+	(*AuthorizationRequest)(nil),                     // 6: api.user.AuthorizationRequest
+	(*TokenReply)(nil),                               // 7: api.user.TokenReply
+	(*emptypb.Empty)(nil),                            // 8: google.protobuf.Empty
+	(*chat.CheckUserPartnerIsRelationshipReply)(nil), // 9: api.chat.CheckUserPartnerIsRelationshipReply
 }
 var file_user_proto_depIdxs = []int32{
-	4, // 0: api.user.User.DebugLogin:input_type -> api.user.DebugLoginRequest
-	5, // 1: api.user.User.Authorization:input_type -> api.user.AuthorizationRequest
-	1, // 2: api.user.User.UpdateUserInformation:input_type -> api.user.UpdateUserInformationRequest
-	7, // 3: api.user.User.GetUserInfo:input_type -> google.protobuf.Empty
-	2, // 4: api.user.User.SendPhoneCode:input_type -> api.user.SendPhoneCodeRequest
-	3, // 5: api.user.User.CheckPhoneCode:input_type -> api.user.CheckPhoneCodeRequest
-	8, // 6: api.user.User.CheckUserPartnerIsRelationship:input_type -> api.chat.CheckUserPartnerIsRelationshipRequest
-	6, // 7: api.user.User.DebugLogin:output_type -> api.user.TokenReply
-	6, // 8: api.user.User.Authorization:output_type -> api.user.TokenReply
-	7, // 9: api.user.User.UpdateUserInformation:output_type -> google.protobuf.Empty
-	0, // 10: api.user.User.GetUserInfo:output_type -> api.user.UserInfo
-	7, // 11: api.user.User.SendPhoneCode:output_type -> google.protobuf.Empty
-	7, // 12: api.user.User.CheckPhoneCode:output_type -> google.protobuf.Empty
+	5, // 0: api.user.User.DebugLogin:input_type -> api.user.DebugLoginRequest
+	6, // 1: api.user.User.Authorization:input_type -> api.user.AuthorizationRequest
+	2, // 2: api.user.User.UpdateUserInformation:input_type -> api.user.UpdateUserInformationRequest
+	8, // 3: api.user.User.GetUserInfo:input_type -> google.protobuf.Empty
+	3, // 4: api.user.User.SendPhoneCode:input_type -> api.user.SendPhoneCodeRequest
+	4, // 5: api.user.User.CheckPhoneCode:input_type -> api.user.CheckPhoneCodeRequest
+	0, // 6: api.user.User.CheckUserPartnerIsRelationship:input_type -> api.user.CheckUserPartnerIsRelationshipRequest
+	7, // 7: api.user.User.DebugLogin:output_type -> api.user.TokenReply
+	7, // 8: api.user.User.Authorization:output_type -> api.user.TokenReply
+	8, // 9: api.user.User.UpdateUserInformation:output_type -> google.protobuf.Empty
+	1, // 10: api.user.User.GetUserInfo:output_type -> api.user.UserInfo
+	8, // 11: api.user.User.SendPhoneCode:output_type -> google.protobuf.Empty
+	8, // 12: api.user.User.CheckPhoneCode:output_type -> google.protobuf.Empty
 	9, // 13: api.user.User.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
 	7, // [7:14] is the sub-list for method output_type
 	0, // [0:7] is the sub-list for method input_type
@@ -578,7 +629,7 @@ func file_user_proto_init() {
 	}
 	if !protoimpl.UnsafeEnabled {
 		file_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*UserInfo); i {
+			switch v := v.(*CheckUserPartnerIsRelationshipRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -590,7 +641,7 @@ func file_user_proto_init() {
 			}
 		}
 		file_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*UpdateUserInformationRequest); i {
+			switch v := v.(*UserInfo); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -602,7 +653,7 @@ func file_user_proto_init() {
 			}
 		}
 		file_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*SendPhoneCodeRequest); i {
+			switch v := v.(*UpdateUserInformationRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -614,7 +665,7 @@ func file_user_proto_init() {
 			}
 		}
 		file_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*CheckPhoneCodeRequest); i {
+			switch v := v.(*SendPhoneCodeRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -626,7 +677,7 @@ func file_user_proto_init() {
 			}
 		}
 		file_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*DebugLoginRequest); i {
+			switch v := v.(*CheckPhoneCodeRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -638,7 +689,7 @@ func file_user_proto_init() {
 			}
 		}
 		file_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*AuthorizationRequest); i {
+			switch v := v.(*DebugLoginRequest); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -650,6 +701,18 @@ func file_user_proto_init() {
 			}
 		}
 		file_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*AuthorizationRequest); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
 			switch v := v.(*TokenReply); i {
 			case 0:
 				return &v.state
@@ -668,7 +731,7 @@ func file_user_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_user_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   7,
+			NumMessages:   8,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 5 - 1
api/user/user.proto

@@ -48,7 +48,7 @@ service User {
       body:"*"
     };
   };
-  rpc CheckUserPartnerIsRelationship (chat.CheckUserPartnerIsRelationshipRequest) returns (chat.CheckUserPartnerIsRelationshipReply){
+  rpc CheckUserPartnerIsRelationship (CheckUserPartnerIsRelationshipRequest) returns (chat.CheckUserPartnerIsRelationshipReply){
     option (google.api.http) = {
       post: "/api/user/check/relationship",
       body:"*"
@@ -56,6 +56,10 @@ service User {
   };
 }
 
+message CheckUserPartnerIsRelationshipRequest{
+  string partnerID = 1;
+}
+
 message UserInfo{
  string id = 1; // id
  string nickname = 2;// 昵称

+ 6 - 6
api/user/user_grpc.pb.go

@@ -26,7 +26,7 @@ type UserClient interface {
 	GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error)
 	SendPhoneCode(ctx context.Context, in *SendPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	CheckPhoneCode(ctx context.Context, in *CheckPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
-	CheckUserPartnerIsRelationship(ctx context.Context, in *chat.CheckUserPartnerIsRelationshipRequest, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error)
+	CheckUserPartnerIsRelationship(ctx context.Context, in *CheckUserPartnerIsRelationshipRequest, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error)
 }
 
 type userClient struct {
@@ -91,7 +91,7 @@ func (c *userClient) CheckPhoneCode(ctx context.Context, in *CheckPhoneCodeReque
 	return out, nil
 }
 
-func (c *userClient) CheckUserPartnerIsRelationship(ctx context.Context, in *chat.CheckUserPartnerIsRelationshipRequest, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error) {
+func (c *userClient) CheckUserPartnerIsRelationship(ctx context.Context, in *CheckUserPartnerIsRelationshipRequest, opts ...grpc.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error) {
 	out := new(chat.CheckUserPartnerIsRelationshipReply)
 	err := c.cc.Invoke(ctx, "/api.user.User/CheckUserPartnerIsRelationship", in, out, opts...)
 	if err != nil {
@@ -110,7 +110,7 @@ type UserServer interface {
 	GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
 	SendPhoneCode(context.Context, *SendPhoneCodeRequest) (*emptypb.Empty, error)
 	CheckPhoneCode(context.Context, *CheckPhoneCodeRequest) (*emptypb.Empty, error)
-	CheckUserPartnerIsRelationship(context.Context, *chat.CheckUserPartnerIsRelationshipRequest) (*chat.CheckUserPartnerIsRelationshipReply, error)
+	CheckUserPartnerIsRelationship(context.Context, *CheckUserPartnerIsRelationshipRequest) (*chat.CheckUserPartnerIsRelationshipReply, error)
 	mustEmbedUnimplementedUserServer()
 }
 
@@ -136,7 +136,7 @@ func (UnimplementedUserServer) SendPhoneCode(context.Context, *SendPhoneCodeRequ
 func (UnimplementedUserServer) CheckPhoneCode(context.Context, *CheckPhoneCodeRequest) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method CheckPhoneCode not implemented")
 }
-func (UnimplementedUserServer) CheckUserPartnerIsRelationship(context.Context, *chat.CheckUserPartnerIsRelationshipRequest) (*chat.CheckUserPartnerIsRelationshipReply, error) {
+func (UnimplementedUserServer) CheckUserPartnerIsRelationship(context.Context, *CheckUserPartnerIsRelationshipRequest) (*chat.CheckUserPartnerIsRelationshipReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method CheckUserPartnerIsRelationship not implemented")
 }
 func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
@@ -261,7 +261,7 @@ func _User_CheckPhoneCode_Handler(srv interface{}, ctx context.Context, dec func
 }
 
 func _User_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(chat.CheckUserPartnerIsRelationshipRequest)
+	in := new(CheckUserPartnerIsRelationshipRequest)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
@@ -273,7 +273,7 @@ func _User_CheckUserPartnerIsRelationship_Handler(srv interface{}, ctx context.C
 		FullMethod: "/api.user.User/CheckUserPartnerIsRelationship",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserServer).CheckUserPartnerIsRelationship(ctx, req.(*chat.CheckUserPartnerIsRelationshipRequest))
+		return srv.(UserServer).CheckUserPartnerIsRelationship(ctx, req.(*CheckUserPartnerIsRelationshipRequest))
 	}
 	return interceptor(ctx, in, info, handler)
 }

+ 5 - 5
api/user/user_http.pb.go

@@ -30,7 +30,7 @@ const _ = http.SupportPackageIsVersion1
 type UserHTTPServer interface {
 	Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error)
 	CheckPhoneCode(context.Context, *CheckPhoneCodeRequest) (*emptypb.Empty, error)
-	CheckUserPartnerIsRelationship(context.Context, *chat.CheckUserPartnerIsRelationshipRequest) (*chat.CheckUserPartnerIsRelationshipReply, error)
+	CheckUserPartnerIsRelationship(context.Context, *CheckUserPartnerIsRelationshipRequest) (*chat.CheckUserPartnerIsRelationshipReply, error)
 	DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error)
 	GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
 	SendPhoneCode(context.Context, *SendPhoneCodeRequest) (*emptypb.Empty, error)
@@ -212,7 +212,7 @@ func _User_CheckPhoneCode0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Contex
 
 func _User_CheckUserPartnerIsRelationship0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
 	return func(ctx http.Context) error {
-		var in chat.CheckUserPartnerIsRelationshipRequest
+		var in CheckUserPartnerIsRelationshipRequest
 		if err := ctx.Bind(&in); err != nil {
 			return err
 		}
@@ -221,7 +221,7 @@ func _User_CheckUserPartnerIsRelationship0_HTTP_Handler(srv UserHTTPServer) func
 		}
 		http.SetOperation(ctx, "/api.user.User/CheckUserPartnerIsRelationship")
 		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
-			return srv.CheckUserPartnerIsRelationship(ctx, req.(*chat.CheckUserPartnerIsRelationshipRequest))
+			return srv.CheckUserPartnerIsRelationship(ctx, req.(*CheckUserPartnerIsRelationshipRequest))
 		})
 		out, err := h(ctx, &in)
 		if err != nil {
@@ -240,7 +240,7 @@ func _User_CheckUserPartnerIsRelationship0_HTTP_Handler(srv UserHTTPServer) func
 type UserHTTPClient interface {
 	Authorization(ctx context.Context, req *AuthorizationRequest, opts ...http.CallOption) (rsp *TokenReply, err error)
 	CheckPhoneCode(ctx context.Context, req *CheckPhoneCodeRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
-	CheckUserPartnerIsRelationship(ctx context.Context, req *chat.CheckUserPartnerIsRelationshipRequest, opts ...http.CallOption) (rsp *chat.CheckUserPartnerIsRelationshipReply, err error)
+	CheckUserPartnerIsRelationship(ctx context.Context, req *CheckUserPartnerIsRelationshipRequest, opts ...http.CallOption) (rsp *chat.CheckUserPartnerIsRelationshipReply, err error)
 	DebugLogin(ctx context.Context, req *DebugLoginRequest, opts ...http.CallOption) (rsp *TokenReply, err error)
 	GetUserInfo(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserInfo, err error)
 	SendPhoneCode(ctx context.Context, req *SendPhoneCodeRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
@@ -281,7 +281,7 @@ func (c *UserHTTPClientImpl) CheckPhoneCode(ctx context.Context, in *CheckPhoneC
 	return &out, err
 }
 
-func (c *UserHTTPClientImpl) CheckUserPartnerIsRelationship(ctx context.Context, in *chat.CheckUserPartnerIsRelationshipRequest, opts ...http.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error) {
+func (c *UserHTTPClientImpl) CheckUserPartnerIsRelationship(ctx context.Context, in *CheckUserPartnerIsRelationshipRequest, opts ...http.CallOption) (*chat.CheckUserPartnerIsRelationshipReply, error) {
 	var out chat.CheckUserPartnerIsRelationshipReply
 	pattern := "/api/user/check/relationship"
 	path := binding.EncodeURL(pattern, in, false)

+ 0 - 19
client/companion.go

@@ -1,19 +0,0 @@
-package client
-
-import (
-	"git.ikuban.com/server/kratos-nacos/registry"
-	"git.ikuban.com/server/pw-protobuf/api/companion"
-	"github.com/go-kratos/kratos/v2/log"
-)
-
-func NewCompanionClient(r *registry.Registry, logger log.Logger) companion.CompanionClient {
-	conn, err := getDialInsecure(r, logger, "discovery://pw/pw-companion")
-	if err != nil {
-		panic(err)
-	}
-	if conn == nil {
-		return nil
-	}
-	client := companion.NewCompanionClient(conn)
-	return client
-}

+ 19 - 0
client/partner.go

@@ -0,0 +1,19 @@
+package client
+
+import (
+	"git.ikuban.com/server/kratos-nacos/registry"
+	"git.ikuban.com/server/pw-protobuf/api/partner"
+	"github.com/go-kratos/kratos/v2/log"
+)
+
+func NewPartnerClient(r *registry.Registry, logger log.Logger) partner.PartnerClient {
+	conn, err := getDialInsecure(r, logger, "discovery://pw/pw-partner")
+	if err != nil {
+		panic(err)
+	}
+	if conn == nil {
+		return nil
+	}
+	client := partner.NewPartnerClient(conn)
+	return client
+}

+ 1 - 0
js/api/chat/chat_pb.ts

@@ -1,5 +1,6 @@
 export interface CheckUserPartnerIsRelationshipRequest{
     partnerID?:string;
+    userID?:string;
 }
 export interface CheckUserPartnerIsRelationshipReply{
     isBuildRelationship?:boolean;

+ 13 - 0
js/api/partner/partner_http_pb.ts

@@ -0,0 +1,13 @@
+// @ts-ignore
+import { request } from 'ice';
+import {AuthorizationRequest,TokenReply} from "./partner_pb";
+
+const PartnerService = {
+  Authorization: async (req?: AuthorizationRequest) => {
+	const res = await request.post<{ data: TokenReply, code: string, message: string }>('/api/partner/authorization', req);
+    return res.data;
+  },
+
+};
+
+export default PartnerService;

+ 7 - 0
js/api/partner/partner_pb.ts

@@ -0,0 +1,7 @@
+export interface AuthorizationRequest{
+    jsCode?:string;
+}
+export interface TokenReply{
+    token?:string;
+}
+

+ 2 - 2
js/api/user/user_http_pb.ts

@@ -1,7 +1,7 @@
 // @ts-ignore
 import { request } from 'ice';
-import {DebugLoginRequest,TokenReply,AuthorizationRequest,UpdateUserInformationRequest,UserInfo,SendPhoneCodeRequest,CheckPhoneCodeRequest} from "./user_pb";
-import {CheckUserPartnerIsRelationshipRequest,CheckUserPartnerIsRelationshipReply} from "../chat/chat_pb";
+import {DebugLoginRequest,TokenReply,AuthorizationRequest,UpdateUserInformationRequest,UserInfo,SendPhoneCodeRequest,CheckPhoneCodeRequest,CheckUserPartnerIsRelationshipRequest} from "./user_pb";
+import {CheckUserPartnerIsRelationshipReply} from "../chat/chat_pb";
 
 const UserService = {
   DebugLogin: async (req?: DebugLoginRequest) => {

+ 3 - 0
js/api/user/user_pb.ts

@@ -1,3 +1,6 @@
+export interface CheckUserPartnerIsRelationshipRequest{
+    partnerID?:string;
+}
 export interface UserInfo{
     /**  id */
     id?:string;