Documentation ¶
Index ¶
- Constants
- type App
- type Config
- type Controller
- type CreateHandler
- type CreateHandlerOptions
- type CreateHandlerResponse
- type Database
- type DatabaseConfig
- type DeleteHandler
- type DeleteHandlerOptions
- type DeleteHandlerResponse
- type Entity
- type Event
- type Extras
- type FindHandler
- type FindHandlerOptions
- type FindHandlerResponse
- type GetHandler
- type GetHandlerOptions
- type GetHandlerResponse
- type Handler
- type HookFunc
- type Hooks
- type MailerConfig
- type Name
- type PatchHandler
- type PatchHandlerOptions
- type PatchHandlerResponse
- type Path
- type Route
- type Router
- type Server
- type ServerError
- type Service
- func (s *Service) AddPrivateRoute(method string, controller func(params map[string]interface{}) error, ...) *Service
- func (s *Service) AddProtectedRoute(method string, controller func(params map[string]interface{}) error, ...) *Service
- func (s *Service) AddPublicRoute(method string, controller func(params map[string]interface{}) error, ...) *Service
- func (s *Service) Bind(controller func(params map[string]interface{}) error, server *Server) func(c *fiber.Ctx) error
- func (s *Service) SetEntity(e Entity) *Service
- func (s *Service) SetHooks(h Hooks) *Service
- func (s *Service) SetName(n Name) *Service
- func (s *Service) SetPath(p Path) *Service
- type Services
Constants ¶
View Source
const (
TimeoutInSeconds = 30
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { PORT int DATABASE DatabaseConfig STAGE string AUDIENCE string JWT_SECRET string JWT_EXPIRY int MAILER MailerConfig }
func Configuration ¶
func Configuration() *Config
type Controller ¶
type CreateHandler ¶
type CreateHandler func(customPayload interface{}, customOptions CreateHandlerOptions) CreateHandlerResponse
type CreateHandlerOptions ¶
type CreateHandlerOptions = *options.InsertOneOptions
type CreateHandlerResponse ¶
type CreateHandlerResponse struct { Result *mongo.InsertOneResult Exception error }
type DatabaseConfig ¶
type DeleteHandler ¶
type DeleteHandler func(customFilter interface{}, customOptions DeleteHandlerOptions) DeleteHandlerResponse
type DeleteHandlerOptions ¶
type DeleteHandlerOptions = *options.FindOneAndDeleteOptions
type DeleteHandlerResponse ¶
type DeleteHandlerResponse struct { Result *mongo.SingleResult Exception error }
type Event ¶
type Event struct { Data interface{} Listener chan interface{} }
func (*Event) Unsubscribe ¶
func (e *Event) Unsubscribe()
type FindHandler ¶
type FindHandler func(customFilter interface{}, customOptions FindHandlerOptions) FindHandlerResponse
type FindHandlerOptions ¶
type FindHandlerOptions = *options.FindOptions
type FindHandlerResponse ¶
type GetHandler ¶
type GetHandler func(customFilter interface{}, customOptions GetHandlerOptions) GetHandlerResponse
type GetHandlerOptions ¶
type GetHandlerOptions = *options.FindOneOptions
type GetHandlerResponse ¶
type GetHandlerResponse struct { Result *mongo.SingleResult Exception error }
type Handler ¶
type Handler struct { Find FindHandler Get GetHandler Create CreateHandler Patch PatchHandler Delete DeleteHandler }
type MailerConfig ¶
type MailerConfig struct {
FROM string
}
type PatchHandler ¶
type PatchHandler func(customFilter interface{}, customPayload interface{}, customOptions PatchHandlerOptions) PatchHandlerResponse
type PatchHandlerOptions ¶
type PatchHandlerOptions = *options.FindOneAndUpdateOptions
type PatchHandlerResponse ¶
type PatchHandlerResponse struct { Result *mongo.SingleResult Exception error }
type Route ¶
type Route struct { Path string Controller Controller Extras Extras }
type ServerError ¶
type ServerError struct { Status int `json:"status"` Title string `json:"title"` Message string `json:"message"` }
func (*ServerError) Error ¶
func (e *ServerError) Error() string
type Service ¶
func (*Service) AddPrivateRoute ¶
func (*Service) AddProtectedRoute ¶
func (*Service) AddPublicRoute ¶
Click to show internal directories.
Click to hide internal directories.