Documentation ¶
Index ¶
- func CheckPasswordHash(password string, hash string) bool
- func CreateDirIfNotExists(dir string) error
- func GetOrFile(envVar string) (string, error)
- func HashPassword(password string) (string, error)
- func MustGet(k string) string
- func MustGetBool(k string) bool
- func MustGetInt32(k string) int32
- func MustGetInt64(k string) int64
- func MustGetOrFile(envVar string) string
- type CustomClaims
- type JWTKeyStore
- type JWTKeyStoreConfig
- type VCSBuildInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func CreateDirIfNotExists ¶
func GetOrFile ¶
GetOrFile attempts to resolve 'key' as an environment variable. Failing that, it will check to see if '<key>_FILE' exists. If so, it will attempt to read from the referenced file to populate a value.
func HashPassword ¶
func MustGetBool ¶
MustGetBool will return the env as boolean or panic if it is not present
func MustGetInt32 ¶
MustGetInt32 will return the env as int32 or panic if it is not present
func MustGetInt64 ¶
MustGetInt64 will return the env as int64 or panic if it is not present
func MustGetOrFile ¶ added in v0.8.0
MustGetOrFile attempts to resolve 'key' as an environment variable. Failing that, it will check to see if '<key>_FILE' exists. If so, it will attempt to read from the referenced file to populate a value. If that fails, it will panic.
Types ¶
type CustomClaims ¶
type JWTKeyStore ¶
type JWTKeyStore struct {
// contains filtered or unexported fields
}
func InitJWTKeyStore ¶
func InitJWTKeyStore(jwtConfig *JWTKeyStoreConfig) (*JWTKeyStore, error)
func (*JWTKeyStore) GenerateJWT ¶
func (ks *JWTKeyStore) GenerateJWT(userID uuid.UUID) (string, error)
GenerateJWT generates JWT with the provided data
type JWTKeyStoreConfig ¶
type JWTKeyStoreConfig struct { PrivateKeyPath string PublicKeyPath string Algorithm string TimeoutSec int32 }
JWTKeyStoreConfig defines the options for JWTKeyStore
type VCSBuildInfo ¶
func GetVscBuildInfo ¶
func GetVscBuildInfo() (*VCSBuildInfo, error)