Documentation ¶
Index ¶
- type ArrayResponse
- type Config
- type MapResponse
- type RuntimeResponse
- type Server
- func (s *Server) ErrorResponse(w http.ResponseWriter, r *http.Request, error string, code int)
- func (s *Server) JSONResponse(w http.ResponseWriter, r *http.Request, result interface{})
- func (s *Server) JSONResponseCode(w http.ResponseWriter, r *http.Request, result interface{}, responseCode int)
- func (s *Server) ListenAndServe(stopCh <-chan struct{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArrayResponse ¶
type ArrayResponse []string
type Config ¶
type Config struct { HttpClientTimeout time.Duration `mapstructure:"HTTP_CLIENT_TIMEOUT_IN_MINUTES"` HttpServerTimeout time.Duration `mapstructure:"HTTP_SERVER_TIMEOUT_IN_SECONDS"` HttpServerShutdownTimeout time.Duration `mapstructure:"HTTP_SERVER_SHUTDOWN_TIMEOUT_IN_SECONDS"` BackendURL []string `mapstructure:"BACKEND_SERVICE_URLS"` UILogo string `mapstructure:"UI_LOGO"` UIMessage string `mapstructure:"UI_MESSAGE"` UIColor string `mapstructure:"UI_COLOR"` UIPath string `mapstructure:"UI_PATH"` DataPath string `mapstructure:"DATA_PATH"` ConfigPath string `mapstructure:"CONFIG_PATH"` CertPath string `mapstructure:"CERT_PATH"` Port string `mapstructure:"HTTP_PORT"` SecurePort string `mapstructure:"HTTPS_PORT"` PortMetrics int `mapstructure:"METRICS_PORT"` Hostname string `mapstructure:"HOSTNAME"` H2C bool `mapstructure:"H2C"` RandomDelay bool `mapstructure:"ENABLE_RANDOM_DELAY"` RandomDelayUnit string `mapstructure:"RANDOM_DELAY_UNIT"` RandomDelayMin int `mapstructure:"RANDOM_DELAY_MIN"` RandomDelayMax int `mapstructure:"RANDOM_DELAY_MAX"` RandomError bool `mapstructure:"ENABLE_RANDOM_ERROR"` Unhealthy bool `mapstructure:"SET_SERVICE_UNHEALTHY"` Unready bool `mapstructure:"SET_SERVICE_UNREADY"` JWTSecret string `mapstructure:"JWT_SECRET"` CacheServer string `mapstructure:"CACHE_SERVER_ADDRESS"` ServiceName string `mapstructure:"GRPC_SERVICE_NAME"` StripeApiKey string `mapstructure:"STRIPE_API_KEY"` }
type MapResponse ¶
type RuntimeResponse ¶
type RuntimeResponse struct { Hostname string `json:"hostname"` Version string `json:"version"` Revision string `json:"revision"` Color string `json:"color"` Logo string `json:"logo"` Message string `json:"message"` GOOS string `json:"goos"` GOARCH string `json:"goarch"` Runtime string `json:"runtime"` NumGoroutine string `json:"num_goroutine"` NumCPU string `json:"num_cpu"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewMockServer ¶
func NewMockServer() *Server
func NewServer ¶
func NewServer(config *Config, logger *zap.Logger, authCmp *authentication_handler.AuthenticationComponent, merchantCmp *merchant.AccountComponent) (*Server, error)
func (*Server) ErrorResponse ¶
func (*Server) JSONResponse ¶
func (s *Server) JSONResponse(w http.ResponseWriter, r *http.Request, result interface{})
func (*Server) JSONResponseCode ¶
func (*Server) ListenAndServe ¶
func (s *Server) ListenAndServe(stopCh <-chan struct{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.