Documentation ¶
Overview ¶
The commmon package provides structs and functions for external code to interact with this gateway service.
Index ¶
Constants ¶
View Source
const ( ConfigKeyLogPath = "gateway.LogPath" ConfigKeyLogSaveName = "gateway.LogSaveName" ConfigKeyLogFileExt = "gateway.LogFileExt" ConfigKeyGatewayPort = "gateway.Port" ConfigKeyWWWPath = "gateway.WWWPath" ConfigKeyRuntimePath = "common.RuntimePath" DefaultGatewayPort = "80" )
View Source
const ( ManagementURLFilename = "management.url" StaticURLFilename = "static.url" APIGatewayRoutes = "/v1/gateway/routes" APIGatewayPort = "/v1/gateway/port" )
View Source
const Version = "0.3.6"
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
Types ¶
type ChangePortRequest ¶
type ChangePortRequest struct {
Port string `json:"port" binding:"required"`
}
type ManagementService ¶
type ManagementService interface { CreateRoute(route *Route) error ChangePort(request *ChangePortRequest) error }
func NewManagementService ¶
func NewManagementService(RuntimePath string) (ManagementService, error)
Click to show internal directories.
Click to hide internal directories.