test

package
v0.0.0-...-e7cdcf3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Code generated by github.com/darmawan01/toldata. DO NOT EDIT. package: cdl.toldatatest source: toldata_test.proto

Code generated by github.com/darmawan01/toldata. DO NOT EDIT. package: cdl.toldatatest source: toldata_test.proto

Index

Constants

View Source
const (
	TestService_GetTestA_FullMethodName       = "/cdl.toldatatest.TestService/GetTestA"
	TestService_GetTestAB_FullMethodName      = "/cdl.toldatatest.TestService/GetTestAB"
	TestService_GetTestGetIP_FullMethodName   = "/cdl.toldatatest.TestService/GetTestGetIP"
	TestService_FeedData_FullMethodName       = "/cdl.toldatatest.TestService/FeedData"
	TestService_StreamData_FullMethodName     = "/cdl.toldatatest.TestService/StreamData"
	TestService_StreamDataAlt1_FullMethodName = "/cdl.toldatatest.TestService/StreamDataAlt1"
	TestService_TestEmpty_FullMethodName      = "/cdl.toldatatest.TestService/TestEmpty"
)

Variables

View Source
var (
	// optional string rest_mount = 999999;
	E_RestMount = &file_toldata_test_proto_extTypes[0]
)

Extension fields to descriptorpb.ServiceOptions.

View Source
var File_toldata_test_proto protoreflect.FileDescriptor
View Source
var TestService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cdl.toldatatest.TestService",
	HandlerType: (*TestServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTestA",
			Handler:    _TestService_GetTestA_Handler,
		},
		{
			MethodName: "GetTestAB",
			Handler:    _TestService_GetTestAB_Handler,
		},
		{
			MethodName: "GetTestGetIP",
			Handler:    _TestService_GetTestGetIP_Handler,
		},
		{
			MethodName: "TestEmpty",
			Handler:    _TestService_TestEmpty_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "FeedData",
			Handler:       _TestService_FeedData_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "StreamData",
			Handler:       _TestService_StreamData_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "StreamDataAlt1",
			Handler:       _TestService_StreamDataAlt1_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "toldata_test.proto",
}

TestService_ServiceDesc is the grpc.ServiceDesc for TestService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterTestServiceServer

func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer)

Types

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type FeedDataRequest

type FeedDataRequest struct {
	Data int64 `protobuf:"varint,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*FeedDataRequest) Descriptor deprecated

func (*FeedDataRequest) Descriptor() ([]byte, []int)

Deprecated: Use FeedDataRequest.ProtoReflect.Descriptor instead.

func (*FeedDataRequest) GetData

func (x *FeedDataRequest) GetData() int64

func (*FeedDataRequest) ProtoMessage

func (*FeedDataRequest) ProtoMessage()

func (*FeedDataRequest) ProtoReflect

func (x *FeedDataRequest) ProtoReflect() protoreflect.Message

func (*FeedDataRequest) Reset

func (x *FeedDataRequest) Reset()

func (*FeedDataRequest) String

func (x *FeedDataRequest) String() string

type FeedDataResponse

type FeedDataResponse struct {
	Sum int64 `protobuf:"varint,1,opt,name=sum,proto3" json:"sum,omitempty"`
	// contains filtered or unexported fields
}

func (*FeedDataResponse) Descriptor deprecated

func (*FeedDataResponse) Descriptor() ([]byte, []int)

Deprecated: Use FeedDataResponse.ProtoReflect.Descriptor instead.

func (*FeedDataResponse) GetSum

func (x *FeedDataResponse) GetSum() int64

func (*FeedDataResponse) ProtoMessage

func (*FeedDataResponse) ProtoMessage()

func (*FeedDataResponse) ProtoReflect

func (x *FeedDataResponse) ProtoReflect() protoreflect.Message

func (*FeedDataResponse) Reset

func (x *FeedDataResponse) Reset()

func (*FeedDataResponse) String

func (x *FeedDataResponse) String() string

type Fixtures

type Fixtures interface {
	SetTime(t time.Time)
	GetTime() time.Time
	SetValue(s string)
	GetValue() string
	SetCounter(s string)
	GetCounter(s string) int
	SetData(data int64)
	GetData() int64
}

Interface for injecting testing fixtures

type StreamDataRequest

type StreamDataRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamDataRequest) Descriptor deprecated

func (*StreamDataRequest) Descriptor() ([]byte, []int)

Deprecated: Use StreamDataRequest.ProtoReflect.Descriptor instead.

func (*StreamDataRequest) GetId

func (x *StreamDataRequest) GetId() int64

func (*StreamDataRequest) ProtoMessage

func (*StreamDataRequest) ProtoMessage()

func (*StreamDataRequest) ProtoReflect

func (x *StreamDataRequest) ProtoReflect() protoreflect.Message

func (*StreamDataRequest) Reset

func (x *StreamDataRequest) Reset()

func (*StreamDataRequest) String

func (x *StreamDataRequest) String() string

type StreamDataResponse

type StreamDataResponse struct {
	Data int64 `protobuf:"varint,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamDataResponse) Descriptor deprecated

func (*StreamDataResponse) Descriptor() ([]byte, []int)

Deprecated: Use StreamDataResponse.ProtoReflect.Descriptor instead.

func (*StreamDataResponse) GetData

func (x *StreamDataResponse) GetData() int64

func (*StreamDataResponse) ProtoMessage

func (*StreamDataResponse) ProtoMessage()

func (*StreamDataResponse) ProtoReflect

func (x *StreamDataResponse) ProtoReflect() protoreflect.Message

func (*StreamDataResponse) Reset

func (x *StreamDataResponse) Reset()

func (*StreamDataResponse) String

func (x *StreamDataResponse) String() string

type TestARequest

type TestARequest struct {
	Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
	Id    int64  `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*TestARequest) Descriptor deprecated

func (*TestARequest) Descriptor() ([]byte, []int)

Deprecated: Use TestARequest.ProtoReflect.Descriptor instead.

func (*TestARequest) GetId

func (x *TestARequest) GetId() int64

func (*TestARequest) GetInput

func (x *TestARequest) GetInput() string

func (*TestARequest) ProtoMessage

func (*TestARequest) ProtoMessage()

func (*TestARequest) ProtoReflect

func (x *TestARequest) ProtoReflect() protoreflect.Message

func (*TestARequest) Reset

func (x *TestARequest) Reset()

func (*TestARequest) String

func (x *TestARequest) String() string

type TestAResponse

type TestAResponse struct {
	Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"`
	Id     int64  `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*TestAResponse) Descriptor deprecated

func (*TestAResponse) Descriptor() ([]byte, []int)

Deprecated: Use TestAResponse.ProtoReflect.Descriptor instead.

func (*TestAResponse) GetId

func (x *TestAResponse) GetId() int64

func (*TestAResponse) GetOutput

func (x *TestAResponse) GetOutput() string

func (*TestAResponse) ProtoMessage

func (*TestAResponse) ProtoMessage()

func (*TestAResponse) ProtoReflect

func (x *TestAResponse) ProtoReflect() protoreflect.Message

func (*TestAResponse) Reset

func (x *TestAResponse) Reset()

func (*TestAResponse) String

func (x *TestAResponse) String() string

type TestGetIPResponse

type TestGetIPResponse struct {
	Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*TestGetIPResponse) Descriptor deprecated

func (*TestGetIPResponse) Descriptor() ([]byte, []int)

Deprecated: Use TestGetIPResponse.ProtoReflect.Descriptor instead.

func (*TestGetIPResponse) GetIp

func (x *TestGetIPResponse) GetIp() string

func (*TestGetIPResponse) ProtoMessage

func (*TestGetIPResponse) ProtoMessage()

func (*TestGetIPResponse) ProtoReflect

func (x *TestGetIPResponse) ProtoReflect() protoreflect.Message

func (*TestGetIPResponse) Reset

func (x *TestGetIPResponse) Reset()

func (*TestGetIPResponse) String

func (x *TestGetIPResponse) String() string

type TestServiceClient

type TestServiceClient interface {
	GetTestA(ctx context.Context, in *TestARequest, opts ...grpc.CallOption) (*TestAResponse, error)
	GetTestAB(ctx context.Context, in *TestARequest, opts ...grpc.CallOption) (*TestAResponse, error)
	GetTestGetIP(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TestGetIPResponse, error)
	FeedData(ctx context.Context, opts ...grpc.CallOption) (TestService_FeedDataClient, error)
	StreamData(ctx context.Context, in *StreamDataRequest, opts ...grpc.CallOption) (TestService_StreamDataClient, error)
	StreamDataAlt1(ctx context.Context, in *StreamDataRequest, opts ...grpc.CallOption) (TestService_StreamDataAlt1Client, error)
	TestEmpty(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}

TestServiceClient is the client API for TestService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type TestServiceGRPC

type TestServiceGRPC struct {
	UnimplementedTestServiceServer
	Context context.Context
	Bus     *toldata.Bus
	Service *TestServiceToldataClient
}

func NewTestServiceGRPC

func NewTestServiceGRPC(ctx context.Context, config toldata.ServiceConfiguration) (*TestServiceGRPC, error)

func (*TestServiceGRPC) Close

func (svc *TestServiceGRPC) Close()

func (*TestServiceGRPC) FeedData

func (svc *TestServiceGRPC) FeedData(stream TestService_FeedDataServer) error

func (*TestServiceGRPC) GetTestA

func (svc *TestServiceGRPC) GetTestA(ctx context.Context, req *TestARequest) (*TestAResponse, error)

func (*TestServiceGRPC) GetTestAB

func (svc *TestServiceGRPC) GetTestAB(ctx context.Context, req *TestARequest) (*TestAResponse, error)

func (*TestServiceGRPC) GetTestGetIP

func (svc *TestServiceGRPC) GetTestGetIP(ctx context.Context, req *Empty) (*TestGetIPResponse, error)

func (*TestServiceGRPC) StreamData

func (*TestServiceGRPC) StreamDataAlt1

func (svc *TestServiceGRPC) StreamDataAlt1(req *StreamDataRequest, stream TestService_StreamDataAlt1Server) error

func (*TestServiceGRPC) TestEmpty

func (svc *TestServiceGRPC) TestEmpty(ctx context.Context, req *Empty) (*Empty, error)

type TestServiceREST

type TestServiceREST struct {
	Context context.Context
	Bus     *toldata.Bus
	Service *TestServiceToldataClient
}

func NewTestServiceREST

func NewTestServiceREST(ctx context.Context, config toldata.ServiceConfiguration) (*TestServiceREST, error)

func (*TestServiceREST) InstallTestServiceMux

func (svc *TestServiceREST) InstallTestServiceMux(mux *http.ServeMux)

type TestServiceServer

type TestServiceServer interface {
	GetTestA(context.Context, *TestARequest) (*TestAResponse, error)
	GetTestAB(context.Context, *TestARequest) (*TestAResponse, error)
	GetTestGetIP(context.Context, *Empty) (*TestGetIPResponse, error)
	FeedData(TestService_FeedDataServer) error
	StreamData(*StreamDataRequest, TestService_StreamDataServer) error
	StreamDataAlt1(*StreamDataRequest, TestService_StreamDataAlt1Server) error
	TestEmpty(context.Context, *Empty) (*Empty, error)
	// contains filtered or unexported methods
}

TestServiceServer is the server API for TestService service. All implementations must embed UnimplementedTestServiceServer for forward compatibility

type TestServiceToldataClient

type TestServiceToldataClient struct {
	Bus *toldata.Bus
}

func NewTestServiceToldataClient

func NewTestServiceToldataClient(bus *toldata.Bus) *TestServiceToldataClient

func (*TestServiceToldataClient) FeedData

func (*TestServiceToldataClient) GetTestA

func (service *TestServiceToldataClient) GetTestA(ctx context.Context, req *TestARequest) (*TestAResponse, error)

func (*TestServiceToldataClient) GetTestAB

func (service *TestServiceToldataClient) GetTestAB(ctx context.Context, req *TestARequest) (*TestAResponse, error)

func (*TestServiceToldataClient) GetTestGetIP

func (service *TestServiceToldataClient) GetTestGetIP(ctx context.Context, req *Empty) (*TestGetIPResponse, error)

func (*TestServiceToldataClient) StreamData

func (*TestServiceToldataClient) StreamDataAlt1

func (*TestServiceToldataClient) TestEmpty

func (service *TestServiceToldataClient) TestEmpty(ctx context.Context, req *Empty) (*Empty, error)

func (*TestServiceToldataClient) ToldataHealthCheck

func (service *TestServiceToldataClient) ToldataHealthCheck(ctx context.Context, req *toldata.Empty) (*toldata.ToldataHealthCheckInfo, error)

type TestServiceToldataClient_FeedData

type TestServiceToldataClient_FeedData struct {
	Context context.Context
	Service *TestServiceToldataClient
	ID      string
}

func (*TestServiceToldataClient_FeedData) Done

func (*TestServiceToldataClient_FeedData) Send

type TestServiceToldataClient_StreamData

type TestServiceToldataClient_StreamData struct {
	Context context.Context
	Service *TestServiceToldataClient
	ID      string
}

func (*TestServiceToldataClient_StreamData) Done

func (*TestServiceToldataClient_StreamData) Receive

type TestServiceToldataClient_StreamDataAlt1

type TestServiceToldataClient_StreamDataAlt1 struct {
	Context context.Context
	Service *TestServiceToldataClient
	ID      string
}

func (*TestServiceToldataClient_StreamDataAlt1) Done

func (*TestServiceToldataClient_StreamDataAlt1) Receive

type TestServiceToldataInterface

type TestServiceToldataInterface interface {
	ToldataHealthCheck(ctx context.Context, req *toldata.Empty) (*toldata.ToldataHealthCheckInfo, error)

	GetTestA(ctx context.Context, req *TestARequest) (*TestAResponse, error)

	GetTestAB(ctx context.Context, req *TestARequest) (*TestAResponse, error)

	GetTestGetIP(ctx context.Context, req *Empty) (*TestGetIPResponse, error)

	FeedData(stream TestService_FeedDataToldataServer)

	StreamData(req *StreamDataRequest, stream TestService_StreamDataToldataServer) error

	StreamDataAlt1(req *StreamDataRequest, stream TestService_StreamDataAlt1ToldataServer) error

	TestEmpty(ctx context.Context, req *Empty) (*Empty, error)
}

type TestServiceToldataServer

type TestServiceToldataServer struct {
	Bus     *toldata.Bus
	Service TestServiceToldataInterface
}

func NewTestServiceToldataServer

func NewTestServiceToldataServer(bus *toldata.Bus, service TestServiceToldataInterface) *TestServiceToldataServer

func (*TestServiceToldataServer) SubscribeTestService

func (service *TestServiceToldataServer) SubscribeTestService() (<-chan struct{}, error)

type TestService_FeedDataClient

type TestService_FeedDataClient interface {
	Send(*FeedDataRequest) error
	CloseAndRecv() (*FeedDataResponse, error)
	grpc.ClientStream
}

type TestService_FeedDataServer

type TestService_FeedDataServer interface {
	SendAndClose(*FeedDataResponse) error
	Recv() (*FeedDataRequest, error)
	grpc.ServerStream
}

type TestService_FeedDataToldataServer

type TestService_FeedDataToldataServer interface {
	Receive() (*FeedDataRequest, error)
	OnData(*FeedDataRequest) error
	Done(resp *FeedDataResponse) error

	GetResponse() (*FeedDataResponse, error)

	TriggerEOF()
	Error(err error)
	OnExit(func())
	Exit()
}

type TestService_FeedDataToldataServerImpl

type TestService_FeedDataToldataServerImpl struct {
	Context context.Context
	// contains filtered or unexported fields
}

func CreateTestService_FeedDataToldataServerImpl

func CreateTestService_FeedDataToldataServerImpl(ctx context.Context) *TestService_FeedDataToldataServerImpl

func (*TestService_FeedDataToldataServerImpl) Cancel

func (*TestService_FeedDataToldataServerImpl) Done

func (*TestService_FeedDataToldataServerImpl) Error

func (*TestService_FeedDataToldataServerImpl) Exit

func (*TestService_FeedDataToldataServerImpl) GetResponse

func (*TestService_FeedDataToldataServerImpl) OnData

func (*TestService_FeedDataToldataServerImpl) OnExit

func (impl *TestService_FeedDataToldataServerImpl) OnExit(fn func())

func (*TestService_FeedDataToldataServerImpl) Receive

func (*TestService_FeedDataToldataServerImpl) Subscribe

func (*TestService_FeedDataToldataServerImpl) TriggerEOF

func (impl *TestService_FeedDataToldataServerImpl) TriggerEOF()

type TestService_StreamDataAlt1Client

type TestService_StreamDataAlt1Client interface {
	Recv() (*StreamDataResponse, error)
	grpc.ClientStream
}

type TestService_StreamDataAlt1Server

type TestService_StreamDataAlt1Server interface {
	Send(*StreamDataResponse) error
	grpc.ServerStream
}

type TestService_StreamDataAlt1ToldataServer

type TestService_StreamDataAlt1ToldataServer interface {
	GetResponse() (*StreamDataResponse, error)

	Send(*StreamDataResponse) error

	TriggerEOF()
	Error(err error)
	OnExit(func())
	Exit()
}

type TestService_StreamDataAlt1ToldataServerImpl

type TestService_StreamDataAlt1ToldataServerImpl struct {
	Context context.Context
	// contains filtered or unexported fields
}

func CreateTestService_StreamDataAlt1ToldataServerImpl

func CreateTestService_StreamDataAlt1ToldataServerImpl(ctx context.Context) *TestService_StreamDataAlt1ToldataServerImpl

func (*TestService_StreamDataAlt1ToldataServerImpl) Cancel

func (*TestService_StreamDataAlt1ToldataServerImpl) Error

func (*TestService_StreamDataAlt1ToldataServerImpl) Exit

func (*TestService_StreamDataAlt1ToldataServerImpl) GetResponse

func (*TestService_StreamDataAlt1ToldataServerImpl) OnExit

func (impl *TestService_StreamDataAlt1ToldataServerImpl) OnExit(fn func())

func (*TestService_StreamDataAlt1ToldataServerImpl) Send

func (*TestService_StreamDataAlt1ToldataServerImpl) Subscribe

func (*TestService_StreamDataAlt1ToldataServerImpl) TriggerEOF

type TestService_StreamDataClient

type TestService_StreamDataClient interface {
	Recv() (*StreamDataResponse, error)
	grpc.ClientStream
}

type TestService_StreamDataServer

type TestService_StreamDataServer interface {
	Send(*StreamDataResponse) error
	grpc.ServerStream
}

type TestService_StreamDataToldataServer

type TestService_StreamDataToldataServer interface {
	GetResponse() (*StreamDataResponse, error)

	Send(*StreamDataResponse) error

	TriggerEOF()
	Error(err error)
	OnExit(func())
	Exit()
}

type TestService_StreamDataToldataServerImpl

type TestService_StreamDataToldataServerImpl struct {
	Context context.Context
	// contains filtered or unexported fields
}

func CreateTestService_StreamDataToldataServerImpl

func CreateTestService_StreamDataToldataServerImpl(ctx context.Context) *TestService_StreamDataToldataServerImpl

func (*TestService_StreamDataToldataServerImpl) Cancel

func (*TestService_StreamDataToldataServerImpl) Error

func (*TestService_StreamDataToldataServerImpl) Exit

func (*TestService_StreamDataToldataServerImpl) GetResponse

func (*TestService_StreamDataToldataServerImpl) OnExit

func (impl *TestService_StreamDataToldataServerImpl) OnExit(fn func())

func (*TestService_StreamDataToldataServerImpl) Send

func (*TestService_StreamDataToldataServerImpl) Subscribe

func (*TestService_StreamDataToldataServerImpl) TriggerEOF

func (impl *TestService_StreamDataToldataServerImpl) TriggerEOF()

type UnimplementedTestServiceServer

type UnimplementedTestServiceServer struct {
}

UnimplementedTestServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTestServiceServer) FeedData

func (UnimplementedTestServiceServer) GetTestA

func (UnimplementedTestServiceServer) GetTestAB

func (UnimplementedTestServiceServer) GetTestGetIP

func (UnimplementedTestServiceServer) StreamData

func (UnimplementedTestServiceServer) StreamDataAlt1

func (UnimplementedTestServiceServer) TestEmpty

type UnsafeTestServiceServer

type UnsafeTestServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TestServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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