Documentation ¶
Index ¶
- func GetKind(name string) configV1.Kind
- func GetObjectNames() []string
- func HasSuffix(s string, suffix ...string) bool
- func ListObjectNames() string
- func ResolveWriter(filename string) (io.WriteCloser, error)
- func Unmarshal(ctx context.Context, filename string, result chan<- *config.ConfigObject) error
- type Formatter
- type MarshalSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetObjectNames ¶
func GetObjectNames() []string
GetObjectNames returns a sorted list of object names.
func ListObjectNames ¶
func ListObjectNames() string
ListObjectNames returns a string with a list of object names.
func ResolveWriter ¶
func ResolveWriter(filename string) (io.WriteCloser, error)
ResolveWriter creates a file and returns an io.Writer for the file. If filename is empty, os.StdOut is returned
Types ¶
type Formatter ¶
type Formatter interface { // WriteRecord writes a record to the formatter. // The input record is guaranteed to be a protobuf message // or the result of parsing a json formatted string into an interface (see https://pkg.go.dev/encoding/json#Unmarshal). WriteRecord(interface{}) error Close() error }
Formatter is the interface for formatters. Formatters should not be instantiated directly, but through the NewFormatter function.
type MarshalSpec ¶
type MarshalSpec struct { ObjectType string Format string Template string // contains filtered or unexported fields }
MarshalSpec is the specification for a formatter
Click to show internal directories.
Click to hide internal directories.