Documentation ¶
Index ¶
Constants ¶
View Source
const AV1 = "/api/v1"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
Server contains all the necessary information to initialize and use the server
Rouer is the base router, it SHOULDN'T be used, create a subrouter instead, e.g. User and admin subrouters
DB is a pointer to a struct that contains the database models
func (*Server) CreateRoutes ¶
func (s *Server) CreateRoutes()
func (*Server) Initialize ¶
Initialize does the server setup in the following order:
Router initialization, AddSelect of user and admin subroutes to the router, Connect to database, Database initialization, Cache initialization, Creation of routes ¶
NOTE: the initialization of the database MUST be done before the cache initialization
Click to show internal directories.
Click to hide internal directories.