yudienutil

package
v0.0.0-...-0d0d49f Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendArray

func AppendArray(slice []interface{}, data ...interface{}) []interface{}

func AppendArrayMap

func AppendArrayMap(slice []map[string]interface{}, data ...map[string]interface{}) []map[string]interface{}

func ArrayIntMax

func ArrayIntMax(ints []int) int

func ArrayStringJoin

func ArrayStringJoin(input_val []interface{}, separator string) string

func Base64Decode

func Base64Decode(text string) (string, error)

func Base64Encode

func Base64Encode(text string) string

func ConvertListToMap

func ConvertListToMap(input *list.Element, count int) map[string]interface{}

We take an input element, and a count, and will walk the list elements, until the count is complete

func ConvertMapArrayToMap

func ConvertMapArrayToMap(map_array []map[string]interface{}, key string) map[string]interface{}

func DeepCopy

func DeepCopy(v interface{}) interface{}

func Direct_MapSet

func Direct_MapSet(args []interface{}, input interface{}, udn_data interface{})

func GetArgsFromArgsOrStrings

func GetArgsFromArgsOrStrings(args []interface{}) []interface{}

func GetChildResult

func GetChildResult(parent interface{}, child interface{}) DynamicResult

func GetResult

func GetResult(input interface{}, type_value int) interface{}

func InArray

func InArray(val interface{}, array interface{}) (exists bool, index int)

TODO(g):PACKAGE:REFLECT: Using refect here, to not be string specific, evaluate removing this in the future

func IsStringInArray

func IsStringInArray(text string, arr []string) bool

func IsValueInArray

func IsValueInArray(value interface{}, arr []interface{}) bool

func JsonConvertRecordMap

func JsonConvertRecordMap(field_map map[string]interface{}) map[string]interface{}

Convert a JSON map from all-maps to arrays where the keys are all ints, and if the final values are a CSV string into an array of strings

func JsonDump

func JsonDump(value interface{}) string

func JsonDumpData

func JsonDumpData(value interface{}) string

func JsonDumpIfValid

func JsonDumpIfValid(value interface{}) (string, error)

func JsonLoadArray

func JsonLoadArray(text string) ([]interface{}, error)

func JsonLoadMap

func JsonLoadMap(text string) (map[string]interface{}, error)

func JsonLoadMapIfValid

func JsonLoadMapIfValid(text *string) (map[string]interface{}, error)

func MapArrayFind

func MapArrayFind(map_array []map[string]interface{}, key string, value interface{}) map[string]interface{}

func MapArrayToMap

func MapArrayToMap(map_array []map[string]interface{}, key string) map[string]interface{}

Take an array of maps, and make a single map, from one of the keys

func MapArrayToToUdnMap

func MapArrayToToUdnMap(map_array []map[string]interface{}, key_key string, value_key string) string

func MapCopy

func MapCopy(input map[string]interface{}) map[string]interface{}

func MapGet

func MapGet(args []interface{}, udn_data interface{}) interface{}

func MapGetKeys

func MapGetKeys(data map[string]interface{}) []string

func MapIndexSet

func MapIndexSet(args []interface{}, input interface{}, udn_data interface{}) interface{}

func MapKeys

func MapKeys(data map[string]interface{}) []string

func MapKeysToUdnMap

func MapKeysToUdnMap(data map[string]interface{}) string

func MapKeysToUdnMapForHtmlSelect

func MapKeysToUdnMapForHtmlSelect(position_location string, data map[string]interface{}) string

func MapListToDict

func MapListToDict(map_array []map[string]interface{}, key string) map[string]interface{}

func MapSet

func MapSet(args []interface{}, input interface{}, udn_data interface{}) interface{}

func MapUpdate

func MapUpdate(source_map map[string]interface{}, update_map map[string]interface{}) map[string]interface{}

func PrettyPrint

func PrettyPrint(data interface{}) string

func ReadPathData

func ReadPathData(path string) string

func SetChildResult

func SetChildResult(parent interface{}, child interface{}, value interface{})

func ShortenString

func ShortenString(value string, size int) string

func SimpleDottedStringToArray

func SimpleDottedStringToArray(arg_str string, separator string) []interface{}

This function takes a string like "some.elements.here", and makes it into a list of ["some", "elements", here"]

func SimpleDottedStringToUdnResultList

func SimpleDottedStringToUdnResultList(arg_str string) list.List

This function takes a string like "some.elements.here", and makes it into a list of ["some", "elements", here"]

func SnippetData

func SnippetData(data interface{}, size int) string

func SprintList

func SprintList(items list.List) string

func SprintMap

func SprintMap(map_data map[string]interface{}) string

func TemplateFromMap

func TemplateFromMap(template_string string, template_map map[string]interface{}) string

func TemplateInterface

func TemplateInterface(template_item interface{}, text string) string

func TemplateMap

func TemplateMap(template_map map[string]interface{}, text string) string

func TemplateShortFromMap

func TemplateShortFromMap(template_string string, template_map map[string]interface{}) string

func UseArgArrayOrFirstArgString

func UseArgArrayOrFirstArgString(args []interface{}) []interface{}

func WritePathData

func WritePathData(path string, text string)

Types

type StringFile

type StringFile struct {
	String string
}

func (*StringFile) Write

func (s *StringFile) Write(ingress []byte) (count int, err error)

type TextTemplateMap

type TextTemplateMap struct {
	Map map[string]interface{}
}

func NewTextTemplateMap

func NewTextTemplateMap() *TextTemplateMap

func NewTextTemplateMapItem

func NewTextTemplateMapItem() TextTemplateMap

Jump to

Keyboard shortcuts

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