encoding

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 7

Documentation

Overview

encoding is a package of default encodings supplied with mimic.

Each of the encodings match the following func declaration: ``` func XXX(in interface{}) io.Reader { ```

Encodings are called when generating the desired output for a configuration.

Additional encoders should return `io.Reader` and can be imported directly into the configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GhodssYAML

func GhodssYAML(in ...interface{}) io.Reader

GhodssYAML returns reader that encodes anything to YAML using github.com/ghodss/yaml. Recommended for e.g: * Kubernetes

func HCL

func HCL(in interface{}) io.Reader

func JSON

func JSON(in interface{}) io.Reader

JSON returns reader that encodes anything to JSON.

func YAML

func YAML(in ...interface{}) io.Reader

YAML returns reader that encodes anything to YAML using gopkg.in/yaml.v2. Desired for e.g: * Prometheus, Alertmanager configuration

Types

type MarshalFunc

type MarshalFunc func(o interface{}) ([]byte, error)

Jump to

Keyboard shortcuts

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