Documentation
¶
Index ¶
- func NewApplication() applicationInterface
- func NewMars(app applicationInterface) marsinterface
- func NewPassword() passwordinterface
- func NewPath() pathinterface
- func NewValidation() validationinterface
- func UniqueArr(arr []string) []string
- type ControllerInterface
- type CoreControllerInterface
- type CoreMiddlewareInterface
- type ErrorResponse
- type MarsToken
- type Middleware
- type MiddlewareInterface
- type NewControllerInterface
- type NewMiddlewareInterface
- type Pagination
- type PaginationParam
- type Paginator
- type Resource
- type ResourceInterface
- type Server
- type ServerInterface
- type VenusInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewApplication ¶
func NewApplication() applicationInterface
func NewPassword ¶
func NewPassword() passwordinterface
func NewValidation ¶
func NewValidation() validationinterface
Types ¶
type ControllerInterface ¶
type ControllerInterface interface {
Handler(ctx *fiber.Ctx) error
}
type CoreControllerInterface ¶
type CoreControllerInterface interface { App() applicationInterface Result(data interface{}) fiber.Map }
func NewController ¶
func NewController(app applicationInterface) CoreControllerInterface
type CoreMiddlewareInterface ¶
type CoreMiddlewareInterface interface {
App() applicationInterface
}
func NewMiddleware ¶
func NewMiddleware(app applicationInterface) CoreMiddlewareInterface
type ErrorResponse ¶
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
func (*Middleware) App ¶
func (m *Middleware) App() applicationInterface
type MiddlewareInterface ¶
type MiddlewareInterface interface {
Handler(ctx *fiber.Ctx) error
}
type NewControllerInterface ¶
type NewControllerInterface = func(controller CoreControllerInterface) ControllerInterface
type NewMiddlewareInterface ¶
type NewMiddlewareInterface = func(middleware CoreMiddlewareInterface) MiddlewareInterface
type Pagination ¶
type Pagination struct { Records interface{} `json:"data"` Meta *Paginator `json:"pagination"` }
func NewPagination ¶
func NewPagination(p *PaginationParam, result interface{}) *Pagination
type PaginationParam ¶
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func NewResource ¶
func NewResource(venus VenusInterface, data ResourceInterface) *Resource
func (*Resource) Collection ¶
func (r *Resource) Collection(data interface{}) fiber.Map
type ResourceInterface ¶
type ResourceInterface interface {
Map(model interface{}, venus VenusInterface) interface{}
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) Middleware ¶
func (s *Server) Middleware(middleware NewMiddlewareInterface) *Server
func (*Server) Route ¶
func (s *Server) Route(method string, path string, constroller NewControllerInterface, middlewares ...NewMiddlewareInterface) fiber.Router
type ServerInterface ¶
type ServerInterface interface { Init() *Server Route(method string, path string, controller NewControllerInterface, middlewares ...NewMiddlewareInterface) fiber.Router Run() }
func NewServer ¶
func NewServer(app applicationInterface) ServerInterface
type VenusInterface ¶
func NewVenus ¶
func NewVenus() VenusInterface
Source Files
¶
Click to show internal directories.
Click to hide internal directories.