-
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.
Merge pull request #2 from AAStarCommunity/chao/account-to-node
Chao/account to node
- Loading branch information
Showing
18 changed files
with
486 additions
and
43 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
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
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,131 @@ | ||
// Package docs Code generated by swaggo/swag. DO NOT EDIT | ||
package docs | ||
|
||
import "github.com/swaggo/swag" | ||
|
||
const docTemplate = `{ | ||
"schemes": {{ marshal .Schemes }}, | ||
"swagger": "2.0", | ||
"info": { | ||
"description": "{{escape .Description}}", | ||
"title": "{{.Title}}", | ||
"contact": { | ||
"name": "AAStar Support", | ||
"url": "https://aastar.xyz" | ||
}, | ||
"version": "{{.Version}}" | ||
}, | ||
"host": "{{.Host}}", | ||
"basePath": "{{.BasePath}}", | ||
"paths": { | ||
"/api/account/v1/bind": { | ||
"post": { | ||
"security": [ | ||
{ | ||
"JWT": [] | ||
} | ||
], | ||
"description": "bind a account to community node", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Account" | ||
], | ||
"parameters": [ | ||
{ | ||
"description": "Account Binding", | ||
"name": "bind", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/request.Bind" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Created" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/auth/v1/login": { | ||
"post": { | ||
"description": "Get AccessToken By ApiKey", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Auth" | ||
], | ||
"parameters": [ | ||
{ | ||
"description": "AccessToken Model", | ||
"name": "credential", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/request.ClientCredential" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Created" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"request.Bind": { | ||
"type": "object", | ||
"properties": { | ||
"account": { | ||
"type": "string" | ||
}, | ||
"publicKey": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"request.ClientCredential": { | ||
"type": "object", | ||
"properties": { | ||
"apiKey": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"JWT": { | ||
"description": "Type 'Bearer \\\u003cTOKEN\\\u003e' to correctly set the AccessToken", | ||
"type": "apiKey", | ||
"name": "Authorization", | ||
"in": "header" | ||
} | ||
} | ||
}` | ||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it | ||
var SwaggerInfo = &swag.Spec{ | ||
Version: "", | ||
Host: "", | ||
BasePath: "", | ||
Schemes: []string{}, | ||
Title: "", | ||
Description: "", | ||
InfoInstanceName: "swagger", | ||
SwaggerTemplate: docTemplate, | ||
LeftDelim: "{{", | ||
RightDelim: "}}", | ||
} | ||
|
||
func init() { | ||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) | ||
} |
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,102 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"contact": { | ||
"name": "AAStar Support", | ||
"url": "https://aastar.xyz" | ||
} | ||
}, | ||
"paths": { | ||
"/api/account/v1/bind": { | ||
"post": { | ||
"security": [ | ||
{ | ||
"JWT": [] | ||
} | ||
], | ||
"description": "bind a account to community node", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Account" | ||
], | ||
"parameters": [ | ||
{ | ||
"description": "Account Binding", | ||
"name": "bind", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/request.Bind" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Created" | ||
} | ||
} | ||
} | ||
}, | ||
"/api/auth/v1/login": { | ||
"post": { | ||
"description": "Get AccessToken By ApiKey", | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"tags": [ | ||
"Auth" | ||
], | ||
"parameters": [ | ||
{ | ||
"description": "AccessToken Model", | ||
"name": "credential", | ||
"in": "body", | ||
"required": true, | ||
"schema": { | ||
"$ref": "#/definitions/request.ClientCredential" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Created" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"request.Bind": { | ||
"type": "object", | ||
"properties": { | ||
"account": { | ||
"type": "string" | ||
}, | ||
"publicKey": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"request.ClientCredential": { | ||
"type": "object", | ||
"properties": { | ||
"apiKey": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"JWT": { | ||
"description": "Type 'Bearer \\\u003cTOKEN\\\u003e' to correctly set the AccessToken", | ||
"type": "apiKey", | ||
"name": "Authorization", | ||
"in": "header" | ||
} | ||
} | ||
} |
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,63 @@ | ||
definitions: | ||
request.Bind: | ||
properties: | ||
account: | ||
type: string | ||
publicKey: | ||
type: string | ||
type: object | ||
request.ClientCredential: | ||
properties: | ||
apiKey: | ||
type: string | ||
type: object | ||
info: | ||
contact: | ||
name: AAStar Support | ||
url: https://aastar.xyz | ||
paths: | ||
/api/account/v1/bind: | ||
post: | ||
consumes: | ||
- application/json | ||
description: bind a account to community node | ||
parameters: | ||
- description: Account Binding | ||
in: body | ||
name: bind | ||
required: true | ||
schema: | ||
$ref: '#/definitions/request.Bind' | ||
produces: | ||
- application/json | ||
responses: | ||
"201": | ||
description: Created | ||
security: | ||
- JWT: [] | ||
tags: | ||
- Account | ||
/api/auth/v1/login: | ||
post: | ||
consumes: | ||
- application/json | ||
description: Get AccessToken By ApiKey | ||
parameters: | ||
- description: AccessToken Model | ||
in: body | ||
name: credential | ||
required: true | ||
schema: | ||
$ref: '#/definitions/request.ClientCredential' | ||
responses: | ||
"201": | ||
description: Created | ||
tags: | ||
- Auth | ||
securityDefinitions: | ||
JWT: | ||
description: Type 'Bearer \<TOKEN\>' to correctly set the AccessToken | ||
in: header | ||
name: Authorization | ||
type: apiKey | ||
swagger: "2.0" |
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
Oops, something went wrong.