utils

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildIndexedDataFromStructByFilter

func BuildIndexedDataFromStructByFilter[T any](fields map[string]bool, sourceData *[]T) map[string]map[string][]T

In short I want to pivot my dataset and index by field.

func DynamicRESTFromTypeStruct

func DynamicRESTFromTypeStruct[T any](fields map[string]bool, r *gin.Engine, dataSource DataRetriever[T])

func GetEnvVars

func GetEnvVars(envvars ...string) map[string]EnvVar

Very basic parsing

func NewKubeClientSet added in v0.0.8

func NewKubeClientSet(useInclusterConfig bool) (*kubernetes.Clientset, error)

Types

type DataRetriever

type DataRetriever[T any] func(k string, v string) []T

Type is meant to work as an interface into the service base modules to access consumer data to perform some addition support mode

type EnvVar

type EnvVar struct {
	Value  string `json:"value"`
	Exists bool   `json:"exists"`
}

type InvalidSetupError added in v0.0.8

type InvalidSetupError struct{}

func (*InvalidSetupError) Error added in v0.0.8

func (e *InvalidSetupError) Error() string

Jump to

Keyboard shortcuts

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