coding

package
v1.1.2-pre Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package coding 编码相关的包

Index

Constants

View Source
const (
	EmptyAvroSchema = "EMPTY_AVRO_SCHEMA"
)

Variables

This section is empty.

Functions

func ToAvroObj

func ToAvroObj(params []interface{}) interface{}

ToAvroObj 将参数转化为适用于avro的结构

Types

type Coder

type Coder interface {
	Encode(data interface{}) ([]byte, error)
	Decode([]byte) (data interface{}, err error)
	DecodeIn([]byte, interface{}) error
}

Coder 编码器

func NewAvro

func NewAvro(rawSchema string) (c Coder, err error)

NewAvro 使用avro模式创建一个新的coder

type FunInfo

type FunInfo struct {
	Name       string
	InSchema   string
	OutSchema  string
	ParamTyp   []string
	ResultTyp  []string
	HasContext bool
}

FunInfo 函数信息

func Parse

func Parse(mode string, in interface{}, registerFunc []string) (fi []FunInfo, methods []reflect.Method, reSharps [][]ReSharpFunc)

Parse 将一个结构体的函数信息解析

type ReSharpFunc

type ReSharpFunc func(in interface{}) interface{}

Jump to

Keyboard shortcuts

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