encoder

package
v1.2.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentType

func ContentType() string

Types

type CsvEncoder

type CsvEncoder struct{}

func NewCsvEncoder

func NewCsvEncoder() *CsvEncoder

func (*CsvEncoder) ContentType

func (*CsvEncoder) ContentType() string

func (*CsvEncoder) Delimiter

func (*CsvEncoder) Delimiter() string

func (*CsvEncoder) End

func (*CsvEncoder) End() string

func (*CsvEncoder) GetSupportedGenerator

func (*CsvEncoder) GetSupportedGenerator() string

func (*CsvEncoder) Marshal

func (e *CsvEncoder) Marshal(v interface{}) ([]byte, error)

func (*CsvEncoder) Start

func (*CsvEncoder) Start() string

type Encoder

type Encoder interface {
	GetSupportedGenerator() string
	ContentType() string
	Start() string
	Marshal(interface{}) ([]byte, error)
	Delimiter() string
	End() string
}

func GetEncoderForPath

func GetEncoderForPath(path string) Encoder

type HclEncoder

type HclEncoder struct{}

func NewHclEncoder

func NewHclEncoder() *HclEncoder

func (*HclEncoder) ContentType

func (*HclEncoder) ContentType() string

func (*HclEncoder) Delimiter

func (*HclEncoder) Delimiter() string

func (*HclEncoder) End

func (*HclEncoder) End() string

func (*HclEncoder) GetSupportedGenerator

func (*HclEncoder) GetSupportedGenerator() string

func (*HclEncoder) Marshal

func (e *HclEncoder) Marshal(v interface{}) ([]byte, error)

func (*HclEncoder) Start

func (*HclEncoder) Start() string

type IniEncoder

type IniEncoder struct{}

func NewIniEncoder

func NewIniEncoder() *IniEncoder

func (*IniEncoder) ContentType

func (*IniEncoder) ContentType() string

func (*IniEncoder) Delimiter

func (*IniEncoder) Delimiter() string

func (*IniEncoder) End

func (*IniEncoder) End() string

func (*IniEncoder) GetSupportedGenerator

func (*IniEncoder) GetSupportedGenerator() string

func (*IniEncoder) Marshal

func (e *IniEncoder) Marshal(v interface{}) ([]byte, error)

func (*IniEncoder) Start

func (*IniEncoder) Start() string

type JsonEncoder

type JsonEncoder struct{}

func NewJsonEncoder

func NewJsonEncoder() *JsonEncoder

func (*JsonEncoder) ContentType

func (*JsonEncoder) ContentType() string

func (*JsonEncoder) Delimiter

func (*JsonEncoder) Delimiter() string

func (*JsonEncoder) End

func (*JsonEncoder) End() string

func (*JsonEncoder) GetSupportedGenerator

func (*JsonEncoder) GetSupportedGenerator() string

func (*JsonEncoder) Marshal

func (e *JsonEncoder) Marshal(v interface{}) ([]byte, error)

func (*JsonEncoder) Start

func (*JsonEncoder) Start() string

type MatchingEncoder

type MatchingEncoder struct {
	// contains filtered or unexported fields
}

type SqlEncoder

type SqlEncoder struct{}

func NewSqlEncoder

func NewSqlEncoder() *SqlEncoder

func (*SqlEncoder) ContentType

func (*SqlEncoder) ContentType() string

func (*SqlEncoder) Delimiter

func (*SqlEncoder) Delimiter() string

func (*SqlEncoder) End

func (*SqlEncoder) End() string

func (*SqlEncoder) GetSupportedGenerator

func (*SqlEncoder) GetSupportedGenerator() string

func (*SqlEncoder) Marshal

func (e *SqlEncoder) Marshal(v interface{}) ([]byte, error)

func (*SqlEncoder) Start

func (*SqlEncoder) Start() string

type TomlEncoder

type TomlEncoder struct{}

func NewTomlEncoder

func NewTomlEncoder() *TomlEncoder

func (*TomlEncoder) ContentType

func (*TomlEncoder) ContentType() string

func (*TomlEncoder) Delimiter

func (*TomlEncoder) Delimiter() string

func (*TomlEncoder) End

func (*TomlEncoder) End() string

func (*TomlEncoder) GetSupportedGenerator

func (*TomlEncoder) GetSupportedGenerator() string

func (*TomlEncoder) Marshal

func (e *TomlEncoder) Marshal(v interface{}) ([]byte, error)

func (*TomlEncoder) Start

func (*TomlEncoder) Start() string

type UnknownMap

type UnknownMap map[string]interface{}

func NewUnknownMap

func NewUnknownMap(data interface{}) UnknownMap

func (UnknownMap) MarshalXML

func (s UnknownMap) MarshalXML(e *xml.Encoder, start xml.StartElement) error

type XmlEncoder

type XmlEncoder struct{}

func NewXmlEncoder

func NewXmlEncoder() *XmlEncoder

func (*XmlEncoder) ContentType

func (*XmlEncoder) ContentType() string

func (*XmlEncoder) Delimiter

func (*XmlEncoder) Delimiter() string

func (*XmlEncoder) End

func (*XmlEncoder) End() string

func (*XmlEncoder) GetSupportedGenerator

func (*XmlEncoder) GetSupportedGenerator() string

func (*XmlEncoder) Marshal

func (e *XmlEncoder) Marshal(v interface{}) ([]byte, error)

func (*XmlEncoder) Start

func (*XmlEncoder) Start() string

type YamlEncoder

type YamlEncoder struct{}

func NewYamlEncoder

func NewYamlEncoder() *YamlEncoder

func (*YamlEncoder) ContentType

func (*YamlEncoder) ContentType() string

func (*YamlEncoder) Delimiter

func (*YamlEncoder) Delimiter() string

func (*YamlEncoder) End

func (*YamlEncoder) End() string

func (*YamlEncoder) GetSupportedGenerator

func (*YamlEncoder) GetSupportedGenerator() string

func (*YamlEncoder) Marshal

func (e *YamlEncoder) Marshal(v interface{}) ([]byte, error)

func (*YamlEncoder) Start

func (*YamlEncoder) Start() string

Jump to

Keyboard shortcuts

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