Documentation ¶
Index ¶
- type Conf
- type Handler
- func (h *Handler) Auth() func(w http.ResponseWriter, r *http.Request)
- func (h *Handler) GetService(t string) (*Service, error)
- func (h *Handler) Hello() func(w http.ResponseWriter, r *http.Request)
- func (h *Handler) TryVerifyJWT(t string, pk *rsa.PublicKey) (*jwt.StandardClaims, error)
- func (h *Handler) VerifyAuthHeader(t string) (*Service, error)
- func (h *Handler) VerifyOriginURI(path string, service *Service) error
- type Service
- type TomlConf
- type TomlService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler handlers
func NewHandler ¶
func NewHandler(conf *Conf, freshness time.Duration, cache *ccache.Cache, cacheSize int64, logger *zap.Logger) (*Handler, error)
NewHandler :
func (*Handler) Auth ¶
func (h *Handler) Auth() func(w http.ResponseWriter, r *http.Request)
Auth : Auth handler
func (*Handler) Hello ¶
func (h *Handler) Hello() func(w http.ResponseWriter, r *http.Request)
Hello : hello handler
func (*Handler) TryVerifyJWT ¶
TryVerifyJWT :
func (*Handler) VerifyAuthHeader ¶
VerifyAuthHeader verify auth header
type TomlConf ¶
type TomlConf struct {
Services []TomlService `toml:"services"`
}
TomlConf : root struct
type TomlService ¶
type TomlService struct { ID string `toml:"id"` Paths []string `toml:"paths"` PublicKeys []string `toml:"public_keys"` }
TomlService : services for parse toml
Click to show internal directories.
Click to hide internal directories.