json

package
v0.0.0-...-2873e01 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownResource        = fmt.Errorf("unknown resource")
	ErrResourceStateUndefined = fmt.Errorf("undefined resource state")
)

Functions

func Decoder

func Decoder() *decoder

Decoder initializes and returns a fresh JSON decoder

We'll only do jsonl for now -- for record importing. We'll expand this to work with other resources later on.

func NewBulkRecordEncoder

func NewBulkRecordEncoder(cfg *EncoderConfig) envoy.PrepareEncodeStreamer

Types

type EncoderConfig

type EncoderConfig struct {
	// Timezone defines what timezone should be used when encoding timestamps
	//
	// If not defined, UTC is used
	Timezone string
	// TimeLayout defines how to format the encoded timestamp
	//
	// If not defined, RFC3339 is used (this one - 2006-01-02T15:04:05Z07:00)
	TimeLayout string
	// Fields specifies what fields we wish to include in the export
	Fields map[string]bool
}

EncoderConfig allows us to configure the resource encoding process

Jump to

Keyboard shortcuts

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