internal

package
v0.13.0-nightly.20250124 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectorTypeToString

func ConnectorTypeToString(connectorType apiv1.Connector_Type) string

ConnectorTypeToString returns a human-readable string from a connector type

func DisplayConfigParams

func DisplayConfigParams(cfg map[string]*configv1.Parameter)

func DisplayConnectorConfig

func DisplayConnectorConfig(cfg *apiv1.Connector_Config, indentation int)

DisplayConnectorConfig prints the connector config in a human-readable format

func DisplayProcessors

func DisplayProcessors(processors []*apiv1.Processor, indent int)

DisplayProcessors prints the processors in a human-readable format

func FormatLongString

func FormatLongString(paragraph string, maxLineLength int) string

FormatLongString splits a string into multiple lines depending on the maxLineLength.

func Indentation

func Indentation(level int) string

Indentation returns a string with the number of spaces equal to the level

func IsEmpty

func IsEmpty(s string) bool

IsEmpty checks if a string is empty

func PrettyProtoEnum

func PrettyProtoEnum(prefix, protoEnum string) string

PrettyProtoEnum returns a human-readable string from a proto enum

func PrintStatusFromProtoString

func PrintStatusFromProtoString(protoStatus string) string

PrintStatusFromProtoString returns a human-readable status from a proto status

func PrintTime

func PrintTime(ts *timestamppb.Timestamp) string

PrintTime returns a human-readable time from a timestamp

func ProcessorParentToString

func ProcessorParentToString(processorParentType apiv1.Processor_Parent_Type) string

ProcessorParentToString returns a human-readable string from a processor parent type

Types

type YAMLTree

type YAMLTree struct {
	Root *yaml.Node
}

YAMLTree represents a YAML document. It makes it possible to insert value nodes with comments.

func NewYAMLTree

func NewYAMLTree() *YAMLTree

func (*YAMLTree) Insert

func (t *YAMLTree) Insert(path, value, comment string)

Insert adds a path with a value to the tree

Jump to

Keyboard shortcuts

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