Files
action
example
clients
go
api
docs
.gitignore
.swagger-codegen-ignore
.travis.yml
README.md
api_greet.go
api_user_api.go
client.go
configuration.go
git_push.sh
model_login_req.go
model_register_req.go
model_user_info_reply.go
model_user_info_req.go
model_user_search_reply.go
model_user_search_req.go
response.go
javascript
php
gozero
sys
generate-client.sh
generate.go
rest.swagger.json
swagger.json
test.api
user.api
user.json
generate
.gitignore
README.md
go.mod
go.sum
main.go
swagtest
goctl-swagger/example/clients/go
2021-01-08 23:35:08 +08:00
..
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00
2021-01-08 23:35:08 +08:00

Go API client for swagger

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version:
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "./swagger"

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
GreetApi Ping Get /user/ping
UserApiApi GetUserInfo Get /api/user/{id} 获取用户信息
UserApiApi Login Post /api/user/login 登录
UserApiApi Register Post /api/user/register 注册
UserApiApi SearchUser Get /api/user/search 用户搜索

Documentation For Models

Documentation For Authorization

apiKey

  • Type: API key

Example

auth := context.WithValue(context.Background(), sw.ContextAPIKey, sw.APIKey{
	Key: "APIKEY",
	Prefix: "Bearer", // Omit if not necessary.
})
r, err := client.Service.Operation(auth, args)

Author