コード例 #1
0
ファイル: test.capnp.go プロジェクト: hodduc/go-capnproto2
func (c Echoer) GetCallSequence(ctx context.Context, params func(CallOrder_getCallSequence_Params) error, opts ...capnp.CallOption) CallOrder_getCallSequence_Results_Promise {
	if c.Client == nil {
		return CallOrder_getCallSequence_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	return CallOrder_getCallSequence_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{

			InterfaceID:   0x92c5ca8314cdd2a5,
			MethodID:      0,
			InterfaceName: "test.capnp:CallOrder",
			MethodName:    "getCallSequence",
		},
		ParamsSize: capnp.ObjectSize{DataSize: 8, PointerCount: 0},
		ParamsFunc: func(s capnp.Struct) error { return params(CallOrder_getCallSequence_Params{Struct: s}) },
		Options:    capnp.NewCallOptions(opts),
	}))}
}
コード例 #2
0
ファイル: test.capnp.go プロジェクト: hodduc/go-capnproto2
func (c Adder) Add(ctx context.Context, params func(Adder_add_Params) error, opts ...capnp.CallOption) Adder_add_Results_Promise {
	if c.Client == nil {
		return Adder_add_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	return Adder_add_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{

			InterfaceID:   0x8f9cac550b1bf41f,
			MethodID:      0,
			InterfaceName: "test.capnp:Adder",
			MethodName:    "add",
		},
		ParamsSize: capnp.ObjectSize{DataSize: 8, PointerCount: 0},
		ParamsFunc: func(s capnp.Struct) error { return params(Adder_add_Params{Struct: s}) },
		Options:    capnp.NewCallOptions(opts),
	}))}
}
コード例 #3
0
ファイル: test.capnp.go プロジェクト: hodduc/go-capnproto2
func (c HandleFactory) NewHandle(ctx context.Context, params func(HandleFactory_newHandle_Params) error, opts ...capnp.CallOption) HandleFactory_newHandle_Results_Promise {
	if c.Client == nil {
		return HandleFactory_newHandle_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	return HandleFactory_newHandle_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{

			InterfaceID:   0x8491a7fe75fe0bce,
			MethodID:      0,
			InterfaceName: "test.capnp:HandleFactory",
			MethodName:    "newHandle",
		},
		ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
		ParamsFunc: func(s capnp.Struct) error { return params(HandleFactory_newHandle_Params{Struct: s}) },
		Options:    capnp.NewCallOptions(opts),
	}))}
}
コード例 #4
0
ファイル: test.capnp.go プロジェクト: hodduc/go-capnproto2
func (c Echoer) Echo(ctx context.Context, params func(Echoer_echo_Params) error, opts ...capnp.CallOption) Echoer_echo_Results_Promise {
	if c.Client == nil {
		return Echoer_echo_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	return Echoer_echo_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{

			InterfaceID:   0x841756c6a41b2a45,
			MethodID:      0,
			InterfaceName: "test.capnp:Echoer",
			MethodName:    "echo",
		},
		ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 1},
		ParamsFunc: func(s capnp.Struct) error { return params(Echoer_echo_Params{Struct: s}) },
		Options:    capnp.NewCallOptions(opts),
	}))}
}
コード例 #5
0
ファイル: hash.capnp.go プロジェクト: hodduc/go-capnproto2
func (c Hash) Sum(ctx context.Context, params func(Hash_sum_Params) error, opts ...capnp.CallOption) Hash_sum_Results_Promise {
	if c.Client == nil {
		return Hash_sum_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	return Hash_sum_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{

			InterfaceID:   0xf29f97dd675a9431,
			MethodID:      1,
			InterfaceName: "hash.capnp:Hash",
			MethodName:    "sum",
		},
		ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
		ParamsFunc: func(s capnp.Struct) error { return params(Hash_sum_Params{Struct: s}) },
		Options:    capnp.NewCallOptions(opts),
	}))}
}
コード例 #6
0
ファイル: test.capnp.go プロジェクト: hodduc/go-capnproto2
func (c Hanger) Hang(ctx context.Context, params func(Hanger_hang_Params) error, opts ...capnp.CallOption) Hanger_hang_Results_Promise {
	if c.Client == nil {
		return Hanger_hang_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	return Hanger_hang_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{

			InterfaceID:   0x8ae08044aae8a26e,
			MethodID:      0,
			InterfaceName: "test.capnp:Hanger",
			MethodName:    "hang",
		},
		ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
		ParamsFunc: func(s capnp.Struct) error { return params(Hanger_hang_Params{Struct: s}) },
		Options:    capnp.NewCallOptions(opts),
	}))}
}
コード例 #7
0
ファイル: hash.capnp.go プロジェクト: hodduc/go-capnproto2
func (c HashFactory) NewSha1(ctx context.Context, params func(HashFactory_newSha1_Params) error, opts ...capnp.CallOption) HashFactory_newSha1_Results_Promise {
	if c.Client == nil {
		return HashFactory_newSha1_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	return HashFactory_newSha1_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(&capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{

			InterfaceID:   0xaead580f97fddabc,
			MethodID:      0,
			InterfaceName: "hash.capnp:HashFactory",
			MethodName:    "newSha1",
		},
		ParamsSize: capnp.ObjectSize{DataSize: 0, PointerCount: 0},
		ParamsFunc: func(s capnp.Struct) error { return params(HashFactory_newSha1_Params{Struct: s}) },
		Options:    capnp.NewCallOptions(opts),
	}))}
}
コード例 #8
0
ファイル: test.capnp.go プロジェクト: zombiezen/go-capnproto2
func (c PingPong) EchoNum(ctx context.Context, params func(PingPong_echoNum_Params) error, opts ...capnp.CallOption) PingPong_echoNum_Results_Promise {
	if c.Client == nil {
		return PingPong_echoNum_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	call := &capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{
			InterfaceID:   0xf004c474c2f8ee7a,
			MethodID:      0,
			InterfaceName: "test.capnp:PingPong",
			MethodName:    "echoNum",
		},
		Options: capnp.NewCallOptions(opts),
	}
	if params != nil {
		call.ParamsSize = capnp.ObjectSize{DataSize: 8, PointerCount: 0}
		call.ParamsFunc = func(s capnp.Struct) error { return params(PingPong_echoNum_Params{Struct: s}) }
	}
	return PingPong_echoNum_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
コード例 #9
0
ファイル: hash.capnp.go プロジェクト: zombiezen/go-capnproto2
func (c Hash) Write(ctx context.Context, params func(Hash_write_Params) error, opts ...capnp.CallOption) Hash_write_Results_Promise {
	if c.Client == nil {
		return Hash_write_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	call := &capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{
			InterfaceID:   0xf29f97dd675a9431,
			MethodID:      0,
			InterfaceName: "hash.capnp:Hash",
			MethodName:    "write",
		},
		Options: capnp.NewCallOptions(opts),
	}
	if params != nil {
		call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 1}
		call.ParamsFunc = func(s capnp.Struct) error { return params(Hash_write_Params{Struct: s}) }
	}
	return Hash_write_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
コード例 #10
0
func (c RealmGateway) Export(ctx context.Context, params func(RealmGateway_export_Params) error, opts ...capnp.CallOption) Persistent_SaveResults_Promise {
	if c.Client == nil {
		return Persistent_SaveResults_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	call := &capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{
			InterfaceID:   0x84ff286cd00a3ed4,
			MethodID:      1,
			InterfaceName: "persistent.capnp:RealmGateway",
			MethodName:    "export",
		},
		Options: capnp.NewCallOptions(opts),
	}
	if params != nil {
		call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 2}
		call.ParamsFunc = func(s capnp.Struct) error { return params(RealmGateway_export_Params{Struct: s}) }
	}
	return Persistent_SaveResults_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
コード例 #11
0
func (c Persistent) Save(ctx context.Context, params func(Persistent_SaveParams) error, opts ...capnp.CallOption) Persistent_SaveResults_Promise {
	if c.Client == nil {
		return Persistent_SaveResults_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	call := &capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{
			InterfaceID:   0xc8cb212fcd9f5691,
			MethodID:      0,
			InterfaceName: "persistent.capnp:Persistent",
			MethodName:    "save",
		},
		Options: capnp.NewCallOptions(opts),
	}
	if params != nil {
		call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 1}
		call.ParamsFunc = func(s capnp.Struct) error { return params(Persistent_SaveParams{Struct: s}) }
	}
	return Persistent_SaveResults_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
コード例 #12
0
ファイル: botapi.capnp.go プロジェクト: bcspragu/Gobots
func (c Ai) TakeTurn(ctx context.Context, params func(Ai_takeTurn_Params) error, opts ...capnp.CallOption) Ai_takeTurn_Results_Promise {
	if c.Client == nil {
		return Ai_takeTurn_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	call := &capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{
			InterfaceID:   0xd403ce7bb5b69f1f,
			MethodID:      0,
			InterfaceName: "botapi.capnp:Ai",
			MethodName:    "takeTurn",
		},
		Options: capnp.NewCallOptions(opts),
	}
	if params != nil {
		call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 1}
		call.ParamsFunc = func(s capnp.Struct) error { return params(Ai_takeTurn_Params{Struct: s}) }
	}
	return Ai_takeTurn_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}
コード例 #13
0
ファイル: botapi.capnp.go プロジェクト: bcspragu/Gobots
func (c AiConnector) Connect(ctx context.Context, params func(ConnectRequest) error, opts ...capnp.CallOption) AiConnector_connect_Results_Promise {
	if c.Client == nil {
		return AiConnector_connect_Results_Promise{Pipeline: capnp.NewPipeline(capnp.ErrorAnswer(capnp.ErrNullClient))}
	}
	call := &capnp.Call{
		Ctx: ctx,
		Method: capnp.Method{
			InterfaceID:   0x9804b41cc3cba212,
			MethodID:      0,
			InterfaceName: "botapi.capnp:AiConnector",
			MethodName:    "connect",
		},
		Options: capnp.NewCallOptions(opts),
	}
	if params != nil {
		call.ParamsSize = capnp.ObjectSize{DataSize: 0, PointerCount: 2}
		call.ParamsFunc = func(s capnp.Struct) error { return params(ConnectRequest{Struct: s}) }
	}
	return AiConnector_connect_Results_Promise{Pipeline: capnp.NewPipeline(c.Client.Call(call))}
}