Documentation
¶
Index ¶
- func BuildCookieHeader(name string, value string, expires *time.Time, domain string, path string, ...) string
- func NewError(gc *gin.Context, status int, err error)
- type Client
- func (c *Client) Delete(target string, headers map[string]string, response interface{}) error
- func (c *Client) Get(target string, headers map[string]string, response interface{}) error
- func (c *Client) GetRaw(target string, headers map[string]string) (string, error)
- func (c *Client) Patch(target string, headers map[string]string, request interface{}, ...) error
- func (c *Client) Post(target string, headers map[string]string, request interface{}, ...) error
- func (c *Client) PostForm(target string, headers map[string]string, request map[string]string, ...) error
- func (c *Client) Put(target string, headers map[string]string, request interface{}, ...) error
- type ClientOptions
- type DummyHealthyHandler
- type HTTPError
- type Handler
- type ProbeManager
- type Server
- type ServerOptions
- type SimpleFSHandler
- type SimpleHealthyHandler
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type ClientOptions ¶
type ClientOptions struct { Timeout int `json:"timeout" yaml:"timeout"` CAFile string `json:"caFile" yaml:"caFile"` }
ClientOptions http client options
type DummyHealthyHandler ¶ added in v0.0.8
type DummyHealthyHandler struct { }
DummyHealthyHandler dummy health check handler
func NewDummyHealthyHandler ¶ added in v0.0.8
func NewDummyHealthyHandler() *DummyHealthyHandler
func (*DummyHealthyHandler) Build ¶ added in v0.0.8
func (h *DummyHealthyHandler) Build(engine *gin.Engine)
Build build health check handler
func (*DummyHealthyHandler) Healthz ¶ added in v0.0.8
func (h *DummyHealthyHandler) Healthz(gc *gin.Context)
Healthz health check api @Produce json @Summary health check @Description check status @Success 200 {object} StatusResponse @Failure 400 {object} TTPError @Failure 503 {object} HTTPError @Router /healthz [get]
type HTTPError ¶
type HTTPError struct { Code int `json:"code" example:"400"` Message string `json:"message" example:"status bad request"` }
HTTPError error response
type ProbeManager ¶ added in v0.0.8
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server http Server
type ServerOptions ¶
type ServerOptions struct { Host string `json:"host" yaml:"host"` Port int `json:"port" yaml:"port"` CAFile string `json:"caFile" yaml:"caFile"` PrivateKeyFile string `json:"privateKetFile" yaml:"privateKeyFile"` PublicCertFile string `json:"publicCertFile" yaml:"publicCertFile"` EnableProfiling bool `json:"enableProfiling" yaml:"enableProfiling"` }
Options http server options
type SimpleFSHandler ¶ added in v0.0.6
type SimpleFSHandler struct {
// contains filtered or unexported fields
}
func NewSimpleFSHandler ¶ added in v0.0.6
func NewSimpleFSHandler(fsPath string, relativePath string) *SimpleFSHandler
func (*SimpleFSHandler) Build ¶ added in v0.0.6
func (f *SimpleFSHandler) Build(engine *gin.Engine)
Build build health check handler
type SimpleHealthyHandler ¶ added in v0.0.8
type SimpleHealthyHandler struct { }
SimpleHealthyHandler simple health check handler
func NewSimpleHealthyHandler ¶ added in v0.0.8
func NewSimpleHealthyHandler() *SimpleHealthyHandler
func (*SimpleHealthyHandler) Build ¶ added in v0.0.8
func (h *SimpleHealthyHandler) Build(engine *gin.Engine)
Build build health check handler
func (*SimpleHealthyHandler) Healthz ¶ added in v0.0.8
func (h *SimpleHealthyHandler) Healthz(gc *gin.Context)
Healthz health check api @Produce json @Summary health check @Description check status @Success 200 {object} StatusResponse @Failure 400 {object} TTPError @Failure 503 {object} HTTPError @Router /healthz [get]
type StatusResponse ¶
type StatusResponse struct {
Message string `json:"message"`
}
StatusResponse status response