Documentation ¶
Index ¶
- func AnyMatch(regexes []*regexp.Regexp, s *string) bool
- func CompareFileReferences(a, b *models.FileReference) bool
- func Filter[T any](s []T, cb func(v T) bool) []T
- func GetHttpClient(credentials *models.Credentials) *req.Client
- func GetHttpClientWithBasicAuth(credentials *models.Credentials) *req.Client
- func GetMapKeys[T comparable, U any](m map[T]U) []T
- func GetPtr[T any](v T) *T
- func GetPtrOrNil[T comparable](v T) *T
- func IsArray(input any) bool
- func Map[T any, U any](s []T, cb func(v T) U) []U
- func MapToSlice[T any, U any, K comparable](m map[K]T, cb func(k K, v T) U) []U
- func MapToSliceErr[T any, U any, K comparable](m map[K]T, cb func(k K, v T) (U, error)) ([]U, error)
- func MapWithIndex[T any, U any](s []T, cb func(v T, i int) U) []U
- func SliceContains[T comparable](s []T, v T) bool
- func SliceContainsBy[T comparable](s []T, v T, cb func(y, u T) bool) bool
- func SliceToMap[T comparable, U any](s []T, cb func(v T) U) map[T]U
- func ToSlice[T any](v any) ([]T, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareFileReferences ¶
func CompareFileReferences(a, b *models.FileReference) bool
func GetHttpClient ¶
func GetHttpClient(credentials *models.Credentials) *req.Client
ToDo: change to SetCommonBearerAuthToken and test
func GetHttpClientWithBasicAuth ¶
func GetHttpClientWithBasicAuth(credentials *models.Credentials) *req.Client
func GetMapKeys ¶
func GetMapKeys[T comparable, U any](m map[T]U) []T
func GetPtrOrNil ¶
func GetPtrOrNil[T comparable](v T) *T
func MapToSlice ¶
func MapToSlice[T any, U any, K comparable](m map[K]T, cb func(k K, v T) U) []U
func MapToSliceErr ¶
func MapToSliceErr[T any, U any, K comparable](m map[K]T, cb func(k K, v T) (U, error)) ([]U, error)
func MapWithIndex ¶
func SliceContains ¶
func SliceContains[T comparable](s []T, v T) bool
func SliceContainsBy ¶
func SliceContainsBy[T comparable](s []T, v T, cb func(y, u T) bool) bool
func SliceToMap ¶
func SliceToMap[T comparable, U any](s []T, cb func(v T) U) map[T]U
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.