Documentation ¶
Index ¶
- Constants
- Variables
- func AppendIfUnique[T comparable](slice1 []T, slice2 []T) []T
- func BuildToken(rsaKey jwk.Key, issuer, sub string, validity time.Duration, ...) ([]byte, error)
- func Contains[T comparable](s []T, e T) bool
- func ContainsAny[T comparable](s []T, e []T) bool
- func ContainsFunc[T any](s []T, f func(T) bool) bool
- func CreateJWKWithKID(id string) (jwk.Key, error)
- func CreateJWKs(numOfKeys int) (jwk.Set, error)
- func Deduplicate[T comparable](s []T) []T
- func Filter[T any](s []T, f func(T) bool) []T
- func FindFirst[T any](s []T, f func(T) bool) (T, bool)
- func GetPublicKeySet(ctx context.Context, privateKeySet jwk.Set) (jwk.Set, error)
- func Intersection(s1, s2 []string) (inter []string)
- func IsNullUUID(key string) bool
- func IsValidEmail(str string) bool
- func IsValidUUID(key string) bool
- func Map[T1, T2 any](s []T1, f func(T1) T2) []T2
Constants ¶
View Source
const (
RSAKeySize = 2048
)
Variables ¶
View Source
var NewString = uuid.NewString
NewString is type alias to `github.com/google/uuid`.NewString
Functions ¶
func AppendIfUnique ¶
func AppendIfUnique[T comparable](slice1 []T, slice2 []T) []T
func BuildToken ¶
func BuildToken(rsaKey jwk.Key, issuer, sub string, validity time.Duration, customClaims map[string]string) ([]byte, error)
BuildToken creates a signed jwt using provided private key Ensure the key contains kid else the operation fails
func Contains ¶
func Contains[T comparable](s []T, e T) bool
func ContainsAny ¶ added in v0.8.19
func ContainsAny[T comparable](s []T, e []T) bool
func ContainsFunc ¶ added in v0.7.5
func Deduplicate ¶ added in v0.8.3
func Deduplicate[T comparable](s []T) []T
func GetPublicKeySet ¶
GetPublicKeySet convert private to public
func Intersection ¶ added in v0.8.19
func IsNullUUID ¶
IsNullUUID returns true if passed string is a null uuid or is not a valid uuid defined by `github.com/google/uuid`.Parse and `github.com/google/uuid`.Nil respectively else return false
func IsValidEmail ¶
func IsValidUUID ¶
IsValidUUID returns true if passed string in uuid format defined by `github.com/google/uuid`.Parse else return false
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.