utf8

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TYPE = "utf8"

Variables

This section is empty.

Functions

func AddConfig

func AddConfig(opts flagsets.ConfigOptions, config flagsets.Config) error

func FormattedJson added in v0.4.0

func FormattedJson(raw []byte) ([]byte, error)

func Json added in v0.4.0

func Json(raw []byte) ([]byte, error)

func Plain added in v0.4.0

func Plain(data []byte) ([]byte, error)

func Prepare added in v0.4.0

func Prepare(raw []byte) (interface{}, error)

func Yaml added in v0.4.0

func Yaml(raw []byte) ([]byte, error)

Types

type OutputFormat added in v0.4.0

type OutputFormat func(data []byte) ([]byte, error)

type Spec

type Spec struct {
	inputs.InputSpecBase `json:",inline"`
	cpi.ProcessSpec      `json:",inline"`

	// Text is an utf8 string
	Text          string          `json:"text,omitempty"`
	Json          json.RawMessage `json:"json,omitempty"`
	FormattedJson json.RawMessage `json:"formattedJson,omitempty"`
	Yaml          json.RawMessage `json:"yaml,omitempty"`
}

func New

func New(text string, mediatype string, compress bool) *Spec

func NewFormattedJson added in v0.4.0

func NewFormattedJson(data interface{}, mediatype string, compress bool) (*Spec, error)

func NewJson added in v0.4.0

func NewJson(data interface{}, mediatype string, compress bool) (*Spec, error)

func NewYaml added in v0.4.0

func NewYaml(data interface{}, mediatype string, compress bool) (*Spec, error)

func (*Spec) GetBlob

func (*Spec) Validate

func (s *Spec) Validate(fldPath *field.Path, ctx inputs.Context, inputFilePath string) field.ErrorList

Jump to

Keyboard shortcuts

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