Documentation ¶
Index ¶
- func ExtractToken(c *gin.Context) string
- func ExtractTokenID(c *gin.Context) (uint, string, error)
- func GenerateJwtToken(userId uint, email string, role string) (string, error)
- func GetLimitAndOffset(c *gin.Context) (int, int)
- func TokenValid(c *gin.Context) error
- type Config
- type OrderStatus
- type UserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractToken ¶
func GenerateJwtToken ¶
func TokenValid ¶
Types ¶
type Config ¶
type Config struct { DBDriver string `mapstructure:"DB_DRIVER"` DBUser string `mapstructure:"DB_USER"` DBPassword string `mapstructure:"DB_PASS"` DBHost string `mapstructure:"DB_HOST"` DBPort string `mapstructure:"DB_PORT"` DBName string `mapstructure:"DB_NAME"` }
func LoadConfig ¶
type OrderStatus ¶
type OrderStatus int
const ( Pending OrderStatus = iota Accepted )
func (OrderStatus) String ¶
func (o OrderStatus) String() string
Click to show internal directories.
Click to hide internal directories.