Documentation
¶
Index ¶
- Constants
- Variables
- func IsDatabaseError(db *gorm.DB) bool
- func IssueAccessToken(subject any) string
- func IssueJwtWithConfig(claims jwt.Claims) string
- func IssueRefreshToken(subject any) string
- func MakeArgon2IdHash(password string) string
- func MakeArgon2IdHashWithConfig(password string, config *Argon2IdConfig) string
- func NewRateLimiter() *rate.Limiter
- func RandomString(n int) string
- func Stack(skip int) string
- func Stacktrace(skip int) []byte
- func VerifyArgon2IdHash(password string, encodedHash string) bool
- func VerifyJwt(tokenString string) (*jwt.Token, error)
- func WrapError(err error) error
- type Argon2IdConfig
- type GoogleOauth
- type OauthInterface
- type OauthProvider
- type PaginationRequest
- type PaginationResponse
- type Paginator
- func (p *Paginator) AddWhereConditions(filter reflect.Value) *Paginator
- func (p *Paginator) CalculateTotalAndLastPage() *Paginator
- func (p *Paginator) GetData(data any, query any, args ...any) *Paginator
- func (p *Paginator) SetOrderBy(orderBy string) *Paginator
- func (p *Paginator) SetPagination(page int, perPage int) *Paginator
- type TimeForJson
- type WhereCondition
Constants ¶
View Source
const ErrorDelimiter string = "---"
Variables ¶
View Source
var GetRefreshTokenLimit = func() uint {
return jwtCfg.RefreshTokenLimit
}
View Source
var NewOauthProvider func(provider OauthProvider) OauthInterface = newOauthProvider
Functions ¶
func IsDatabaseError ¶
func IssueAccessToken ¶
func IssueJwtWithConfig ¶
func IssueRefreshToken ¶
func MakeArgon2IdHash ¶
func MakeArgon2IdHashWithConfig ¶
func MakeArgon2IdHashWithConfig(password string, config *Argon2IdConfig) string
func NewRateLimiter ¶
func RandomString ¶
func Stacktrace ¶
func VerifyArgon2IdHash ¶
Types ¶
type Argon2IdConfig ¶
type GoogleOauth ¶
func (*GoogleOauth) GetAccessToken ¶
func (googleOauth *GoogleOauth) GetAccessToken(code string) error
func (*GoogleOauth) SetIdAndEmail ¶
func (googleOauth *GoogleOauth) SetIdAndEmail() error
type OauthInterface ¶
type PaginationRequest ¶
type PaginationResponse ¶
type Paginator ¶
type Paginator struct {
Page int
PerPage int
Total int64
LastPage uint
// contains filtered or unexported fields
}
func NewPaginator ¶
func (*Paginator) AddWhereConditions ¶
func (*Paginator) CalculateTotalAndLastPage ¶
func (*Paginator) SetOrderBy ¶
type TimeForJson ¶
func (*TimeForJson) MarshalJSON ¶
func (t *TimeForJson) MarshalJSON() ([]byte, error)
func (*TimeForJson) UnmarshalJSON ¶
func (t *TimeForJson) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.