// Code generated by gotsrpc https://github.com/foomo/gotsrpc/v2 - DO NOT EDIT. package service import ( io "io" ioutil "io/ioutil" http "net/http" time "time" gotsrpc "github.com/foomo/gotsrpc/v2" ) const ( ServiceGoTSRPCProxyBool = "Bool" ServiceGoTSRPCProxyBoolPtr = "BoolPtr" ServiceGoTSRPCProxyBoolSlice = "BoolSlice" ServiceGoTSRPCProxyFloat32 = "Float32" ServiceGoTSRPCProxyFloat32Map = "Float32Map" ServiceGoTSRPCProxyFloat32Slice = "Float32Slice" ServiceGoTSRPCProxyFloat32Type = "Float32Type" ServiceGoTSRPCProxyFloat32TypeMap = "Float32TypeMap" ServiceGoTSRPCProxyFloat32TypeMapTyped = "Float32TypeMapTyped" ServiceGoTSRPCProxyFloat64 = "Float64" ServiceGoTSRPCProxyFloat64Map = "Float64Map" ServiceGoTSRPCProxyFloat64Slice = "Float64Slice" ServiceGoTSRPCProxyFloat64Type = "Float64Type" ServiceGoTSRPCProxyFloat64TypeMap = "Float64TypeMap" ServiceGoTSRPCProxyFloat64TypeMapTyped = "Float64TypeMapTyped" ServiceGoTSRPCProxyInt = "Int" ServiceGoTSRPCProxyInt32 = "Int32" ServiceGoTSRPCProxyInt32Map = "Int32Map" ServiceGoTSRPCProxyInt32Slice = "Int32Slice" ServiceGoTSRPCProxyInt32Type = "Int32Type" ServiceGoTSRPCProxyInt32TypeMap = "Int32TypeMap" ServiceGoTSRPCProxyInt32TypeMapTyped = "Int32TypeMapTyped" ServiceGoTSRPCProxyInt64 = "Int64" ServiceGoTSRPCProxyInt64Map = "Int64Map" ServiceGoTSRPCProxyInt64Slice = "Int64Slice" ServiceGoTSRPCProxyInt64Type = "Int64Type" ServiceGoTSRPCProxyInt64TypeMap = "Int64TypeMap" ServiceGoTSRPCProxyInt64TypeMapTyped = "Int64TypeMapTyped" ServiceGoTSRPCProxyIntMap = "IntMap" ServiceGoTSRPCProxyIntSlice = "IntSlice" ServiceGoTSRPCProxyIntType = "IntType" ServiceGoTSRPCProxyIntTypeMap = "IntTypeMap" ServiceGoTSRPCProxyIntTypeMapTyped = "IntTypeMapTyped" ServiceGoTSRPCProxyInterface = "Interface" ServiceGoTSRPCProxyInterfaceSlice = "InterfaceSlice" ServiceGoTSRPCProxyString = "String" ServiceGoTSRPCProxyStringMap = "StringMap" ServiceGoTSRPCProxyStringSlice = "StringSlice" ServiceGoTSRPCProxyStringType = "StringType" ServiceGoTSRPCProxyStringTypeMap = "StringTypeMap" ServiceGoTSRPCProxyStringTypeMapTyped = "StringTypeMapTyped" ServiceGoTSRPCProxyStruct = "Struct" ServiceGoTSRPCProxyUInt = "UInt" ServiceGoTSRPCProxyUInt32 = "UInt32" ServiceGoTSRPCProxyUInt32Map = "UInt32Map" ServiceGoTSRPCProxyUInt32Slice = "UInt32Slice" ServiceGoTSRPCProxyUInt32Type = "UInt32Type" ServiceGoTSRPCProxyUInt32TypeMap = "UInt32TypeMap" ServiceGoTSRPCProxyUInt32TypeMapTyped = "UInt32TypeMapTyped" ServiceGoTSRPCProxyUInt64 = "UInt64" ServiceGoTSRPCProxyUInt64Map = "UInt64Map" ServiceGoTSRPCProxyUInt64Slice = "UInt64Slice" ServiceGoTSRPCProxyUInt64Type = "UInt64Type" ServiceGoTSRPCProxyUInt64TypeMap = "UInt64TypeMap" ServiceGoTSRPCProxyUInt64TypeMapTyped = "UInt64TypeMapTyped" ServiceGoTSRPCProxyUIntMap = "UIntMap" ServiceGoTSRPCProxyUIntSlice = "UIntSlice" ServiceGoTSRPCProxyUIntType = "UIntType" ServiceGoTSRPCProxyUIntTypeMap = "UIntTypeMap" ServiceGoTSRPCProxyUIntTypeMapTyped = "UIntTypeMapTyped" ) type ServiceGoTSRPCProxy struct { EndPoint string service Service } func NewDefaultServiceGoTSRPCProxy(service Service) *ServiceGoTSRPCProxy { return NewServiceGoTSRPCProxy(service, "/service") } func NewServiceGoTSRPCProxy(service Service, endpoint string) *ServiceGoTSRPCProxy { return &ServiceGoTSRPCProxy{ EndPoint: endpoint, service: service, } } // ServeHTTP exposes your service func (p *ServiceGoTSRPCProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) { if r.Method != http.MethodPost { if r.Method == http.MethodOptions { return } gotsrpc.ErrorMethodNotAllowed(w) return } defer io.Copy(ioutil.Discard, r.Body) // Drain Request Body funcName := gotsrpc.GetCalledFunc(r, p.EndPoint) callStats := gotsrpc.GetStatsForRequest(r) if callStats != nil { callStats.Func = funcName callStats.Package = "github.com/foomo/gotsrpc/v2/example/basic/service" callStats.Service = "Service" } switch funcName { case ServiceGoTSRPCProxyBool: var ( arg_v bool ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() boolRet := p.service.Bool(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{boolRet}, callStats, r, w) return case ServiceGoTSRPCProxyBoolPtr: var ( arg_v bool ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() boolPtrRet := p.service.BoolPtr(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{boolPtrRet}, callStats, r, w) return case ServiceGoTSRPCProxyBoolSlice: var ( arg_v []bool ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() boolSliceRet := p.service.BoolSlice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{boolSliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat32: var ( arg_v float32 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float32Ret := p.service.Float32(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float32Ret}, callStats, r, w) return case ServiceGoTSRPCProxyFloat32Map: var ( arg_v map[float32]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float32MapRet := p.service.Float32Map(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float32MapRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat32Slice: var ( arg_v []float32 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float32SliceRet := p.service.Float32Slice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float32SliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat32Type: var ( arg_v Float32Type ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float32TypeRet := p.service.Float32Type(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float32TypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat32TypeMap: var ( arg_v map[Float32TypeMapKey]Float32TypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float32TypeMapRet := p.service.Float32TypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float32TypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat32TypeMapTyped: var ( arg_v Float32TypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float32TypeMapTypedRet := p.service.Float32TypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float32TypeMapTypedRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat64: var ( arg_v float64 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float64Ret := p.service.Float64(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float64Ret}, callStats, r, w) return case ServiceGoTSRPCProxyFloat64Map: var ( arg_v map[float64]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float64MapRet := p.service.Float64Map(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float64MapRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat64Slice: var ( arg_v []float64 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float64SliceRet := p.service.Float64Slice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float64SliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat64Type: var ( arg_v Float64Type ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float64TypeRet := p.service.Float64Type(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float64TypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat64TypeMap: var ( arg_v map[Float64TypeMapKey]Float64TypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float64TypeMapRet := p.service.Float64TypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float64TypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyFloat64TypeMapTyped: var ( arg_v Float64TypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() float64TypeMapTypedRet := p.service.Float64TypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{float64TypeMapTypedRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt: var ( arg_v int ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() intRet := p.service.Int(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{intRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt32: var ( arg_v int32 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int32Ret := p.service.Int32(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int32Ret}, callStats, r, w) return case ServiceGoTSRPCProxyInt32Map: var ( arg_v map[int32]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int32MapRet := p.service.Int32Map(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int32MapRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt32Slice: var ( arg_v []int32 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int32SliceRet := p.service.Int32Slice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int32SliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt32Type: var ( arg_v Int32Type ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int32TypeRet := p.service.Int32Type(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int32TypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt32TypeMap: var ( arg_v map[Int32TypeMapKey]Int32TypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int32TypeMapRet := p.service.Int32TypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int32TypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt32TypeMapTyped: var ( arg_v Int32TypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int32TypeMapTypedRet := p.service.Int32TypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int32TypeMapTypedRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt64: var ( arg_v int64 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int64Ret := p.service.Int64(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int64Ret}, callStats, r, w) return case ServiceGoTSRPCProxyInt64Map: var ( arg_v map[int64]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int64MapRet := p.service.Int64Map(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int64MapRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt64Slice: var ( arg_v []int64 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int64SliceRet := p.service.Int64Slice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int64SliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt64Type: var ( arg_v Int64Type ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int64TypeRet := p.service.Int64Type(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int64TypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt64TypeMap: var ( arg_v map[Int64TypeMapKey]Int64TypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int64TypeMapRet := p.service.Int64TypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int64TypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyInt64TypeMapTyped: var ( arg_v Int64TypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() int64TypeMapTypedRet := p.service.Int64TypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{int64TypeMapTypedRet}, callStats, r, w) return case ServiceGoTSRPCProxyIntMap: var ( arg_v map[int]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() intMapRet := p.service.IntMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{intMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyIntSlice: var ( arg_v []int ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() intSliceRet := p.service.IntSlice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{intSliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyIntType: var ( arg_v IntType ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() intTypeRet := p.service.IntType(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{intTypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyIntTypeMap: var ( arg_v map[IntTypeMapKey]IntTypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() intTypeMapRet := p.service.IntTypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{intTypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyIntTypeMapTyped: var ( arg_v IntTypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() intTypeMapTypedRet := p.service.IntTypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{intTypeMapTypedRet}, callStats, r, w) return case ServiceGoTSRPCProxyInterface: var ( arg_v interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() interfaceRet := p.service.Interface(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{interfaceRet}, callStats, r, w) return case ServiceGoTSRPCProxyInterfaceSlice: var ( arg_v []interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() interfaceSliceRet := p.service.InterfaceSlice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{interfaceSliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyString: var ( arg_v string ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() stringRet := p.service.String(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{stringRet}, callStats, r, w) return case ServiceGoTSRPCProxyStringMap: var ( arg_v map[string]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() stringMapRet := p.service.StringMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{stringMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyStringSlice: var ( arg_v []string ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() stringSliceRet := p.service.StringSlice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{stringSliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyStringType: var ( arg_v StringType ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() stringTypeRet := p.service.StringType(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{stringTypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyStringTypeMap: var ( arg_v map[StringTypeMapKey]StringTypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() stringTypeMapRet := p.service.StringTypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{stringTypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyStringTypeMapTyped: var ( arg_v StringTypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() stringTypeMapTypedRet := p.service.StringTypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{stringTypeMapTypedRet}, callStats, r, w) return case ServiceGoTSRPCProxyStruct: var ( arg_v Struct ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() structRet := p.service.Struct(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{structRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt: var ( arg_v uint ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uIntRet := p.service.UInt(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uIntRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt32: var ( arg_v uint32 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt32Ret := p.service.UInt32(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt32Ret}, callStats, r, w) return case ServiceGoTSRPCProxyUInt32Map: var ( arg_v map[uint32]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt32MapRet := p.service.UInt32Map(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt32MapRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt32Slice: var ( arg_v []uint32 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt32SliceRet := p.service.UInt32Slice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt32SliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt32Type: var ( arg_v UInt32Type ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt32TypeRet := p.service.UInt32Type(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt32TypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt32TypeMap: var ( arg_v map[UInt32TypeMapKey]UInt32TypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt32TypeMapRet := p.service.UInt32TypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt32TypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt32TypeMapTyped: var ( arg_v UInt32TypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt32TypeMapTypedRet := p.service.UInt32TypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt32TypeMapTypedRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt64: var ( arg_v uint64 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt64Ret := p.service.UInt64(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt64Ret}, callStats, r, w) return case ServiceGoTSRPCProxyUInt64Map: var ( arg_v map[uint64]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt64MapRet := p.service.UInt64Map(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt64MapRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt64Slice: var ( arg_v []uint64 ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt64SliceRet := p.service.UInt64Slice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt64SliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt64Type: var ( arg_v UInt64Type ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt64TypeRet := p.service.UInt64Type(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt64TypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt64TypeMap: var ( arg_v map[UInt64TypeMapKey]UInt64TypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt64TypeMapRet := p.service.UInt64TypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt64TypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyUInt64TypeMapTyped: var ( arg_v UInt64TypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uInt64TypeMapTypedRet := p.service.UInt64TypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uInt64TypeMapTypedRet}, callStats, r, w) return case ServiceGoTSRPCProxyUIntMap: var ( arg_v map[uint]interface{} ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uIntMapRet := p.service.UIntMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uIntMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyUIntSlice: var ( arg_v []uint ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uIntSliceRet := p.service.UIntSlice(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uIntSliceRet}, callStats, r, w) return case ServiceGoTSRPCProxyUIntType: var ( arg_v UIntType ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uIntTypeRet := p.service.UIntType(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uIntTypeRet}, callStats, r, w) return case ServiceGoTSRPCProxyUIntTypeMap: var ( arg_v map[UIntTypeMapKey]UIntTypeMapValue ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uIntTypeMapRet := p.service.UIntTypeMap(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uIntTypeMapRet}, callStats, r, w) return case ServiceGoTSRPCProxyUIntTypeMapTyped: var ( arg_v UIntTypeMapTyped ) args := []interface{}{&arg_v} err := gotsrpc.LoadArgs(&args, callStats, r) if err != nil { gotsrpc.ErrorCouldNotLoadArgs(w) return } executionStart := time.Now() uIntTypeMapTypedRet := p.service.UIntTypeMapTyped(arg_v) if callStats != nil { callStats.Execution = time.Now().Sub(executionStart) } gotsrpc.Reply([]interface{}{uIntTypeMapTypedRet}, callStats, r, w) return default: gotsrpc.ClearStats(r) http.Error(w, "404 - not found "+r.URL.Path, http.StatusNotFound) } }