coder

package
v0.0.0-...-b363c71 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

encoder for ots2

encoder for ots2

encoder for ots2

Implement call func by name of function

Index

Constants

View Source
const (
	INT32_MAX int32 = 2147483647
	INT32_MIN int32 = -2147483648
)

Variables

View Source
var DebugDecoderEnable = false // 默认关闭
View Source
var DebugEncoderEnable = false // 默认关闭

Functions

func DecodeRequest

func DecodeRequest(api_name string, args ...interface{}) (req []reflect.Value, err error)

request encode for ots2

func EncodeRequest

func EncodeRequest(api_name string, args ...interface{}) (req []reflect.Value, err error)

request encode for ots2

func TestEncoder

func TestEncoder()

simple testing for above encoder functions just for tobyzxj forgot it

Types

type Funcmap

type Funcmap map[string]reflect.Value

func NewFuncmap

func NewFuncmap() Funcmap

Create a new function map

func (Funcmap) Bind

func (f Funcmap) Bind(name string, fn interface{}) (err error)

Bind functon by name

func (Funcmap) Call

func (f Funcmap) Call(name string, args ...interface{}) (result []reflect.Value, err error)

Call function by name

func (Funcmap) Has

func (f Funcmap) Has(name string) bool

Check function map whether has name method specified

Jump to

Keyboard shortcuts

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