feat 初始化

This commit is contained in:
2026-10-28 21:49:26 +08:00
parent 447705f98b
commit c0ceb4331b
40 changed files with 11262 additions and 1 deletions

View File

@@ -0,0 +1,546 @@
{
"swagger": "2.0",
"info": {
"title": "rs_common.proto",
"version": "version not set"
},
"tags": [
{
"name": "Gateway"
},
{
"name": "ThirdParty"
},
{
"name": "User"
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/third-party/open/code_voucher": {
"post": {
"summary": "获取验证码凭证",
"operationId": "ThirdParty_AppGetCodeVoucher",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AppGetCodeVoucherResp"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppGetCodeVoucherReq"
}
}
],
"tags": [
"ThirdParty"
]
}
},
"/third-party/open/login": {
"post": {
"summary": "登录",
"operationId": "ThirdParty_AppLogin",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AppLoginResp"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppLoginReq"
}
}
],
"tags": [
"ThirdParty"
]
}
},
"/third-party/open/login_bind": {
"post": {
"summary": "绑定手机号",
"operationId": "ThirdParty_AppBindPhone",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AppLoginResp"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppBindPhoneReq"
}
}
],
"tags": [
"ThirdParty"
]
}
},
"/third-party/open/logout": {
"post": {
"summary": "登出",
"operationId": "ThirdParty_AppLogout",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AppLogoutResp"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppLogoutReq"
}
}
],
"tags": [
"ThirdParty"
]
}
},
"/third-party/open/refresh_token": {
"post": {
"summary": "刷新令牌",
"operationId": "ThirdParty_AppRefreshToken",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AppRefreshTokenResp"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppRefreshTokenReq"
}
}
],
"tags": [
"ThirdParty"
]
}
},
"/third-party/open/send_code": {
"post": {
"summary": "发送验证码",
"operationId": "ThirdParty_AppSendCode",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AppSendCodeResp"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppSendCodeReq"
}
}
],
"tags": [
"ThirdParty"
]
}
},
"/user/auth/info": {
"post": {
"summary": "查询用户信息",
"operationId": "User_AppFindUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AppFindUserResp"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppFindUserReq"
}
}
],
"tags": [
"User"
]
}
},
"/user/auth/modify/nick_and_avatar": {
"post": {
"summary": "更新用户昵称和头像",
"operationId": "User_AppUpdateUserNickAndAvatar",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/AppUpdateUserNickAndAvatarResp"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppUpdateUserNickAndAvatarReq"
}
}
],
"tags": [
"User"
]
}
}
},
"definitions": {
"AppBindPhoneReq": {
"type": "object",
"properties": {
"ticket": {
"type": "string",
"title": "凭证"
},
"countryCode": {
"type": "string",
"title": "国家码"
},
"phone": {
"type": "string",
"title": "手机号"
},
"code": {
"type": "string",
"title": "验证码"
},
"miniPhoneCode": {
"type": "string",
"title": "微信小程序手机凭证"
}
},
"title": "---------- AppBindPhone ----------"
},
"AppFindUserReq": {
"type": "object",
"title": "---------- AppFindUser ----------"
},
"AppFindUserResp": {
"type": "object",
"properties": {
"usn": {
"type": "string",
"format": "int64"
},
"uid": {
"type": "string",
"title": "用户唯一编号,仅用于展示"
},
"name": {
"type": "string",
"title": "用户名"
},
"headURL": {
"type": "string",
"title": "头像"
},
"isDefaultName": {
"type": "boolean",
"title": "是否是默认头像"
}
}
},
"AppGetCodeVoucherReq": {
"type": "object",
"properties": {
"countryCode": {
"type": "string",
"title": "国家码"
},
"phone": {
"type": "string",
"title": "手机号"
},
"code": {
"type": "string",
"title": "验证码"
}
},
"title": "---------- AppGetCodeVoucher ----------"
},
"AppGetCodeVoucherResp": {
"type": "object",
"properties": {
"codeVoucher": {
"type": "string",
"title": "凭证"
}
}
},
"AppLoginReq": {
"type": "object",
"properties": {
"type": {
"$ref": "#/definitions/LoginType",
"title": "登录方式"
},
"platformType": {
"$ref": "#/definitions/PlatformType",
"title": "平台类型"
},
"countryCode": {
"type": "string",
"title": "国家码"
},
"phone": {
"type": "string",
"title": "手机号"
},
"code": {
"type": "string",
"title": "验证码"
},
"wxMiniCode": {
"type": "string",
"title": "微信小程序登录凭证"
},
"wxAppCode": {
"type": "string",
"title": "微信App登录凭证"
},
"identityToken": {
"type": "string",
"title": "苹果登录凭证"
},
"fullName": {
"type": "string",
"title": "苹果全称"
},
"email": {
"type": "string",
"title": "邮箱"
}
},
"title": "---------- AppLogin ----------"
},
"AppLoginResp": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32",
"title": "状态 0 成功 1 需要绑定手机号"
},
"ticket": {
"type": "string",
"title": "凭证"
},
"usn": {
"type": "string",
"format": "int64",
"title": "用户ID"
},
"accessToken": {
"type": "string"
},
"refreshToken": {
"type": "string"
},
"isMaintain": {
"type": "boolean",
"title": "服务器是否在维护"
}
}
},
"AppLogoutReq": {
"type": "object",
"properties": {
"refreshToken": {
"type": "string"
}
},
"title": "---------- AppLogout ----------"
},
"AppLogoutResp": {
"type": "object"
},
"AppRefreshTokenReq": {
"type": "object",
"properties": {
"refreshToken": {
"type": "string"
}
},
"title": "---------- AppRefreshToken ----------"
},
"AppRefreshTokenResp": {
"type": "object",
"properties": {
"accessToken": {
"type": "string"
},
"refreshToken": {
"type": "string"
},
"isMaintain": {
"type": "boolean"
}
}
},
"AppSendCodeReq": {
"type": "object",
"properties": {
"phone": {
"type": "string"
},
"countryCode": {
"type": "string"
}
},
"title": "---------- AppSendCode ----------"
},
"AppSendCodeResp": {
"type": "object"
},
"AppUpdateUserNickAndAvatarReq": {
"type": "object",
"properties": {
"nickName": {
"type": "string",
"title": "昵称"
},
"isUpdateAvatar": {
"type": "boolean",
"title": "是否更新头像"
}
},
"title": "---------- AppUpdateUserNickAndAvatar ----------"
},
"AppUpdateUserNickAndAvatarResp": {
"type": "object",
"properties": {
"uploadURL": {
"type": "string",
"title": "头像上传URL"
}
}
},
"InnerBroadcastChannelResp": {
"type": "object"
},
"InnerBroadcastClientResp": {
"type": "object"
},
"InnerCheckCodeResp": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
}
}
},
"InnerCheckCodeVoucherResp": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"phone": {
"type": "string"
}
}
},
"InnerKickOfflineResp": {
"type": "object"
},
"InnerKickUserResp": {
"type": "object"
},
"InnerToClientResp": {
"type": "object"
},
"LoginType": {
"type": "string",
"enum": [
"LOGIN_TYPE_UNKNOWN",
"LOGIN_TYPE_PHONE",
"LOGIN_TYPE_WX_MINI",
"LOGIN_TYPE_WX_APP",
"LOGIN_TYPE_APPLE"
],
"default": "LOGIN_TYPE_UNKNOWN",
"title": "- LOGIN_TYPE_PHONE: 手机号\n - LOGIN_TYPE_WX_MINI: 微信小程序\n - LOGIN_TYPE_WX_APP: 微信App\n - LOGIN_TYPE_APPLE: 苹果"
},
"PlatformType": {
"type": "string",
"enum": [
"PLATFORM_TYPE_UNKNOWN",
"PLATFORM_TYPE_GAME",
"PLATFORM_TYPE_WX_MINI",
"PLATFORM_TYPE_ADMIN"
],
"default": "PLATFORM_TYPE_UNKNOWN",
"title": "- PLATFORM_TYPE_GAME: 游戏(APP)\n - PLATFORM_TYPE_WX_MINI: 微信小程序\n - PLATFORM_TYPE_ADMIN: 后台"
},
"UserBaseInfo": {
"type": "object",
"properties": {
"USN": {
"type": "string",
"format": "int64",
"title": "用户ID"
},
"IsBindPhone": {
"type": "boolean",
"title": "是否绑定手机号"
}
},
"title": "用户基础信息"
}
}
}

View File

@@ -0,0 +1,22 @@
$gen = "gen"
if (!(Test-Path $gen))
{
mkdir $gen | Out-Null
}
$files = Get-ChildItem sources/*.proto | ForEach-Object { $_.Name }
protoc `
--proto_path=sources `
--go_out=$gen `
--go-grpc_out=$gen `
--grpc-gateway_out=$gen `
--openapiv2_out=$gen `
--openapiv2_opt=allow_merge=true,merge_file_name=api,disable_default_errors=true `
$files
$sourcePath = "$gen/git.hlsq.asia/alex/proto/proto/rs"
$targetPath = "../../proto"
Copy-Item -Path $sourcePath -Destination $targetPath -Recurse -Force
Remove-Item -Path "$gen/git.hlsq.asia" -Recurse -Force

View File

@@ -0,0 +1,31 @@
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.api;
import "google/api/http.proto";
import "google/protobuf/descriptor.proto";
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
option java_multiple_files = true;
option java_outer_classname = "AnnotationsProto";
option java_package = "com.google.api";
option objc_class_prefix = "GAPI";
extend google.protobuf.MethodOptions {
// See `HttpRule`.
HttpRule http = 72295728;
}

View File

@@ -0,0 +1,370 @@
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.api;
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
option java_multiple_files = true;
option java_outer_classname = "HttpProto";
option java_package = "com.google.api";
option objc_class_prefix = "GAPI";
// Defines the HTTP configuration for an API service. It contains a list of
// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
// to one or more HTTP REST API methods.
message Http {
// A list of HTTP configuration rules that apply to individual API methods.
//
// **NOTE:** All service configuration rules follow "last one wins" order.
repeated HttpRule rules = 1;
// When set to true, URL path parameters will be fully URI-decoded except in
// cases of single segment matches in reserved expansion, where "%2F" will be
// left encoded.
//
// The default behavior is to not decode RFC 6570 reserved characters in multi
// segment matches.
bool fully_decode_reserved_expansion = 2;
}
// gRPC Transcoding
//
// gRPC Transcoding is a feature for mapping between a gRPC method and one or
// more HTTP REST endpoints. It allows developers to build a single API service
// that supports both gRPC APIs and REST APIs. Many systems, including [Google
// APIs](https://github.com/googleapis/googleapis),
// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
// Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
// and use it for large scale production services.
//
// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
// how different portions of the gRPC request message are mapped to the URL
// path, URL query parameters, and HTTP request body. It also controls how the
// gRPC response message is mapped to the HTTP response body. `HttpRule` is
// typically specified as an `google.api.http` annotation on the gRPC method.
//
// Each mapping specifies a URL path template and an HTTP method. The path
// template may refer to one or more fields in the gRPC request message, as long
// as each field is a non-repeated field with a primitive (non-message) type.
// The path template controls how fields of the request message are mapped to
// the URL path.
//
// Example:
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http) = {
// get: "/v1/{name=messages/*}"
// };
// }
// }
// message GetMessageRequest {
// string name = 1; // Mapped to URL path.
// }
// message Message {
// string text = 1; // The resource content.
// }
//
// This enables an HTTP REST to gRPC mapping as below:
//
// - HTTP: `GET /v1/messages/123456`
// - gRPC: `GetMessage(name: "messages/123456")`
//
// Any fields in the request message which are not bound by the path template
// automatically become HTTP query parameters if there is no HTTP request body.
// For example:
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http) = {
// get:"/v1/messages/{message_id}"
// };
// }
// }
// message GetMessageRequest {
// message SubMessage {
// string subfield = 1;
// }
// string message_id = 1; // Mapped to URL path.
// int64 revision = 2; // Mapped to URL query parameter `revision`.
// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
// }
//
// This enables a HTTP JSON to RPC mapping as below:
//
// - HTTP: `GET /v1/messages/123456?revision=2&sub.subfield=foo`
// - gRPC: `GetMessage(message_id: "123456" revision: 2 sub:
// SubMessage(subfield: "foo"))`
//
// Note that fields which are mapped to URL query parameters must have a
// primitive type or a repeated primitive type or a non-repeated message type.
// In the case of a repeated type, the parameter can be repeated in the URL
// as `...?param=A&param=B`. In the case of a message type, each field of the
// message is mapped to a separate parameter, such as
// `...?foo.a=A&foo.b=B&foo.c=C`.
//
// For HTTP methods that allow a request body, the `body` field
// specifies the mapping. Consider a REST update method on the
// message resource collection:
//
// service Messaging {
// rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
// option (google.api.http) = {
// patch: "/v1/messages/{message_id}"
// body: "message"
// };
// }
// }
// message UpdateMessageRequest {
// string message_id = 1; // mapped to the URL
// Message message = 2; // mapped to the body
// }
//
// The following HTTP JSON to RPC mapping is enabled, where the
// representation of the JSON in the request body is determined by
// protos JSON encoding:
//
// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
// - gRPC: `UpdateMessage(message_id: "123456" message { text: "Hi!" })`
//
// The special name `*` can be used in the body mapping to define that
// every field not bound by the path template should be mapped to the
// request body. This enables the following alternative definition of
// the update method:
//
// service Messaging {
// rpc UpdateMessage(Message) returns (Message) {
// option (google.api.http) = {
// patch: "/v1/messages/{message_id}"
// body: "*"
// };
// }
// }
// message Message {
// string message_id = 1;
// string text = 2;
// }
//
//
// The following HTTP JSON to RPC mapping is enabled:
//
// - HTTP: `PATCH /v1/messages/123456 { "text": "Hi!" }`
// - gRPC: `UpdateMessage(message_id: "123456" text: "Hi!")`
//
// Note that when using `*` in the body mapping, it is not possible to
// have HTTP parameters, as all fields not bound by the path end in
// the body. This makes this option more rarely used in practice when
// defining REST APIs. The common usage of `*` is in custom methods
// which don't use the URL at all for transferring data.
//
// It is possible to define multiple HTTP methods for one RPC by using
// the `additional_bindings` option. Example:
//
// service Messaging {
// rpc GetMessage(GetMessageRequest) returns (Message) {
// option (google.api.http) = {
// get: "/v1/messages/{message_id}"
// additional_bindings {
// get: "/v1/users/{user_id}/messages/{message_id}"
// }
// };
// }
// }
// message GetMessageRequest {
// string message_id = 1;
// string user_id = 2;
// }
//
// This enables the following two alternative HTTP JSON to RPC mappings:
//
// - HTTP: `GET /v1/messages/123456`
// - gRPC: `GetMessage(message_id: "123456")`
//
// - HTTP: `GET /v1/users/me/messages/123456`
// - gRPC: `GetMessage(user_id: "me" message_id: "123456")`
//
// Rules for HTTP mapping
//
// 1. Leaf request fields (recursive expansion nested messages in the request
// message) are classified into three categories:
// - Fields referred by the path template. They are passed via the URL path.
// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
// are passed via the HTTP
// request body.
// - All other fields are passed via the URL query parameters, and the
// parameter name is the field path in the request message. A repeated
// field can be represented as multiple query parameters under the same
// name.
// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
// query parameter, all fields
// are passed via URL path and HTTP request body.
// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
// request body, all
// fields are passed via URL path and URL query parameters.
//
// Path template syntax
//
// Template = "/" Segments [ Verb ] ;
// Segments = Segment { "/" Segment } ;
// Segment = "*" | "**" | LITERAL | Variable ;
// Variable = "{" FieldPath [ "=" Segments ] "}" ;
// FieldPath = IDENT { "." IDENT } ;
// Verb = ":" LITERAL ;
//
// The syntax `*` matches a single URL path segment. The syntax `**` matches
// zero or more URL path segments, which must be the last part of the URL path
// except the `Verb`.
//
// The syntax `Variable` matches part of the URL path as specified by its
// template. A variable template must not contain other variables. If a variable
// matches a single path segment, its template may be omitted, e.g. `{var}`
// is equivalent to `{var=*}`.
//
// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
// contains any reserved character, such characters should be percent-encoded
// before the matching.
//
// If a variable contains exactly one path segment, such as `"{var}"` or
// `"{var=*}"`, when such a variable is expanded into a URL path on the client
// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
// server side does the reverse decoding. Such variables show up in the
// [Discovery
// Document](https://developers.google.com/discovery/v1/reference/apis) as
// `{var}`.
//
// If a variable contains multiple path segments, such as `"{var=foo/*}"`
// or `"{var=**}"`, when such a variable is expanded into a URL path on the
// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
// The server side does the reverse decoding, except "%2F" and "%2f" are left
// unchanged. Such variables show up in the
// [Discovery
// Document](https://developers.google.com/discovery/v1/reference/apis) as
// `{+var}`.
//
// Using gRPC API Service Configuration
//
// gRPC API Service Configuration (service config) is a configuration language
// for configuring a gRPC service to become a user-facing product. The
// service config is simply the YAML representation of the `google.api.Service`
// proto message.
//
// As an alternative to annotating your proto file, you can configure gRPC
// transcoding in your service config YAML files. You do this by specifying a
// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
// effect as the proto annotation. This can be particularly useful if you
// have a proto that is reused in multiple services. Note that any transcoding
// specified in the service config will override any matching transcoding
// configuration in the proto.
//
// The following example selects a gRPC method and applies an `HttpRule` to it:
//
// http:
// rules:
// - selector: example.v1.Messaging.GetMessage
// get: /v1/messages/{message_id}/{sub.subfield}
//
// Special notes
//
// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
// proto to JSON conversion must follow the [proto3
// specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
//
// While the single segment variable follows the semantics of
// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
// Expansion, the multi segment variable **does not** follow RFC 6570 Section
// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
// does not expand special characters like `?` and `#`, which would lead
// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
// for multi segment variables.
//
// The path variables **must not** refer to any repeated or mapped field,
// because client libraries are not capable of handling such variable expansion.
//
// The path variables **must not** capture the leading "/" character. The reason
// is that the most common use case "{var}" does not capture the leading "/"
// character. For consistency, all path variables must share the same behavior.
//
// Repeated message fields must not be mapped to URL query parameters, because
// no client library can support such complicated mapping.
//
// If an API needs to use a JSON array for request or response body, it can map
// the request or response body to a repeated field. However, some gRPC
// Transcoding implementations may not support this feature.
message HttpRule {
// Selects a method to which this rule applies.
//
// Refer to [selector][google.api.DocumentationRule.selector] for syntax
// details.
string selector = 1;
// Determines the URL pattern is matched by this rules. This pattern can be
// used with any of the {get|put|post|delete|patch} methods. A custom method
// can be defined using the 'custom' field.
oneof pattern {
// Maps to HTTP GET. Used for listing and getting information about
// resources.
string get = 2;
// Maps to HTTP PUT. Used for replacing a resource.
string put = 3;
// Maps to HTTP POST. Used for creating a resource or performing an action.
string post = 4;
// Maps to HTTP DELETE. Used for deleting a resource.
string delete = 5;
// Maps to HTTP PATCH. Used for updating a resource.
string patch = 6;
// The custom pattern is used for specifying an HTTP method that is not
// included in the `pattern` field, such as HEAD, or "*" to leave the
// HTTP method unspecified for this rule. The wild-card rule is useful
// for services that provide content to Web (HTML) clients.
CustomHttpPattern custom = 8;
}
// The name of the request field whose value is mapped to the HTTP request
// body, or `*` for mapping all request fields not captured by the path
// pattern to the HTTP body, or omitted for not having any HTTP request body.
//
// NOTE: the referred field must be present at the top-level of the request
// message type.
string body = 7;
// Optional. The name of the response field whose value is mapped to the HTTP
// response body. When omitted, the entire response message will be used
// as the HTTP response body.
//
// NOTE: The referred field must be present at the top-level of the response
// message type.
string response_body = 12;
// Additional HTTP bindings for the selector. Nested bindings must
// not contain an `additional_bindings` field themselves (that is,
// the nesting may only be one level deep).
repeated HttpRule additional_bindings = 11;
}
// A custom pattern is used for defining custom HTTP verb.
message CustomHttpPattern {
// The name of this custom HTTP verb.
string kind = 1;
// The path matched by this custom verb.
string path = 2;
}

View File

@@ -0,0 +1,162 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2008 Google Inc. All rights reserved.
// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
package google.protobuf;
option go_package = "google.golang.org/protobuf/types/known/anypb";
option java_package = "com.google.protobuf";
option java_outer_classname = "AnyProto";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
// `Any` contains an arbitrary serialized protocol buffer message along with a
// URL that describes the type of the serialized message.
//
// Protobuf library provides support to pack/unpack Any values in the form
// of utility functions or additional generated methods of the Any type.
//
// Example 1: Pack and unpack a message in C++.
//
// Foo foo = ...;
// Any any;
// any.PackFrom(foo);
// ...
// if (any.UnpackTo(&foo)) {
// ...
// }
//
// Example 2: Pack and unpack a message in Java.
//
// Foo foo = ...;
// Any any = Any.pack(foo);
// ...
// if (any.is(Foo.class)) {
// foo = any.unpack(Foo.class);
// }
// // or ...
// if (any.isSameTypeAs(Foo.getDefaultInstance())) {
// foo = any.unpack(Foo.getDefaultInstance());
// }
//
// Example 3: Pack and unpack a message in Python.
//
// foo = Foo(...)
// any = Any()
// any.Pack(foo)
// ...
// if any.Is(Foo.DESCRIPTOR):
// any.Unpack(foo)
// ...
//
// Example 4: Pack and unpack a message in Go
//
// foo := &pb.Foo{...}
// any, err := anypb.New(foo)
// if err != nil {
// ...
// }
// ...
// foo := &pb.Foo{}
// if err := any.UnmarshalTo(foo); err != nil {
// ...
// }
//
// The pack methods provided by protobuf library will by default use
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
// methods only use the fully qualified type name after the last '/'
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
// name "y.z".
//
// JSON
// ====
// The JSON representation of an `Any` value uses the regular
// representation of the deserialized, embedded message, with an
// additional field `@type` which contains the type URL. Example:
//
// package google.profile;
// message Person {
// string first_name = 1;
// string last_name = 2;
// }
//
// {
// "@type": "type.googleapis.com/google.profile.Person",
// "firstName": <string>,
// "lastName": <string>
// }
//
// If the embedded message type is well-known and has a custom JSON
// representation, that representation will be embedded adding a field
// `value` which holds the custom JSON in addition to the `@type`
// field. Example (for message [google.protobuf.Duration][]):
//
// {
// "@type": "type.googleapis.com/google.protobuf.Duration",
// "value": "1.212s"
// }
//
message Any {
// A URL/resource name that uniquely identifies the type of the serialized
// protocol buffer message. This string must contain at least
// one "/" character. The last segment of the URL's path must represent
// the fully qualified name of the type (as in
// `path/google.protobuf.Duration`). The name should be in a canonical form
// (e.g., leading "." is not accepted).
//
// In practice, teams usually precompile into the binary all types that they
// expect it to use in the context of Any. However, for URLs which use the
// scheme `http`, `https`, or no scheme, one can optionally set up a type
// server that maps type URLs to message definitions as follows:
//
// * If no scheme is provided, `https` is assumed.
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
// value in binary format, or produce an error.
// * Applications are allowed to cache lookup results based on the
// URL, or have them precompiled into a binary to avoid any
// lookup. Therefore, binary compatibility needs to be preserved
// on changes to types. (Use versioned type names to manage
// breaking changes.)
//
// Note: this functionality is not currently available in the official
// protobuf release, and it is not used for type URLs beginning with
// type.googleapis.com. As of May 2023, there are no widely used type server
// implementations and no plans to implement one.
//
// Schemes other than `http`, `https` (or the empty scheme) might be
// used with implementation specific semantics.
//
string type_url = 1;
// Must be a valid serialized protocol buffer of the above specified type.
bytes value = 2;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,122 @@
syntax = "proto3";
option go_package = "git.hlsq.asia/alex/proto/proto/rs/rscommon";
message ErrorInfo {
int32 Code = 1;
string Msg = 2;
}
message PageArgs {
int32 PageIndex = 1 [json_name = "pageIndex"];
int32 PageSize = 2 [json_name = "pageSize"];
repeated OrderInfo OrderList = 3 [json_name = "orderList"];
}
message PageInfoReply {
int32 PageIndex = 1 [json_name = "pageIndex"];
int32 PageSize = 2 [json_name = "pageSize"];
int32 TotalCount = 3 [json_name = "totalCount"];
}
message OrderInfo {
string field = 1;
bool asc = 2;
}
// 挥杆表数据(展示每个洞的详细杆数)
message AppStroke {
repeated AppHoleConfig HoleConfig = 1 [json_name = "holeConfig"]; // 球洞的配置
repeated AppHoleItem HoleList = 2 [json_name = "holeList"];
}
message AppHoleItem {
int64 RoundSn = 1 [json_name = "roundSn"]; // 轮次编号
string NickName = 2 [json_name = "nickName"]; // 昵称
string Avatar = 3 [json_name = "avatar"]; // 头像
int32 HCP = 4 [json_name = "hcp"]; // 差点让杆
int32 Tee = 5 [json_name = "tee"]; // 选的Tee台颜色 0 黑 1 金 2 蓝 3 白 4 红
repeated AppHoleConfig HoleInfo = 6 [json_name = "holeInfo"]; // 球洞信息
}
message AppHoleConfig {
int32 HoleNumber = 1 [json_name = "holeNumber"]; // 球洞编号
int32 StrokeIndex = 2 [json_name = "strokeIndex"]; // 挥杆指数
int32 Par = 3 [json_name = "par"]; // 球洞par
int32 Gross = 4 [json_name = "gross"]; // 球洞总杆
int32 Net = 5 [json_name = "net"]; // 球洞净杆
}
// 得分分布
message AppCourtGameResultScoreType {
ScoreType Type = 1 [json_name = "type"]; // 类型
int32 Count = 2 [json_name = "count"]; // 数量
}
enum ScoreType {
SCORE_TYPE_UNKNOWN = 0;
SCORE_TYPE_HOLE_IN_ONE = 1; // 一杆进洞
SCORE_TYPE_ALBATROSS = 2; // 信天翁
SCORE_TYPE_EAGLE = 3; // 老鹰
SCORE_TYPE_BIRDIE = 4; // 小鸟
SCORE_TYPE_PAR = 5; // 标准杆
SCORE_TYPE_BOGEY = 6; // 柏忌
SCORE_TYPE_BOGEY_PLUS = 7; // 柏忌+
}
// 生涯中的平均成绩
message AppCareerAveScoring {
double Par3 = 1 [json_name = "par3"];
double Par4 = 2 [json_name = "par4"];
double Par5 = 3 [json_name = "par5"];
}
// 生涯中的场均成绩
message AppCareerAvePerRound {
double Bogey = 1 [json_name = "bogey"]; // 柏忌
double Par = 2 [json_name = "par"]; // 保帕
double Birdie = 3 [json_name = "birdie"]; // 小鸟球
double Eagle = 4 [json_name = "eagle"]; // 老鹰球
}
// 生涯中的累计数据
message AppCareerHandicapTrend {
int32 Swings = 1 [json_name = "swings"]; // 生涯总挥杆次数
int32 Holes = 2 [json_name = "holes"]; // 完成洞数
double Calorie = 3 [json_name = "calorie"]; // 卡路里
double Yards = 4 [json_name = "yards"]; // 总击球距离
}
// 小程序首页广场的卡片结构
message AppGetMatchData {
int64 CourtSn = 1 [json_name = "courtSn"]; // 比赛球场ID
string Avatar = 2 [json_name = "avatar"]; // 头像
string CompetitionName = 3 [json_name = "competitionName"]; // 比赛名称
string CompetitionLocation = 4 [json_name = "competitionLocation"]; // 比赛地点
int32 PlayersNum = 5 [json_name = "playersNum"]; // 玩家数量
int64 CreateAt = 6 [json_name = "createAt"]; // 创建时间
int32 CompetitionState = 7 [json_name = "competitionState"]; // 比赛状态 (1:进行中 2:已结束 0:未开始-创建初始值)
int32 GrossScore = 8 [json_name = "grossScore"]; // 总杆
int32 Par = 9 [json_name = "par"]; // 球场标准杆
int32 Type = 10 [json_name = "type"]; // 类型 1线上 2线下
bool IsParticipate = 11 [json_name = "isParticipate"]; // 当前用户是否参与此比赛
int32 Mode = 12 [json_name = "mode"]; // 比赛模式 1 经典 2 赛事
int32 SubMode = 13 [json_name = "subMode"]; // 子模式 1 本地比赛 2 在线比赛 3 锦标赛
string CourtName = 14 [json_name = "courtName"]; // 球场名称
bool IsCaddy = 15 [json_name = "isCaddy"]; // 是否是球童
repeated SideType OpenSide = 16 [json_name = "openSide"]; // 开启了哪些玩法
HandicapLimitMode Hcp = 17 [json_name = "hcp"]; // HCP
string Background = 18 [json_name = "background"]; // 卡片的背景图
}
// 玩法的枚举
enum SideType {
SIDE_TYPE_UNKNOWN = 0;
SIDE_TYPE_TIGER = 1; // 打老虎
SIDE_TYPE_RYDER_CUP = 2; // 莱德杯
}
// HandicapLimitMode 差点限制模式
enum HandicapLimitMode {
HANDICAP_LIMIT_NONE = 0; // 无
HANDICAP_LIMIT_36 = 1; // ≥36
HANDICAP_LIMIT_28_TO_36 = 2; // 28-36
HANDICAP_LIMIT_18_TO_28 = 3; // 18-28
HANDICAP_LIMIT_8_TO_18 = 4; // 8-18
HANDICAP_LIMIT_0_TO_8 = 5; // 0-8
HANDICAP_LIMIT_LESS_THAN_0 = 6; // ≤8
}

View File

@@ -0,0 +1,59 @@
syntax = "proto3";
option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb";
import "rs_common.proto";
import "google/api/annotations.proto";
service Gateway {
// ---------- 内部接口 ----------
// 发送消息到客户端
rpc InnerToClient(stream InnerToClientReq) returns (InnerToClientResp) {}
// 广播消息到客户端
rpc InnerBroadcastClient(stream InnerBroadcastClientReq) returns (InnerBroadcastClientResp) {}
// 广播消息到频道
rpc InnerBroadcastChannel(stream InnerBroadcastChannelReq) returns (InnerBroadcastChannelResp) {}
// 踢用户下线
rpc InnerKickUser(InnerKickUserReq) returns (InnerKickUserResp) {}
// ---------- 后台接口 ----------
// ---------- 外部接口 ----------
}
// ---------- InnerToClient ----------
message InnerToClientReq {
int64 USN = 1;
int32 Platform = 2; // 平台(这里的类型是rspb.PlatformType)
int32 MessageID = 3; // 消息ID
bytes Payload = 4; // 消息内容
}
message InnerToClientResp {
}
// ---------- InnerBroadcastClient ----------
message InnerBroadcastClientReq {
repeated int64 USN = 1;
repeated int32 Platform = 2; // 平台(这里的类型是rspb.PlatformType)
int32 MessageID = 3; // 消息ID
bytes Payload = 4; // 消息内容
}
message InnerBroadcastClientResp {
}
// ---------- InnerBroadcastChannel ----------
message InnerBroadcastChannelReq {
string ChannelName = 1; // 频道名称
int32 MessageID = 2; // 消息ID
bytes Payload = 3; // 消息内容
}
message InnerBroadcastChannelResp {
}
// ---------- InnerKickUser ----------
message InnerKickUserReq {
int64 USN = 1;
int32 Platform = 2; // 平台(这里的类型是rspb.PlatformType)
int32 ID = 3; // 踢出原因(这里的类型是rspb.KickOutID)
}
message InnerKickUserResp {
}

View File

@@ -0,0 +1,11 @@
syntax = "proto3";
option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb";
import "rs_common.proto";
import "google/api/annotations.proto";
service Notice {
// ---------- 内部接口 ----------
// ---------- 后台接口 ----------
// ---------- 外部接口 ----------
}

View File

@@ -0,0 +1,11 @@
syntax = "proto3";
option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb";
import "rs_common.proto";
import "google/api/annotations.proto";
service Scene {
// ---------- 内部接口 ----------
// ---------- 后台接口 ----------
// ---------- 外部接口 ----------
}

View File

@@ -0,0 +1,134 @@
syntax = "proto3";
option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb";
import "rs_common.proto";
import "google/api/annotations.proto";
service ThirdParty {
// ---------- 内部接口 ----------
// 校验验证码
rpc InnerCheckCode(InnerCheckCodeReq) returns (InnerCheckCodeResp) {}
// 校验验证码凭证
rpc InnerCheckCodeVoucher(InnerCheckCodeVoucherReq) returns (InnerCheckCodeVoucherResp) {}
// 踢所有端下线
rpc InnerKickOffline(InnerKickOfflineReq) returns (InnerKickOfflineResp) {}
// ---------- 后台接口 ----------
// ---------- 外部接口 ----------
// 登录
rpc AppLogin(AppLoginReq) returns (AppLoginResp) {option (google.api.http) = {post: "/third-party/open/login" body: "*"};}
// 绑定手机号
rpc AppBindPhone(AppBindPhoneReq) returns (AppLoginResp) {option (google.api.http) = {post: "/third-party/open/login_bind" body: "*"};}
// 刷新令牌
rpc AppRefreshToken(AppRefreshTokenReq) returns (AppRefreshTokenResp) {option (google.api.http) = {post: "/third-party/open/refresh_token" body: "*"};}
// 登出
rpc AppLogout(AppLogoutReq) returns (AppLogoutResp) {option (google.api.http) = {post: "/third-party/open/logout" body: "*"};}
// 发送验证码
rpc AppSendCode(AppSendCodeReq) returns (AppSendCodeResp) {option (google.api.http) = {post: "/third-party/open/send_code" body: "*"};}
// 获取验证码凭证
rpc AppGetCodeVoucher(AppGetCodeVoucherReq) returns (AppGetCodeVoucherResp) {option (google.api.http) = {post: "/third-party/open/code_voucher" body: "*"};}
}
// ---------- InnerCheckCode ----------
message InnerCheckCodeReq {
string CountryCode = 1 [json_name = "countryCode"]; // 国家码
string Phone = 2 [json_name = "phone"]; // 手机号
string Code = 3 [json_name = "code"]; // 验证码
}
message InnerCheckCodeResp {
bool Success = 1 [json_name = "success"];
}
// ---------- InnerCheckCodeVoucher ----------
message InnerCheckCodeVoucherReq {
string Voucher = 1 [json_name = "voucher"]; // 凭证
}
message InnerCheckCodeVoucherResp {
bool Success = 1 [json_name = "success"];
string Phone = 2 [json_name = "phone"];
}
// ---------- InnerKickOffline ----------
message InnerKickOfflineReq {
int64 USN = 1 [json_name = "usn"]; // 用户ID
}
message InnerKickOfflineResp {}
// ---------- AppLogin ----------
message AppLoginReq {
LoginType Type = 1 [json_name = "type"]; // 登录方式
PlatformType PlatformType = 2 [json_name = "platformType"]; // 平台类型
string CountryCode = 3 [json_name = "countryCode"]; // 国家码
string Phone = 4 [json_name = "phone"]; // 手机号
string Code = 5 [json_name = "code"]; // 验证码
string WxMiniCode = 6 [json_name = "wxMiniCode"]; // 微信小程序登录凭证
string WxAppCode = 7 [json_name = "wxAppCode"]; // 微信App登录凭证
string IdentityToken = 8 [json_name = "identityToken"]; // 苹果登录凭证
string FullName = 9 [json_name = "fullName"]; // 苹果全称
string Email = 10 [json_name = "email"]; // 邮箱
}
enum LoginType {
LOGIN_TYPE_UNKNOWN = 0;
LOGIN_TYPE_PHONE = 1; // 手机号
LOGIN_TYPE_WX_MINI = 2; // 微信小程序
LOGIN_TYPE_WX_APP = 3; // 微信App
LOGIN_TYPE_APPLE = 4; // 苹果
}
enum PlatformType {
PLATFORM_TYPE_UNKNOWN = 0;
PLATFORM_TYPE_GAME = 1; // 游戏(APP)
PLATFORM_TYPE_WX_MINI = 2; // 微信小程序
PLATFORM_TYPE_ADMIN = 3; // 后台
}
message AppLoginResp {
int32 Status = 1 [json_name = "status"]; // 状态 0 成功 1 需要绑定手机号
string Ticket = 2 [json_name = "ticket"]; // 凭证
int64 USN = 3 [json_name = "usn"]; // 用户ID
string AccessToken = 4 [json_name = "accessToken"];
string RefreshToken = 5 [json_name = "refreshToken"];
bool IsMaintain = 6 [json_name = "isMaintain"]; // 服务器是否在维护
}
// ---------- AppBindPhone ----------
message AppBindPhoneReq {
string Ticket = 1 [json_name = "ticket"]; // 凭证
string CountryCode = 2 [json_name = "countryCode"]; // 国家码
string Phone = 3 [json_name = "phone"]; // 手机号
string Code = 4 [json_name = "code"]; // 验证码
string MiniPhoneCode = 5 [json_name = "miniPhoneCode"]; // 微信小程序手机凭证
}
// ---------- AppRefreshToken ----------
message AppRefreshTokenReq {
string RefreshToken = 1 [json_name = "refreshToken"];
}
message AppRefreshTokenResp {
string AccessToken = 1 [json_name = "accessToken"];
string RefreshToken = 2 [json_name = "refreshToken"];
bool IsMaintain = 3 [json_name = "isMaintain"];
}
// ---------- AppLogout ----------
message AppLogoutReq {
string RefreshToken = 1 [json_name = "refreshToken"];
}
message AppLogoutResp {}
// ---------- AppSendCode ----------
message AppSendCodeReq {
string Phone = 1 [json_name = "phone"];
string CountryCode = 2 [json_name = "countryCode"];
}
message AppSendCodeResp {}
// ---------- AppGetCodeVoucher ----------
message AppGetCodeVoucherReq {
string CountryCode = 1 [json_name = "countryCode"]; // 国家码
string Phone = 2 [json_name = "phone"]; // 手机号
string Code = 3 [json_name = "code"]; // 验证码
}
message AppGetCodeVoucherResp {
string CodeVoucher = 1 [json_name = "codeVoucher"]; // 凭证
}

View File

@@ -0,0 +1,108 @@
syntax = "proto3";
option go_package = "git.hlsq.asia/alex/proto/proto/rs/rspb";
import "rs_common.proto";
import "google/api/annotations.proto";
service User {
// ---------- 内部接口 ----------
// 根据手机号查找或创建用户
rpc InnerFindOrCreateUserByPhone(InnerFindOrCreateUserByPhoneReq) returns (UserBaseInfo) {}
// 根据微信小程序号查找用户
rpc InnerFindUserByWxMini(InnerFindUserByWxMiniReq) returns (UserBaseInfo) {}
// 根据微信小程序号创建用户
rpc InnerCreateUserByWxMini(InnerCreateUserByWxMiniReq) returns (UserBaseInfo) {}
// 根据微信App号查找用户
rpc InnerFindUserByWxApp(InnerFindUserByWxAppReq) returns (UserBaseInfo) {}
// 根据微信App号创建用户
rpc InnerCreateUserByWxApp(InnerCreateUserByWxAppReq) returns (UserBaseInfo) {}
// 根据苹果ID查找用户
rpc InnerFindUserByAppleID(InnerFindUserByAppleIDReq) returns (UserBaseInfo) {}
// 根据苹果ID创建用户
rpc InnerCreateUserByAppleID(InnerCreateUserByAppleIDReq) returns (UserBaseInfo) {}
// ---------- 后台接口 ----------
// ---------- 外部接口 ----------
// 查询用户信息
rpc AppFindUser(AppFindUserReq) returns (AppFindUserResp) {option (google.api.http) = {post: "/user/auth/info" body: "*"};}
// 更新用户昵称和头像
rpc AppUpdateUserNickAndAvatar(AppUpdateUserNickAndAvatarReq) returns (AppUpdateUserNickAndAvatarResp) {option (google.api.http) = {post: "/user/auth/modify/nick_and_avatar" body: "*"};}
}
// 用户基础信息
message UserBaseInfo {
int64 USN = 1; // 用户ID
bool IsBindPhone = 2; // 是否绑定手机号
}
// ---------- InnerFindOrCreateUserByPhone ----------
message InnerFindOrCreateUserByPhoneReq {
string Phone = 1; // 手机号
string CountryCode = 2; // 国家码
}
// ---------- InnerFindUserByWxMini ----------
message InnerFindUserByWxMiniReq {
string UnionID = 1; // 微信小程序的UnionID
string OpenID = 2; // 微信小程序的OpenID
}
// ---------- InnerCreateUserByWxMini ----------
message InnerCreateUserByWxMiniReq {
string Phone = 1; // 手机号
string CountryCode = 2; // 国家码
string UnionID = 3; // 微信小程序的UnionID
string OpenID = 4; // 微信小程序的OpenID
}
// ---------- InnerFindUserByWxApp ----------
message InnerFindUserByWxAppReq {
string UnionID = 1;
string OpenID = 2;
}
// ---------- InnerCreateUserByWxApp ----------
message InnerCreateUserByWxAppReq {
string Phone = 1; // 手机号
string CountryCode = 2; // 国家码
string UnionID = 3;
string OpenID = 4;
string NickName = 5;
string HeadImgURL = 6;
}
// ---------- InnerFindUserByAppleID ----------
message InnerFindUserByAppleIDReq {
string AppleID = 1; // 苹果ID
}
// ---------- InnerCreateUserByAppleID ----------
message InnerCreateUserByAppleIDReq {
string Phone = 1; // 手机号
string CountryCode = 2; // 国家码
string AppleID = 3; // 苹果ID
string FullName = 4; // 全称
string Email = 5; // 邮箱
}
// ---------- AppFindUser ----------
message AppFindUserReq {
}
message AppFindUserResp {
int64 USN = 1 [json_name = "usn"];
string UID = 2 [json_name = "uid"]; // 用户唯一编号,仅用于展示
string Name = 3 [json_name = "name"]; // 用户名
string HeadURL = 4 [json_name = "headURL"]; // 头像
bool IsDefaultName = 5 [json_name = "isDefaultName"]; // 是否是默认头像
}
// ---------- AppUpdateUserNickAndAvatar ----------
message AppUpdateUserNickAndAvatarReq{
string NickName = 1 [json_name = "nickName"]; // 昵称
bool IsUpdateAvatar = 2 [json_name = "isUpdateAvatar"]; // 是否更新头像
}
message AppUpdateUserNickAndAvatarResp {
string UploadURL = 1 [json_name = "uploadURL"]; // 头像上传URL
}