Documentation
¶
Index ¶
- Constants
- func Get[T any](c *gin.Context, key string) (T, error)
- func GetAtomic[T any](c *gin.Context, key string) (T, error)
- func GetAtomicOrNormal[T any](c *gin.Context, key string) (T, error)
- func GetAuthorization(c *gin.Context, key string) (string, error)
- func GetDB(c *gin.Context, key string) (*gorm.DB, error)
- func GetDto[T any](c *gin.Context) (T, error)
- func GetDuration(c *gin.Context, key string) (time.Duration, error)
- func GetJwt(c *gin.Context, key string) (*jwt.Token, error)
- func GetMedia(c *gin.Context, key string) (*utils.MediaValidity, error)
- func GetOAuth2Token(c *gin.Context, key string) (*oauth2.Token, error)
- func GetPresignedUrl(c *gin.Context, key string) (*s3.PresignedPostRequest, error)
- func GetRepo(c *gin.Context, key string) (*repositories.Repo, error)
- func GetS3(c *gin.Context, key string) (*s3.Client, error)
- func GetS3EventObj(c *gin.Context, key string) ([]utils.S3Object, error)
- func GetServerJwtSecret(c *gin.Context) (any, error)
- func GetSigningMethod(c *gin.Context, key string) (jwt.SigningMethod, error)
- func GetTimestamp(c *gin.Context) (time.Time, error)
- func GetTx(c *gin.Context, key string) (*gorm.DB, error)
- func GetUUID(c *gin.Context, key string) (uuid.UUID, error)
- func ShouldBindJSON[T any](c *gin.Context)
- func ShouldBindQuery[T any](c *gin.Context)
- func UseAtomic(r gin.IRoutes, key string, atom *atomic.Value) gin.IRoutes
- func UseEnvJwtSecret(r gin.IRoutes) gin.IRoutes
- func UseRepo(r gin.IRouter)
- func UseS3(r gin.IRoutes, client *s3.Client, internal *s3.Client) gin.IRoutes
- func UseTimestamp(r gin.IRoutes) gin.IRoutes
- func UseTx(r gin.IRoutes, db *gorm.DB) gin.IRoutes
Constants ¶
View Source
const ( // timestamp of the request TIMESTAMP_KEY = "timestamp" // JWT validation parameters JWT_TOKEN_KEY = "jwt-token" JWT_CLAIMS_KEY = "jwt-claims" JWT_KEYFUNC_KEY = "jwt-keyfunc" JWT_PARSE_OPTIONS_KEY = "jwt-parse-options" SERVER_JWT_SECRET_KEY = "server-jwt-secret" // JWT issue parameters JWT_SIGNING_METHOD = "jwt-signing-method" // Gorm connection GORM_CONNECTION_KEY = "gorm-connection" // Repo object REPO_KEY = "repo" // S3 connection S3_CONNECTION_KEY = "s3-connection" S3_INTERNAL_CONNECTION_KEY = "s3-internal-connection" // Caller CALLER_KEY = "caller" )
Variables ¶
This section is empty.
Functions ¶
func GetPresignedUrl ¶
func GetSigningMethod ¶
func ShouldBindQuery ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.