util

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 13 Imported by: 20

Documentation

Overview

Copyright 2020 Banzai Cloud.

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 BoolPointer

func BoolPointer(b bool) *bool

func ContainsString

func ContainsString(slice []string, s string) bool

func CreateLogger

func CreateLogger(debug bool, development bool) logr.Logger

func EmptyTypedFloatSlice

func EmptyTypedFloatSlice(f ...float64) []interface{}

func EmptyTypedStrSlice

func EmptyTypedStrSlice(s ...string) []interface{}

func GenerateCaddyFile

func GenerateCaddyFile(cf caddyfile.EncodedCaddyfile) ([]byte, error)

func GetPodSecurityContextFromSecurityContext

func GetPodSecurityContextFromSecurityContext(sc *corev1.SecurityContext) *corev1.PodSecurityContext

func Int64Pointer

func Int64Pointer(i int64) *int64

func IntPointer

func IntPointer(i int32) *int32

func IntstrPointer

func IntstrPointer(i int) *intstr.IntOrString

func MergeMultipleStringMaps

func MergeMultipleStringMaps(stringMaps ...map[string]string) map[string]string

func MergeStringMaps

func MergeStringMaps(l map[string]string, l2 map[string]string) map[string]string

func PointerToBool

func PointerToBool(flag *bool) bool

func PointerToInt32

func PointerToInt32(i *int32) int32

func PointerToString

func PointerToString(s *string) string

func ReduceMapByMap

func ReduceMapByMap(original map[string]string, reduce map[string]string) map[string]string

func RemoveString

func RemoveString(slice []string, s string) (result []string)

func StrPointer

func StrPointer(s string) *string

Types

type ZeroModTimeFileSystem

type ZeroModTimeFileSystem struct {
	Source http.FileSystem
}

ZeroModTimeFileSystem is an http.FileSystem wrapper. It exposes a filesystem exactly like Source, except all file modification times are changed to zero.

func (ZeroModTimeFileSystem) Open

func (fs ZeroModTimeFileSystem) Open(name string) (http.File, error)

Jump to

Keyboard shortcuts

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