func NewOperator(kind string, in, out reflect.Type, f func(ctx context.Context, field string, object interface{}) (interface{}, error)) Operator {
	return &operator{
		kind: kind,
		in:   in,
		out:  out,
		f:    f,
	}
}
NewOperator creates operator by function.
function must has signature:
func f(context.Context, AnyType) (AnyType, error)
AnyType can be any type in go. But struct type and
built-in data type is recommended.
package definition
import (
	"context"
	"fmt"
	"reflect"
)
const (
	MIMEAll         = "*/*"
	MIMENone        = ""
	MIMEText        = "text/plain"
	MIMEHTML        = "text/html"
	MIMEJSON        = "application/json"
	MIMEXML         = "application/xml"
	MIMEOctetStream = "application/octet-stream"
	MIMEURLEncoded  = "application/x-www-form-urlencoded"
	MIMEFormData    = "multipart/form-data"
)
func DataErrorResults(description string) []Result {
	return []Result{
		{
			Destination: Data,
			Description: description,
		},
		{
			Destination: Error,
		},
	}
}
func ParameterFor(source Source, name string, description string, operators ...Operator) Parameter {
	return Parameter{
		Source:      source,
		Name:        name,
		Description: description,
		Operators:   operators,
	}
}
func PathParameterFor(name string, description string, operators ...Operator) Parameter {
	return ParameterFor(Path, name, description, operators...)
}
func QueryParameterFor(name string, description string, operators ...Operator) Parameter {
	return ParameterFor(Query, name, description, operators...)
}
func HeaderParameterFor(name string, description string, operators ...Operator) Parameter {
	return ParameterFor(Header, name, description, operators...)
}
func FormParameterFor(name string, description string, operators ...Operator) Parameter {
	return ParameterFor(Form, name, description, operators...)
}
func FileParameterFor(name string, description string, operators ...Operator) Parameter {
	return ParameterFor(File, name, description, operators...)
}
func BodyParameterFor(description string, operators ...Operator) Parameter {
	return BodyParameterWithNameFor("", description, operators...)
}
func BodyParameterWithNameFor(name string, description string, operators ...Operator) Parameter {
	return ParameterFor(Body, name, description, operators...)
}
func PrefabParameterFor(name string, description string, operators ...Operator) Parameter {
	return ParameterFor(Prefab, name, description, operators...)
}
func AutoParameterFor(description string, operators ...Operator) Parameter {
	return ParameterFor(Auto, "", description, operators...)
}
func ResultFor(dest Destination, description string, operators ...Operator) Result {
	return Result{
		Destination: dest,
		Description: description,
		Operators:   operators,
	}
}
func MetaResultFor(description string, operators ...Operator) Result {
	return ResultFor(Meta, description, operators...)
}
func DataResultFor(description string, operators ...Operator) Result {
	return ResultFor(Data, description, operators...)
}
func ErrorResult() Result {
	return ResultFor(Error, "")
}
func OperatorFunc(kind string, f interface{}) Operator {
	typ := reflect.TypeOf(f)
	if typ.Kind() != reflect.Func {
		panic(fmt.Sprintf("Parameter f in OperatorFunc must be a function, but got: %s", typ.Kind()))
	}
	if typ.NumIn() != 3 {
		panic(fmt.Sprintf("Function must have 3 parameters, but got: %d", typ.NumIn()))
	}
	if typ.In(0) != reflect.TypeOf((*context.Context)(nil)).Elem() {
		panic(fmt.Sprintf("The first parameter of function must be context.Context, but got: %v", typ.In(0)))
	}
	if typ.In(1) != reflect.TypeOf("") {
		panic(fmt.Sprintf("The second parameter of function must be string, but got: %v", typ.In(0)))
	}
	if typ.NumOut() != 2 {
		panic(fmt.Sprintf("Parameter f in OperatorFunc must have two results, but got: %d", typ.NumOut()))
	}
	if typ.Out(1).String() != "error" {
		panic(fmt.Sprintf("The last result of parameter f in OperatorFunc must be error, but got: %v", typ.Out(1)))
	}
	return &operatorRef{
		kind:  kind,
		in:    typ.In(2),
		out:   typ.Out(0),
		value: reflect.ValueOf(f),
	}
}