server

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFunc

type HandlerFunc func(s *Server) gin.HandlerFunc

type RouterGroup

type RouterGroup struct {
	*gin.RouterGroup

	Server *Server
}

func (*RouterGroup) DELETE

func (rg *RouterGroup) DELETE(relativePath string, f HandlerFunc)

func (*RouterGroup) GET

func (rg *RouterGroup) GET(relativePath string, f HandlerFunc)

func (*RouterGroup) Group

func (rg *RouterGroup) Group(relativePath string) *RouterGroup

func (*RouterGroup) HEAD

func (rg *RouterGroup) HEAD(relativePath string, f HandlerFunc)

func (*RouterGroup) OPTIONS

func (rg *RouterGroup) OPTIONS(relativePath string, f HandlerFunc)

func (*RouterGroup) PATCH

func (rg *RouterGroup) PATCH(relativePath string, f HandlerFunc)

func (*RouterGroup) POST

func (rg *RouterGroup) POST(relativePath string, f HandlerFunc)

func (*RouterGroup) PUT

func (rg *RouterGroup) PUT(relativePath string, f HandlerFunc)

func (*RouterGroup) Use

func (rg *RouterGroup) Use(middleware ...gin.HandlerFunc) *RouterGroup

type Server

type Server struct {
	// Public Variables
	Store    *bolt.DB
	Session  *auth.Session
	Conf     *config.Config
	Author   *feed.Author
	Router   *gin.Engine
	Mangadex *mangadex.Client
	// contains filtered or unexported fields
}

func New

func New(store *bolt.DB, session *auth.Session, conf *config.Config, a *feed.Author) *Server

func (*Server) Err404

func (s *Server) Err404(c *gin.Context)

func (*Server) Group

func (s *Server) Group(relativePath string) *RouterGroup

func (*Server) HTTPServer

func (s *Server) HTTPServer() *http.Server

func (*Server) ScanLibrary

func (s *Server) ScanLibrary() error

func (*Server) SetErr404

func (s *Server) SetErr404(f gin.HandlerFunc)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL