update swagger.yaml

This commit is contained in:
ginuerzh 2022-09-03 20:28:35 +08:00
parent ba4b0b8e0f
commit 05bfeb8a0f
2 changed files with 1235 additions and 1163 deletions

View File

@ -37,8 +37,12 @@ definitions:
reload: reload:
$ref: '#/definitions/Duration' $ref: '#/definitions/Duration'
reverse: reverse:
description: DEPRECATED by whitelist since beta.4
type: boolean type: boolean
x-go-name: Reverse x-go-name: Reverse
whitelist:
type: boolean
x-go-name: Whitelist
type: object type: object
x-go-package: github.com/go-gost/x/config x-go-package: github.com/go-gost/x/config
AuthConfig: AuthConfig:
@ -86,8 +90,12 @@ definitions:
reload: reload:
$ref: '#/definitions/Duration' $ref: '#/definitions/Duration'
reverse: reverse:
description: DEPRECATED by whitelist since beta.4
type: boolean type: boolean
x-go-name: Reverse x-go-name: Reverse
whitelist:
type: boolean
x-go-name: Whitelist
type: object type: object
x-go-package: github.com/go-gost/x/config x-go-package: github.com/go-gost/x/config
ChainConfig: ChainConfig:
@ -97,6 +105,10 @@ definitions:
$ref: '#/definitions/HopConfig' $ref: '#/definitions/HopConfig'
type: array type: array
x-go-name: Hops x-go-name: Hops
metadata:
additionalProperties: {}
type: object
x-go-name: Metadata
name: name:
type: string type: string
x-go-name: Name x-go-name: Name
@ -104,6 +116,17 @@ definitions:
$ref: '#/definitions/SelectorConfig' $ref: '#/definitions/SelectorConfig'
type: object type: object
x-go-package: github.com/go-gost/x/config x-go-package: github.com/go-gost/x/config
ChainGroupConfig:
properties:
chains:
items:
type: string
type: array
x-go-name: Chains
selector:
$ref: '#/definitions/SelectorConfig'
type: object
x-go-package: github.com/go-gost/x/config
Config: Config:
properties: properties:
admissions: admissions:
@ -163,8 +186,7 @@ definitions:
auth: auth:
$ref: '#/definitions/AuthConfig' $ref: '#/definitions/AuthConfig'
metadata: metadata:
additionalProperties: additionalProperties: {}
type: object
type: object type: object
x-go-name: Metadata x-go-name: Metadata
tls: tls:
@ -179,8 +201,7 @@ definitions:
auth: auth:
$ref: '#/definitions/AuthConfig' $ref: '#/definitions/AuthConfig'
metadata: metadata:
additionalProperties: additionalProperties: {}
type: object
type: object type: object
x-go-name: Metadata x-go-name: Metadata
tls: tls:
@ -217,9 +238,15 @@ definitions:
x-go-package: github.com/go-gost/x/config x-go-package: github.com/go-gost/x/config
ForwarderConfig: ForwarderConfig:
properties: properties:
nodes:
items:
$ref: '#/definitions/NodeConfig'
type: array
x-go-name: Nodes
selector: selector:
$ref: '#/definitions/SelectorConfig' $ref: '#/definitions/SelectorConfig'
targets: targets:
description: DEPRECATED by nodes since beta.4
items: items:
type: string type: string
type: array type: array
@ -233,12 +260,18 @@ definitions:
auther: auther:
type: string type: string
x-go-name: Auther x-go-name: Auther
authers:
items:
type: string
type: array
x-go-name: Authers
chain: chain:
type: string type: string
x-go-name: Chain x-go-name: Chain
chainGroup:
$ref: '#/definitions/ChainGroupConfig'
metadata: metadata:
additionalProperties: additionalProperties: {}
type: object
type: object type: object
x-go-name: Metadata x-go-name: Metadata
retries: retries:
@ -257,6 +290,11 @@ definitions:
bypass: bypass:
type: string type: string
x-go-name: Bypass x-go-name: Bypass
bypasses:
items:
type: string
type: array
x-go-name: Bypasses
hosts: hosts:
type: string type: string
x-go-name: Hosts x-go-name: Hosts
@ -320,12 +358,18 @@ definitions:
auther: auther:
type: string type: string
x-go-name: Auther x-go-name: Auther
authers:
items:
type: string
type: array
x-go-name: Authers
chain: chain:
type: string type: string
x-go-name: Chain x-go-name: Chain
chainGroup:
$ref: '#/definitions/ChainGroupConfig'
metadata: metadata:
additionalProperties: additionalProperties: {}
type: object
type: object type: object
x-go-name: Metadata x-go-name: Metadata
tls: tls:
@ -389,6 +433,11 @@ definitions:
bypass: bypass:
type: string type: string
x-go-name: Bypass x-go-name: Bypass
bypasses:
items:
type: string
type: array
x-go-name: Bypasses
connector: connector:
$ref: '#/definitions/ConnectorConfig' $ref: '#/definitions/ConnectorConfig'
dialer: dialer:
@ -399,6 +448,10 @@ definitions:
interface: interface:
type: string type: string
x-go-name: Interface x-go-name: Interface
metadata:
additionalProperties: {}
type: object
x-go-name: Metadata
name: name:
type: string type: string
x-go-name: Name x-go-name: Name
@ -521,9 +574,19 @@ definitions:
admission: admission:
type: string type: string
x-go-name: Admission x-go-name: Admission
admissions:
items:
type: string
type: array
x-go-name: Admissions
bypass: bypass:
type: string type: string
x-go-name: Bypass x-go-name: Bypass
bypasses:
items:
type: string
type: array
x-go-name: Bypasses
forwarder: forwarder:
$ref: '#/definitions/ForwarderConfig' $ref: '#/definitions/ForwarderConfig'
handler: handler:
@ -536,6 +599,10 @@ definitions:
x-go-name: Interface x-go-name: Interface
listener: listener:
$ref: '#/definitions/ListenerConfig' $ref: '#/definitions/ListenerConfig'
metadata:
additionalProperties: {}
type: object
x-go-name: Metadata
name: name:
type: string type: string
x-go-name: Name x-go-name: Name
@ -567,15 +634,23 @@ definitions:
certFile: certFile:
type: string type: string
x-go-name: CertFile x-go-name: CertFile
commonName:
type: string
x-go-name: CommonName
keyFile: keyFile:
type: string type: string
x-go-name: KeyFile x-go-name: KeyFile
organization:
type: string
x-go-name: Organization
secure: secure:
type: boolean type: boolean
x-go-name: Secure x-go-name: Secure
serverName: serverName:
type: string type: string
x-go-name: ServerName x-go-name: ServerName
validity:
$ref: '#/definitions/Duration'
type: object type: object
x-go-package: github.com/go-gost/x/config x-go-package: github.com/go-gost/x/config
info: info:
@ -632,8 +707,7 @@ paths:
security: security:
- basicAuth: - basicAuth:
- '[]' - '[]'
summary: Create a new admission, the name of admission must be unique in admission summary: Create a new admission, the name of admission must be unique in admission list.
list.
tags: tags:
- ConfigManagement - ConfigManagement
/config/admissions/{admission}: /config/admissions/{admission}:
@ -691,8 +765,7 @@ paths:
security: security:
- basicAuth: - basicAuth:
- '[]' - '[]'
summary: Create a new auther, the name of the auther must be unique in auther summary: Create a new auther, the name of the auther must be unique in auther list.
list.
tags: tags:
- ConfigManagement - ConfigManagement
/config/authers/{auther}: /config/authers/{auther}:
@ -924,8 +997,7 @@ paths:
security: security:
- basicAuth: - basicAuth:
- '[]' - '[]'
summary: Create a new resolver, the name of the resolver must be unique in resolver summary: Create a new resolver, the name of the resolver must be unique in resolver list.
list.
tags: tags:
- ConfigManagement - ConfigManagement
/config/resolvers/{resolver}: /config/resolvers/{resolver}:
@ -983,8 +1055,7 @@ paths:
security: security:
- basicAuth: - basicAuth:
- '[]' - '[]'
summary: Create a new service, the name of the service must be unique in service summary: Create a new service, the name of the service must be unique in service list.
list.
tags: tags:
- ConfigManagement - ConfigManagement
/config/services/{service}: /config/services/{service}:

View File

@ -247,13 +247,14 @@ type ServiceConfig struct {
Handler *HandlerConfig `yaml:",omitempty" json:"handler,omitempty"` Handler *HandlerConfig `yaml:",omitempty" json:"handler,omitempty"`
Listener *ListenerConfig `yaml:",omitempty" json:"listener,omitempty"` Listener *ListenerConfig `yaml:",omitempty" json:"listener,omitempty"`
Forwarder *ForwarderConfig `yaml:",omitempty" json:"forwarder,omitempty"` Forwarder *ForwarderConfig `yaml:",omitempty" json:"forwarder,omitempty"`
Metadata map[string]any `yaml:",omitempty" json:"metadata,omitempty"`
} }
type ChainConfig struct { type ChainConfig struct {
Name string `json:"name"` Name string `json:"name"`
Selector *SelectorConfig `yaml:",omitempty" json:"selector,omitempty"` Selector *SelectorConfig `yaml:",omitempty" json:"selector,omitempty"`
Hops []*HopConfig `json:"hops"` Hops []*HopConfig `json:"hops"`
Metadata map[string]any `yaml:",omitempty", json:"metadata,omitempty"` Metadata map[string]any `yaml:",omitempty" json:"metadata,omitempty"`
} }
type ChainGroupConfig struct { type ChainGroupConfig struct {
@ -284,7 +285,7 @@ type NodeConfig struct {
Hosts string `yaml:",omitempty" json:"hosts,omitempty"` Hosts string `yaml:",omitempty" json:"hosts,omitempty"`
Connector *ConnectorConfig `yaml:",omitempty" json:"connector,omitempty"` Connector *ConnectorConfig `yaml:",omitempty" json:"connector,omitempty"`
Dialer *DialerConfig `yaml:",omitempty" json:"dialer,omitempty"` Dialer *DialerConfig `yaml:",omitempty" json:"dialer,omitempty"`
Metadata map[string]any `yaml:",omitempty", json:"metadata,omitempty"` Metadata map[string]any `yaml:",omitempty" json:"metadata,omitempty"`
} }
type Config struct { type Config struct {