v1

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "OK",
		1: "Error",
	}
	Status_value = map[string]int32{
		"OK":    0,
		"Error": 1,
	}
)

Enum value maps for Status.

View Source
var File_api_proto_v1_core_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "init",
			Handler:    _Service_Init_Handler,
		},
		{
			MethodName: "call",
			Handler:    _Service_Call_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/proto/v1/core.proto",
}

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

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type CallRequest

type CallRequest struct {
	Endpoint  string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`   // name of the endpoint
	Arguments string `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"` // arguments as json string
	Fd        string `protobuf:"bytes,3,opt,name=fd,proto3" json:"fd,omitempty"`               // file descriptor where to write call logs
	// contains filtered or unexported fields
}

func (*CallRequest) Descriptor deprecated

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

Deprecated: Use CallRequest.ProtoReflect.Descriptor instead.

func (*CallRequest) GetArguments

func (x *CallRequest) GetArguments() string

func (*CallRequest) GetEndpoint

func (x *CallRequest) GetEndpoint() string

func (*CallRequest) GetFd

func (x *CallRequest) GetFd() string

func (*CallRequest) ProtoMessage

func (*CallRequest) ProtoMessage()

func (*CallRequest) ProtoReflect added in v0.92.0

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

func (*CallRequest) Reset

func (x *CallRequest) Reset()

func (*CallRequest) String

func (x *CallRequest) String() string

type CallResponse

type CallResponse struct {
	Status  Status `protobuf:"varint,1,opt,name=status,proto3,enum=v1.Status" json:"status,omitempty"` // call flow status
	Error   string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`                   // error message
	Payload string `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`               // response payload encoded json
	// contains filtered or unexported fields
}

func (*CallResponse) Descriptor deprecated

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

Deprecated: Use CallResponse.ProtoReflect.Descriptor instead.

func (*CallResponse) GetError

func (x *CallResponse) GetError() string

func (*CallResponse) GetPayload

func (x *CallResponse) GetPayload() string

func (*CallResponse) GetStatus

func (x *CallResponse) GetStatus() Status

func (*CallResponse) ProtoMessage

func (*CallResponse) ProtoMessage()

func (*CallResponse) ProtoReflect added in v0.92.0

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

func (*CallResponse) Reset

func (x *CallResponse) Reset()

func (*CallResponse) String

func (x *CallResponse) String() string

type InitRequest

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

func (*InitRequest) Descriptor deprecated

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

Deprecated: Use InitRequest.ProtoReflect.Descriptor instead.

func (*InitRequest) ProtoMessage

func (*InitRequest) ProtoMessage()

func (*InitRequest) ProtoReflect added in v0.92.0

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

func (*InitRequest) Reset

func (x *InitRequest) Reset()

func (*InitRequest) String

func (x *InitRequest) String() string

type InitResponse

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

func (*InitResponse) Descriptor deprecated

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

Deprecated: Use InitResponse.ProtoReflect.Descriptor instead.

func (*InitResponse) ProtoMessage

func (*InitResponse) ProtoMessage()

func (*InitResponse) ProtoReflect added in v0.92.0

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

func (*InitResponse) Reset

func (x *InitResponse) Reset()

func (*InitResponse) String

func (x *InitResponse) String() string

type ServiceClient

type ServiceClient interface {
	Init(ctx context.Context, in *InitRequest, opts ...grpc.CallOption) (*InitResponse, error)
	Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error)
}

ServiceClient is the client API for Service 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.

func NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	Init(context.Context, *InitRequest) (*InitResponse, error)
	Call(context.Context, *CallRequest) (*CallResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Status

type Status int32
const (
	Status_OK    Status = 0
	Status_Error Status = 1
)

func (Status) Descriptor added in v0.92.0

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum added in v0.92.0

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number added in v0.92.0

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type added in v0.92.0

func (Status) Type() protoreflect.EnumType

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Call

func (UnimplementedServiceServer) Init

type UnsafeServiceServer added in v0.92.0

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

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

Jump to

Keyboard shortcuts

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