Documentation ¶
Index ¶
- Constants
- Variables
- func ArrContains[T comparable](arr []T, obj T) bool
- func ArrContainsAny[T comparable](arr []T, objs []T) bool
- func CheckHttpError(funcName string, resp *http.Response) error
- func GetObjectID(id *string) *primitive.ObjectID
- func GetObjectIDs(ids []*string) *[]*primitive.ObjectID
- func IsNil(i any) bool
- func NormalizeToFQDNRules(name string, stripEmailDomain bool) (string, error)
- func Ptr[T any](obj T) *T
- func ToJsonString[T interface{}](obj T) string
- func UnPtrString(s *string) string
- func UnPtrs[T any](objs []*T) []T
- type BsonMap
Constants ¶
View Source
const (
// value related to RFC 1123 and 952.
LabelHostnameLength = 63
)
Variables ¶
View Source
var ErrInvalidUserName = errors.New("invalid user name")
Functions ¶
func ArrContains ¶
func ArrContains[T comparable](arr []T, obj T) bool
func ArrContainsAny ¶ added in v1.3.0
func ArrContainsAny[T comparable](arr []T, objs []T) bool
func GetObjectID ¶
func GetObjectIDs ¶
func NormalizeToFQDNRules ¶ added in v1.3.2
NormalizeToFQDNRules will replace forbidden chars in user it can also return an error if the user doesn't respect RFC 952 and 1123.
func ToJsonString ¶
func ToJsonString[T interface{}](obj T) string
func UnPtrString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.