Documentation ¶
Index ¶
- func LoadYAML(path string, out interface{}) error
- func NewTLSConfigClient(c Certificate) (*tls.Config, error)
- func NewTLSConfigServer(c Certificate) (*tls.Config, error)
- func SetDefaults(ptr interface{}) error
- func UnmarshalYAML(in []byte, out interface{}) error
- func Wrapper(handler HandlerFunc) func(c *gin.Context)
- type Certificate
- type HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTLSConfigClient ¶
func NewTLSConfigClient(c Certificate) (*tls.Config, error)
NewTLSConfigClient loads tls config for client
func NewTLSConfigServer ¶
func NewTLSConfigServer(c Certificate) (*tls.Config, error)
NewTLSConfigServer loads tls config for server
func UnmarshalYAML ¶
UnmarshalYAML unmarshals, defaults and validates
func Wrapper ¶
func Wrapper(handler HandlerFunc) func(c *gin.Context)
Types ¶
type Certificate ¶
type Certificate struct { CA string `yaml:"ca" json:"ca"` Key string `yaml:"key" json:"key"` Cert string `yaml:"cert" json:"cert"` Name string `yaml:"name" json:"name"` InsecureSkipVerify bool `yaml:"insecureSkipVerify" json:"insecureSkipVerify"` // for client, for test purpose tls.ClientAuthType `yaml:"clientAuthType" json:"clientAuthType"` }
Certificate certificate config for server Name : serverNameOverride, same to CommonName in server.pem if Name == "" , link would not verifies the server's certificate chain and host name AuthType : declares the policy the server will follow for TLS Client Authentication
type HandlerFunc ¶
Click to show internal directories.
Click to hide internal directories.