util

package
v0.0.0-...-09e5c49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2024 Michael Vittrup Larsen

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CsvToList

func CsvToList(in string) []string

func LookupAuthSecret

func LookupAuthSecret(secretName, namespace string, rl *fn.ResourceList) (username, password string, err error)

LookupAuthSecret will lookup a secret in a resourcelist and return username and password decoded from secret

func LookupAuthSecretWithKeys

func LookupAuthSecretWithKeys(secretName, namespace, usernameKey, passwordKey string, rl *fn.ResourceList) (username, password string, err error)

LookupAuthSecretWithKeys will lookup a secret in a resourcelist and return username and password decoded from secret with the username and password being defined by supplied key names

func LookupSSHAuthSecret

func LookupSSHAuthSecret(secretName, namespace string, rl *fn.ResourceList) (username, password string, err error)

LookupSSHAuthSecret will lookup an SSH secret in a resourcelist and return username and password decoded from secret

func MergeMaps

func MergeMaps[M ~map[K]V, K comparable, V any](m1, m2 M) M

MergeMaps will merge m1 and m2 with precedence to m2

func ResultPrintf

func ResultPrintf(fnResults *fn.Results, sev fn.Severity, format string, a ...any)

func UniqueStrings

func UniqueStrings(list []string) []string

UniqueStrings removes duplicate strings from slice

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL