Documentation
¶
Index ¶
- Variables
- func AddRoute(app *gin.Engine, route Route)
- func AddRoutes(app *gin.Engine, routes []Route)
- func BadRequestError(c *gin.Context, err error)
- func CloseMongoConnection()
- func Created(c *gin.Context, data any)
- func GetAppKey() string
- func GetCollection(collection string) *mongo.Collection
- func GetJWTPrivateKey() *rsa.PrivateKey
- func GetJWTPublicKey() *rsa.PublicKey
- func GetMongoConnection() (*mongo.Client, error)
- func HandleError(c *gin.Context, statusCode int, err error)
- func HandleUncaughtError() gin.RecoveryFunc
- func InitApp() (*gin.Engine, error)
- func InitDB() (*mongo.Database, error)
- func InternalServerError(c *gin.Context, err error)
- func NotFoundError(c *gin.Context, err error)
- func OK(c *gin.Context, data any)
- func OpenMongoConnection()
- func Respond(c *gin.Context, statusCode int, data any)
- func UnauthorizedError(c *gin.Context, err error)
- type Audit
- type Image
- type RoomEntity
- type Route
- type Timestamps
- type UUID
- type UserEntity
Constants ¶
This section is empty.
Variables ¶
View Source
var Client *mongo.Client
View Source
var DB *mongo.Database
Functions ¶
func BadRequestError ¶
func CloseMongoConnection ¶
func CloseMongoConnection()
func GetCollection ¶
func GetCollection(collection string) *mongo.Collection
func GetJWTPrivateKey ¶
func GetJWTPrivateKey() *rsa.PrivateKey
func GetJWTPublicKey ¶
func GetMongoConnection ¶
func HandleUncaughtError ¶
func HandleUncaughtError() gin.RecoveryFunc
func InternalServerError ¶
func NotFoundError ¶
func OpenMongoConnection ¶
func OpenMongoConnection()
func UnauthorizedError ¶
Types ¶
type RoomEntity ¶
type Timestamps ¶
type UserEntity ¶
Click to show internal directories.
Click to hide internal directories.