Documentation ¶
Overview ¶
Package ditto Copyright © 2021 zc2638 <zc2638@qq.com>.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func Marshal(name string, v interface{}) ([]byte, error)
- func Register(name string, m MarshalFunc, um UnmarshalFunc)
- func RegisterED(name string, eFunc EncoderFunc, dFunc DecoderFunc)
- func Unmarshal(name string, data []byte, v interface{}) error
- type Decoder
- type DecoderFunc
- type Encoder
- type EncoderFunc
- type Engine
- type MarshalFunc
- type Transfer
- type UnmarshalFunc
Constants ¶
View Source
const ( FormatJSON = "json" FormatYaml = "yaml" FormatXML = "xml" FormatTOML = "toml" )
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, m MarshalFunc, um UnmarshalFunc)
func RegisterED ¶
func RegisterED(name string, eFunc EncoderFunc, dFunc DecoderFunc)
Types ¶
type DecoderFunc ¶
type EncoderFunc ¶
type MarshalFunc ¶
type Transfer ¶
type Transfer struct {
// contains filtered or unexported fields
}
func NewTransfer ¶
type UnmarshalFunc ¶
Click to show internal directories.
Click to hide internal directories.