-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
3,251 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
github_token: ${{ github.token }} | ||
- uses: bufbuild/[email protected] | ||
with: | ||
against: buf.build/bufbuild/buf | ||
against: 'https://github.com/juanjiTech/jTerm-proto.git#branch=main' | ||
buf_token: ${{ secrets.BUF_TOKEN }} | ||
generate: | ||
runs-on: ubuntu-latest | ||
|
@@ -35,10 +35,12 @@ jobs: | |
- breaking | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 'stable' | ||
- run: go install github.com/grpc-ecosystem/protoc-gen-grpc-gateway-ts | ||
- uses: bufbuild/[email protected] | ||
with: | ||
github_token: ${{ github.token }} | ||
- run: rm -rf ./gen && buf generate | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "update: generate new sdk" | ||
- run: rm -rf ./gen && buf generate && go mod tidy | ||
- uses: stefanzweifel/git-auto-commit-action@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "auth/v1/auth_service.proto", | ||
"version": "version not set" | ||
}, | ||
"tags": [ | ||
{ | ||
"name": "AuthService" | ||
} | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/gapi/auth/v1/login": { | ||
"post": { | ||
"summary": "用户登录", | ||
"operationId": "AuthService_Login", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/v1LoginResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/v1LoginRequest" | ||
} | ||
} | ||
], | ||
"tags": [ | ||
"AuthService" | ||
] | ||
} | ||
}, | ||
"/gapi/auth/v1/refreshToken": { | ||
"post": { | ||
"summary": "Token刷新", | ||
"operationId": "AuthService_RefreshToken", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/v1RefreshTokenResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/v1RefreshTokenRequest" | ||
} | ||
} | ||
], | ||
"tags": [ | ||
"AuthService" | ||
] | ||
} | ||
}, | ||
"/gapi/auth/v1/register": { | ||
"post": { | ||
"summary": "用户注册", | ||
"operationId": "AuthService_Register", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/v1RegisterResponse" | ||
} | ||
}, | ||
"default": { | ||
"description": "An unexpected error response.", | ||
"schema": { | ||
"$ref": "#/definitions/rpcStatus" | ||
} | ||
} | ||
}, | ||
"parameters": [ | ||
{ | ||
"name": "body", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/v1RegisterRequest" | ||
} | ||
} | ||
], | ||
"tags": [ | ||
"AuthService" | ||
] | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"protobufAny": { | ||
"type": "object", | ||
"properties": { | ||
"@type": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": {} | ||
}, | ||
"rpcStatus": { | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"details": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"$ref": "#/definitions/protobufAny" | ||
} | ||
} | ||
} | ||
}, | ||
"v1LoginRequest": { | ||
"type": "object", | ||
"properties": { | ||
"username": { | ||
"type": "string", | ||
"title": "账户 可为手机号或邮箱" | ||
}, | ||
"password": { | ||
"type": "string" | ||
}, | ||
"twoFactorAuth": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"v1LoginResponse": { | ||
"type": "object", | ||
"properties": { | ||
"accessToken": { | ||
"type": "string" | ||
}, | ||
"refreshToken": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"v1RefreshTokenRequest": { | ||
"type": "object", | ||
"properties": { | ||
"refreshToken": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"v1RefreshTokenResponse": { | ||
"type": "object", | ||
"properties": { | ||
"accessToken": { | ||
"type": "string" | ||
}, | ||
"refreshToken": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"v1RegisterRequest": { | ||
"type": "object", | ||
"properties": { | ||
"email": { | ||
"type": "string" | ||
}, | ||
"verifyCode": { | ||
"type": "string" | ||
}, | ||
"password": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"v1RegisterResponse": { | ||
"type": "object", | ||
"properties": { | ||
"accessToken": { | ||
"type": "string" | ||
}, | ||
"refreshToken": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "user/v1/user.proto", | ||
"version": "version not set" | ||
}, | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": {}, | ||
"definitions": { | ||
"protobufAny": { | ||
"type": "object", | ||
"properties": { | ||
"@type": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": {} | ||
}, | ||
"rpcStatus": { | ||
"type": "object", | ||
"properties": { | ||
"code": { | ||
"type": "integer", | ||
"format": "int32" | ||
}, | ||
"message": { | ||
"type": "string" | ||
}, | ||
"details": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"$ref": "#/definitions/protobufAny" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.