Add command usage example
This commit is contained in:
@@ -119,7 +119,7 @@ gateway:
|
||||
readTimeout: 15
|
||||
# Proxy idle timeout
|
||||
idleTimeout: 60
|
||||
# Proxy rate limit, it's In-Memory Token Bucket
|
||||
# Proxy rate limit, it's In-Memory IP based
|
||||
# Distributed Rate Limiting for Token based across multiple instances is not yet integrated
|
||||
rateLimiter: 0
|
||||
accessLog: "/dev/Stdout"
|
||||
@@ -128,6 +128,7 @@ gateway:
|
||||
disableRouteHealthCheckError: false
|
||||
# Disable display routes on start
|
||||
disableDisplayRouteOnStart: false
|
||||
disableKeepAlive: false
|
||||
# interceptErrors intercepts backend errors based on defined the status codes
|
||||
interceptErrors:
|
||||
- 405
|
||||
@@ -237,14 +238,14 @@ gateway:
|
||||
middlewares:
|
||||
# Enable Basic auth authorization based
|
||||
- name: local-auth-basic
|
||||
# Authentication types | jwtAuth, basicAuth, auth0
|
||||
# Authentication types | jwt, basic, OAuth
|
||||
type: basic
|
||||
rule:
|
||||
username: admin
|
||||
password: admin
|
||||
#Enables JWT authorization based on the result of a request and continues the request.
|
||||
- name: google-auth
|
||||
# Authentication types | jwtAuth, basicAuth, OAuth
|
||||
# Authentication types | jwt, basic, OAuth
|
||||
# jwt authorization based on the result of backend's response and continue the request when the client is authorized
|
||||
type: jwt
|
||||
rule:
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
|
||||
var Cmd = &cobra.Command{
|
||||
Use: "config",
|
||||
Short: "Goma configuration",
|
||||
Short: "Goma Gateway configuration management",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if len(args) == 0 {
|
||||
return
|
||||
|
||||
@@ -28,7 +28,7 @@ var rootCmd = &cobra.Command{
|
||||
Use: "goma",
|
||||
Short: "Goma Gateway is a lightweight API Gateway, Reverse Proxy",
|
||||
Long: `.`,
|
||||
Example: "",
|
||||
Example: util.MainExample,
|
||||
Version: util.FullVersion(),
|
||||
}
|
||||
|
||||
|
||||
@@ -29,3 +29,7 @@ func FullVersion() string {
|
||||
}
|
||||
return ver
|
||||
}
|
||||
|
||||
const MainExample = "Initialize config: init config --output config.yml\n" +
|
||||
"Start server: server \n" +
|
||||
"Start server with custom config file: server --config config.yml"
|
||||
|
||||
Reference in New Issue
Block a user