Documentation ¶
Index ¶
- Constants
- Variables
- func AreElementsUnique[T comparable](elems []T) bool
- func Contains[T comparable](elems []T, v T) bool
- func GetEnv(key string) string
- func GetEnvWithDefault(key, def string) string
- func GetKeys[K comparable, V any](m map[K]V) []K
- func GetUnique[T comparable](arr []T) []T
- func Max[T constraints.Ordered](s ...T) T
- func Min[T constraints.Ordered](s ...T) T
- func ObtainCert(endpoint string) string
- func SafeBase64Decode(s string) ([]byte, error)
- func SetDiff[T comparable](orig, changed map[T]struct{}) map[T]struct{}
- func SetDiffGeneric[T comparable, V any](orig, changed map[T]V) map[T]V
- func ValidatePubkey(pubkey string) bool
- func WaitAll(el ...WithEventLoop)
- func WaitOne(one WithEventLoop, wg *sync.WaitGroup)
- type WithEventLoop
Constants ¶
View Source
const (
PUBKEY_LEN = 66
)
Variables ¶
View Source
var ( HexCharacters = regexp.MustCompile(`^[A-Fa-f0-9]*$`) AlphaNumeric = regexp.MustCompile(`^[A-Za-z0-9_-]*$`) )
Functions ¶
func AreElementsUnique ¶
func AreElementsUnique[T comparable](elems []T) bool
func Contains ¶
func Contains[T comparable](elems []T, v T) bool
func GetEnvWithDefault ¶
func GetKeys ¶
func GetKeys[K comparable, V any](m map[K]V) []K
func GetUnique ¶
func GetUnique[T comparable](arr []T) []T
func Max ¶
func Max[T constraints.Ordered](s ...T) T
func Min ¶
func Min[T constraints.Ordered](s ...T) T
func ObtainCert ¶ added in v0.0.2
func SafeBase64Decode ¶ added in v0.0.7
func SetDiff ¶
func SetDiff[T comparable](orig, changed map[T]struct{}) map[T]struct{}
func SetDiffGeneric ¶ added in v0.0.5
func SetDiffGeneric[T comparable, V any](orig, changed map[T]V) map[T]V
func ValidatePubkey ¶ added in v0.0.3
func WaitAll ¶ added in v0.0.4
func WaitAll(el ...WithEventLoop)
func WaitOne ¶ added in v0.0.4
func WaitOne(one WithEventLoop, wg *sync.WaitGroup)
Types ¶
type WithEventLoop ¶ added in v0.0.4
type WithEventLoop interface {
EventLoop()
}
Click to show internal directories.
Click to hide internal directories.