Documentation ¶
Index ¶
- type HttpServer
- func (server *HttpServer) GetTokenRecoverApproval(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (server *HttpServer) Ping(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func (server *HttpServer) Response(w http.ResponseWriter, code ResponseCode, data interface{}, err error)
- func (server *HttpServer) Run(config config.HTTPConfig) error
- func (server *HttpServer) RunMetrics(config config.MetricsConfig) error
- func (server *HttpServer) Shutdown() error
- type Response
- type ResponseCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpServer ¶
type HttpServer struct {
// contains filtered or unexported fields
}
func NewHttpServer ¶
func NewHttpServer(approvalService *approval.ApprovalService, registry *prometheus.Registry, logger *zerolog.Logger) *HttpServer
func (*HttpServer) GetTokenRecoverApproval ¶
func (server *HttpServer) GetTokenRecoverApproval(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*HttpServer) Ping ¶
func (server *HttpServer) Ping(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func (*HttpServer) Response ¶
func (server *HttpServer) Response(w http.ResponseWriter, code ResponseCode, data interface{}, err error)
func (*HttpServer) Run ¶
func (server *HttpServer) Run(config config.HTTPConfig) error
func (*HttpServer) RunMetrics ¶
func (server *HttpServer) RunMetrics(config config.MetricsConfig) error
func (*HttpServer) Shutdown ¶
func (server *HttpServer) Shutdown() error
type Response ¶
type Response struct { Code ResponseCode `json:"code"` Data interface{} `json:"data,omitempty"` Error string `json:"error,omitempty"` }
Click to show internal directories.
Click to hide internal directories.