Documentation ¶
Index ¶
- func GetBearerToken(c *gin.Context) (tks string, err error)
- func ParseToken(token string) (clientID, secret string, err error)
- type Render
- type Server
- func (s *Server) Authenticate(c *gin.Context)
- func (s *Server) Available() gin.HandlerFunc
- func (s *Server) DeleteShortURL(c *gin.Context)
- func (s *Server) Healthz(c *gin.Context)
- func (s *Server) Index(c *gin.Context)
- func (s *Server) IsHealthy() bool
- func (s *Server) IsReady() bool
- func (s *Server) List(c *gin.Context)
- func (s *Server) Login(c *gin.Context)
- func (s *Server) LoginPage(c *gin.Context)
- func (s *Server) NotAllowed(c *gin.Context)
- func (s *Server) NotFound(c *gin.Context)
- func (s *Server) Readyz(c *gin.Context)
- func (s *Server) Redirect(c *gin.Context)
- func (s *Server) Routes(router *gin.Engine) (err error)
- func (s *Server) Serve() (err error)
- func (s *Server) SetHealthy(status bool)
- func (s *Server) SetReady(status bool)
- func (s *Server) ShortURLDetail(c *gin.Context)
- func (s *Server) ShortURLInfo(c *gin.Context)
- func (s *Server) ShortURLList(c *gin.Context)
- func (s *Server) ShortenURL(c *gin.Context)
- func (s *Server) Shutdown(ctx context.Context) (err error)
- func (s *Server) Status(c *gin.Context)
- func (s *Server) URL() string
- func (s *Server) Updates(c *gin.Context)
- func (s *Server) Uptime() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseToken ¶ added in v1.0.0
Types ¶
type Render ¶ added in v1.1.0
type Render struct {
// contains filtered or unexported fields
}
func (*Render) AddPattern ¶ added in v1.1.0
type Server ¶
Implements the link shortening service and API.
func (*Server) Authenticate ¶ added in v1.0.0
func (*Server) Available ¶
func (s *Server) Available() gin.HandlerFunc
Available is middleware that uses healthy boolean to return a service unavailable http status code if the server is shutting down or in maintenance mode. This middleware must be fairly early on in the chain to ensure that complex handling does not slow the shutdown of the server.
func (*Server) DeleteShortURL ¶ added in v0.2.0
func (*Server) NotAllowed ¶
func (*Server) SetHealthy ¶ added in v0.2.0
Set the server health state to the status bool.
func (*Server) ShortURLDetail ¶ added in v1.1.0
func (*Server) ShortURLInfo ¶ added in v0.2.0
func (*Server) ShortURLList ¶ added in v1.1.0
func (*Server) ShortenURL ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.