package
0.0.0-20240805074159-16cbf5412f8d
Repository: https://github.com/hasanbal/goctl-swagger.git
Documentation: pkg.go.dev
# README
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
# Functions
CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKey takes an APIKey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
# Structs
APIClient manages communication with the API v In most cases there should be only one, shared, APIClient.
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
No description provided by the author
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
No description provided by the author
GenericSwaggerError Provides access to the body, error and model on returned errors.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author