encoding

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encoders

func Encoders() map[string]types.Encoder

Encoders returns all available encoders

func XmlProlog

func XmlProlog() string

Types

type FormDataEncode

type FormDataEncode struct {
}

FormDataEncode groups multipart/form-data features

func (*FormDataEncode) EnocdeParameter

func (f *FormDataEncode) EnocdeParameter(name string, value interface{}) (string, error)

EnocdeParameter encodes the given parameter and its value to multipart/form-data

func (*FormDataEncode) EnocdeValue

func (f *FormDataEncode) EnocdeValue(ref string, value interface{}, meta *types.FormattingMeta) (string, error)

EnocdeValue encodes a single value to amultipart/form-data

type JSONEncode

type JSONEncode struct {
}

JSONEncode groups json features

func (*JSONEncode) EnocdeParameter

func (j *JSONEncode) EnocdeParameter(name string, value interface{}) (string, error)

EnocdeParameter encodes the given parameter and its value to json

func (*JSONEncode) EnocdeValue

func (j *JSONEncode) EnocdeValue(ref string, value interface{}, meta *types.FormattingMeta) (string, error)

EnocdeValue encodes a single value to json

type PhpEncode

type PhpEncode struct {
}

PhpEncode groups json features for php

func (*PhpEncode) EnocdeParameter

func (j *PhpEncode) EnocdeParameter(name string, value interface{}) (string, error)

EnocdeParameter encodes the given parameter and its value to json

func (*PhpEncode) EnocdeValue

func (j *PhpEncode) EnocdeValue(ref string, value interface{}, meta *types.FormattingMeta) (string, error)

EnocdeValue encodes a single value to a php json object

type URLEncode

type URLEncode struct {
}

URLEncode groups urlencoding features

func (*URLEncode) EnocdeParameter

func (u *URLEncode) EnocdeParameter(name string, value interface{}) (string, error)

EnocdeParameter encodes the given parameter and its value to application/x-www-form-urlencoded

func (*URLEncode) EnocdeValue

func (u *URLEncode) EnocdeValue(ref string, value interface{}, meta *types.FormattingMeta) (string, error)

EnocdeValue encodes a single value to application/x-www-form-urlencoded

type XMLEncode

type XMLEncode struct {
}

XMLEncode groups xml encoding features

func (*XMLEncode) EnocdeParameter

func (x *XMLEncode) EnocdeParameter(name string, value interface{}) (string, error)

EnocdeParameter encodes the given parameter and its value to xml

func (*XMLEncode) EnocdeValue

func (x *XMLEncode) EnocdeValue(ref string, value interface{}, meta *types.FormattingMeta) (string, error)

EnocdeValue encodes a single value to xml

Jump to

Keyboard shortcuts

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