bertybridge

package
v2.470.8 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: Apache-2.0, MIT Imports: 22 Imported by: 0

Documentation

Overview

Package bertybridge is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	BridgeService_ClientInvokeUnary_FullMethodName        = "/berty.bridge.v1.BridgeService/ClientInvokeUnary"
	BridgeService_CreateClientStream_FullMethodName       = "/berty.bridge.v1.BridgeService/CreateClientStream"
	BridgeService_ClientStreamSend_FullMethodName         = "/berty.bridge.v1.BridgeService/ClientStreamSend"
	BridgeService_ClientStreamRecv_FullMethodName         = "/berty.bridge.v1.BridgeService/ClientStreamRecv"
	BridgeService_ClientStreamClose_FullMethodName        = "/berty.bridge.v1.BridgeService/ClientStreamClose"
	BridgeService_ClientStreamCloseAndRecv_FullMethodName = "/berty.bridge.v1.BridgeService/ClientStreamCloseAndRecv"
)

Variables

View Source
var (
	GRPCErrCode_name = map[int32]string{
		0:  "OK",
		1:  "CANCELED",
		2:  "UNKNOWN",
		3:  "INVALID_ARGUMENT",
		4:  "DEADLINE_EXCEEDED",
		5:  "NOT_FOUND",
		6:  "ALREADY_EXISTS",
		7:  "PERMISSION_DENIED",
		8:  "RESOURCE_EXHAUSTED",
		9:  "FAILED_PRECONDITION",
		10: "ABORTED",
		11: "OUT_OF_RANGE",
		12: "UNIMPLEMENTED",
		13: "INTERNAL",
		14: "UNAVAILABLE",
		15: "DATA_LOSS",
		16: "UNAUTHENTICATED",
	}
	GRPCErrCode_value = map[string]int32{
		"OK":                  0,
		"CANCELED":            1,
		"UNKNOWN":             2,
		"INVALID_ARGUMENT":    3,
		"DEADLINE_EXCEEDED":   4,
		"NOT_FOUND":           5,
		"ALREADY_EXISTS":      6,
		"PERMISSION_DENIED":   7,
		"RESOURCE_EXHAUSTED":  8,
		"FAILED_PRECONDITION": 9,
		"ABORTED":             10,
		"OUT_OF_RANGE":        11,
		"UNIMPLEMENTED":       12,
		"INTERNAL":            13,
		"UNAVAILABLE":         14,
		"DATA_LOSS":           15,
		"UNAUTHENTICATED":     16,
	}
)

Enum value maps for GRPCErrCode.

View Source
var BridgeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "berty.bridge.v1.BridgeService",
	HandlerType: (*BridgeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ClientInvokeUnary",
			Handler:    _BridgeService_ClientInvokeUnary_Handler,
		},
		{
			MethodName: "CreateClientStream",
			Handler:    _BridgeService_CreateClientStream_Handler,
		},
		{
			MethodName: "ClientStreamSend",
			Handler:    _BridgeService_ClientStreamSend_Handler,
		},
		{
			MethodName: "ClientStreamRecv",
			Handler:    _BridgeService_ClientStreamRecv_Handler,
		},
		{
			MethodName: "ClientStreamClose",
			Handler:    _BridgeService_ClientStreamClose_Handler,
		},
		{
			MethodName: "ClientStreamCloseAndRecv",
			Handler:    _BridgeService_ClientStreamCloseAndRecv_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "bertybridge/bertybridge.proto",
}

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

View Source
var File_bertybridge_bertybridge_proto protoreflect.FileDescriptor

Functions

func RegisterBridgeServiceHandler added in v2.455.0

func RegisterBridgeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterBridgeServiceHandler registers the http handlers for service BridgeService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterBridgeServiceHandlerClient added in v2.455.0

func RegisterBridgeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BridgeServiceClient) error

RegisterBridgeServiceHandlerClient registers the http handlers for service BridgeService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BridgeServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BridgeServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BridgeServiceClient" to call the correct interceptors.

func RegisterBridgeServiceHandlerFromEndpoint added in v2.455.0

func RegisterBridgeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterBridgeServiceHandlerFromEndpoint is same as RegisterBridgeServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterBridgeServiceHandlerServer added in v2.455.0

func RegisterBridgeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BridgeServiceServer) error

RegisterBridgeServiceHandlerServer registers the http handlers for service BridgeService to "mux". UnaryRPC :call BridgeServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBridgeServiceHandlerFromEndpoint instead.

func RegisterBridgeServiceServer

func RegisterBridgeServiceServer(s grpc.ServiceRegistrar, srv BridgeServiceServer)

Types

type BridgeServiceClient

type BridgeServiceClient interface {
	// ClientInvokeUnary invoke a unary method
	ClientInvokeUnary(ctx context.Context, in *ClientInvokeUnary_Request, opts ...grpc.CallOption) (*ClientInvokeUnary_Reply, error)
	// CreateStream create a stream
	CreateClientStream(ctx context.Context, in *ClientCreateStream_Request, opts ...grpc.CallOption) (*ClientCreateStream_Reply, error)
	// Send Message over the given stream
	ClientStreamSend(ctx context.Context, in *ClientStreamSend_Request, opts ...grpc.CallOption) (*ClientStreamSend_Reply, error)
	// Recv message over the given stream
	ClientStreamRecv(ctx context.Context, in *ClientStreamRecv_Request, opts ...grpc.CallOption) (*ClientStreamRecv_Reply, error)
	// Close the given stream (should not be used)
	ClientStreamClose(ctx context.Context, in *ClientStreamClose_Request, opts ...grpc.CallOption) (*ClientStreamClose_Reply, error)
	// Close the writing end of a stream and return the next reply
	ClientStreamCloseAndRecv(ctx context.Context, in *ClientStreamCloseAndRecv_Request, opts ...grpc.CallOption) (*ClientStreamCloseAndRecv_Reply, error)
}

BridgeServiceClient is the client API for BridgeService 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.

BridgeService used to create advanced grpc transport /!\ UNARY SUPPORT ONLY /!\

type BridgeServiceServer

type BridgeServiceServer interface {
	// ClientInvokeUnary invoke a unary method
	ClientInvokeUnary(context.Context, *ClientInvokeUnary_Request) (*ClientInvokeUnary_Reply, error)
	// CreateStream create a stream
	CreateClientStream(context.Context, *ClientCreateStream_Request) (*ClientCreateStream_Reply, error)
	// Send Message over the given stream
	ClientStreamSend(context.Context, *ClientStreamSend_Request) (*ClientStreamSend_Reply, error)
	// Recv message over the given stream
	ClientStreamRecv(context.Context, *ClientStreamRecv_Request) (*ClientStreamRecv_Reply, error)
	// Close the given stream (should not be used)
	ClientStreamClose(context.Context, *ClientStreamClose_Request) (*ClientStreamClose_Reply, error)
	// Close the writing end of a stream and return the next reply
	ClientStreamCloseAndRecv(context.Context, *ClientStreamCloseAndRecv_Request) (*ClientStreamCloseAndRecv_Reply, error)
	// contains filtered or unexported methods
}

BridgeServiceServer is the server API for BridgeService service. All implementations must embed UnimplementedBridgeServiceServer for forward compatibility.

BridgeService used to create advanced grpc transport /!\ UNARY SUPPORT ONLY /!\

type ClientCreateStream

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

func (*ClientCreateStream) Descriptor deprecated

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

Deprecated: Use ClientCreateStream.ProtoReflect.Descriptor instead.

func (*ClientCreateStream) ProtoMessage

func (*ClientCreateStream) ProtoMessage()

func (*ClientCreateStream) ProtoReflect added in v2.470.4

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

func (*ClientCreateStream) Reset

func (x *ClientCreateStream) Reset()

func (*ClientCreateStream) String

func (x *ClientCreateStream) String() string

type ClientCreateStream_Reply

type ClientCreateStream_Reply struct {
	StreamId string      `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	Trailer  []*Metadata `protobuf:"bytes,2,rep,name=trailer,proto3" json:"trailer,omitempty"`
	Error    *Error      `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientCreateStream_Reply) Descriptor deprecated

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

Deprecated: Use ClientCreateStream_Reply.ProtoReflect.Descriptor instead.

func (*ClientCreateStream_Reply) GetError

func (x *ClientCreateStream_Reply) GetError() *Error

func (*ClientCreateStream_Reply) GetStreamId

func (x *ClientCreateStream_Reply) GetStreamId() string

func (*ClientCreateStream_Reply) GetTrailer

func (x *ClientCreateStream_Reply) GetTrailer() []*Metadata

func (*ClientCreateStream_Reply) ProtoMessage

func (*ClientCreateStream_Reply) ProtoMessage()

func (*ClientCreateStream_Reply) ProtoReflect added in v2.470.4

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

func (*ClientCreateStream_Reply) Reset

func (x *ClientCreateStream_Reply) Reset()

func (*ClientCreateStream_Reply) String

func (x *ClientCreateStream_Reply) String() string

type ClientCreateStream_Request

type ClientCreateStream_Request struct {
	MethodDesc *MethodDesc `protobuf:"bytes,2,opt,name=method_desc,json=methodDesc,proto3" json:"method_desc,omitempty"`
	Payload    []byte      `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Header     []*Metadata `protobuf:"bytes,4,rep,name=header,proto3" json:"header,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientCreateStream_Request) Descriptor deprecated

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

Deprecated: Use ClientCreateStream_Request.ProtoReflect.Descriptor instead.

func (*ClientCreateStream_Request) GetHeader

func (x *ClientCreateStream_Request) GetHeader() []*Metadata

func (*ClientCreateStream_Request) GetMethodDesc

func (x *ClientCreateStream_Request) GetMethodDesc() *MethodDesc

func (*ClientCreateStream_Request) GetPayload

func (x *ClientCreateStream_Request) GetPayload() []byte

func (*ClientCreateStream_Request) ProtoMessage

func (*ClientCreateStream_Request) ProtoMessage()

func (*ClientCreateStream_Request) ProtoReflect added in v2.470.4

func (*ClientCreateStream_Request) Reset

func (x *ClientCreateStream_Request) Reset()

func (*ClientCreateStream_Request) String

func (x *ClientCreateStream_Request) String() string

type ClientInvokeUnary

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

func (*ClientInvokeUnary) Descriptor deprecated

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

Deprecated: Use ClientInvokeUnary.ProtoReflect.Descriptor instead.

func (*ClientInvokeUnary) ProtoMessage

func (*ClientInvokeUnary) ProtoMessage()

func (*ClientInvokeUnary) ProtoReflect added in v2.470.4

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

func (*ClientInvokeUnary) Reset

func (x *ClientInvokeUnary) Reset()

func (*ClientInvokeUnary) String

func (x *ClientInvokeUnary) String() string

type ClientInvokeUnary_Reply

type ClientInvokeUnary_Reply struct {
	Payload []byte      `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	Trailer []*Metadata `protobuf:"bytes,3,rep,name=trailer,proto3" json:"trailer,omitempty"`
	Error   *Error      `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientInvokeUnary_Reply) Descriptor deprecated

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

Deprecated: Use ClientInvokeUnary_Reply.ProtoReflect.Descriptor instead.

func (*ClientInvokeUnary_Reply) GetError

func (x *ClientInvokeUnary_Reply) GetError() *Error

func (*ClientInvokeUnary_Reply) GetPayload

func (x *ClientInvokeUnary_Reply) GetPayload() []byte

func (*ClientInvokeUnary_Reply) GetTrailer

func (x *ClientInvokeUnary_Reply) GetTrailer() []*Metadata

func (*ClientInvokeUnary_Reply) ProtoMessage

func (*ClientInvokeUnary_Reply) ProtoMessage()

func (*ClientInvokeUnary_Reply) ProtoReflect added in v2.470.4

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

func (*ClientInvokeUnary_Reply) Reset

func (x *ClientInvokeUnary_Reply) Reset()

func (*ClientInvokeUnary_Reply) String

func (x *ClientInvokeUnary_Reply) String() string

type ClientInvokeUnary_Request

type ClientInvokeUnary_Request struct {
	MethodDesc *MethodDesc `protobuf:"bytes,2,opt,name=method_desc,json=methodDesc,proto3" json:"method_desc,omitempty"`
	Payload    []byte      `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	Header     []*Metadata `protobuf:"bytes,4,rep,name=header,proto3" json:"header,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientInvokeUnary_Request) Descriptor deprecated

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

Deprecated: Use ClientInvokeUnary_Request.ProtoReflect.Descriptor instead.

func (*ClientInvokeUnary_Request) GetHeader

func (x *ClientInvokeUnary_Request) GetHeader() []*Metadata

func (*ClientInvokeUnary_Request) GetMethodDesc

func (x *ClientInvokeUnary_Request) GetMethodDesc() *MethodDesc

func (*ClientInvokeUnary_Request) GetPayload

func (x *ClientInvokeUnary_Request) GetPayload() []byte

func (*ClientInvokeUnary_Request) ProtoMessage

func (*ClientInvokeUnary_Request) ProtoMessage()

func (*ClientInvokeUnary_Request) ProtoReflect added in v2.470.4

func (*ClientInvokeUnary_Request) Reset

func (x *ClientInvokeUnary_Request) Reset()

func (*ClientInvokeUnary_Request) String

func (x *ClientInvokeUnary_Request) String() string

type ClientStreamClose

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

func (*ClientStreamClose) Descriptor deprecated

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

Deprecated: Use ClientStreamClose.ProtoReflect.Descriptor instead.

func (*ClientStreamClose) ProtoMessage

func (*ClientStreamClose) ProtoMessage()

func (*ClientStreamClose) ProtoReflect added in v2.470.4

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

func (*ClientStreamClose) Reset

func (x *ClientStreamClose) Reset()

func (*ClientStreamClose) String

func (x *ClientStreamClose) String() string

type ClientStreamCloseAndRecv

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

func (*ClientStreamCloseAndRecv) Descriptor deprecated

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

Deprecated: Use ClientStreamCloseAndRecv.ProtoReflect.Descriptor instead.

func (*ClientStreamCloseAndRecv) ProtoMessage

func (*ClientStreamCloseAndRecv) ProtoMessage()

func (*ClientStreamCloseAndRecv) ProtoReflect added in v2.470.4

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

func (*ClientStreamCloseAndRecv) Reset

func (x *ClientStreamCloseAndRecv) Reset()

func (*ClientStreamCloseAndRecv) String

func (x *ClientStreamCloseAndRecv) String() string

type ClientStreamCloseAndRecv_Reply

type ClientStreamCloseAndRecv_Reply struct {
	StreamId string      `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	Payload  []byte      `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	Trailer  []*Metadata `protobuf:"bytes,3,rep,name=trailer,proto3" json:"trailer,omitempty"`
	Error    *Error      `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamCloseAndRecv_Reply) Descriptor deprecated

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

Deprecated: Use ClientStreamCloseAndRecv_Reply.ProtoReflect.Descriptor instead.

func (*ClientStreamCloseAndRecv_Reply) GetError

func (x *ClientStreamCloseAndRecv_Reply) GetError() *Error

func (*ClientStreamCloseAndRecv_Reply) GetPayload

func (x *ClientStreamCloseAndRecv_Reply) GetPayload() []byte

func (*ClientStreamCloseAndRecv_Reply) GetStreamId

func (x *ClientStreamCloseAndRecv_Reply) GetStreamId() string

func (*ClientStreamCloseAndRecv_Reply) GetTrailer

func (x *ClientStreamCloseAndRecv_Reply) GetTrailer() []*Metadata

func (*ClientStreamCloseAndRecv_Reply) ProtoMessage

func (*ClientStreamCloseAndRecv_Reply) ProtoMessage()

func (*ClientStreamCloseAndRecv_Reply) ProtoReflect added in v2.470.4

func (*ClientStreamCloseAndRecv_Reply) Reset

func (x *ClientStreamCloseAndRecv_Reply) Reset()

func (*ClientStreamCloseAndRecv_Reply) String

type ClientStreamCloseAndRecv_Request

type ClientStreamCloseAndRecv_Request struct {
	StreamId string `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamCloseAndRecv_Request) Descriptor deprecated

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

Deprecated: Use ClientStreamCloseAndRecv_Request.ProtoReflect.Descriptor instead.

func (*ClientStreamCloseAndRecv_Request) GetStreamId

func (x *ClientStreamCloseAndRecv_Request) GetStreamId() string

func (*ClientStreamCloseAndRecv_Request) ProtoMessage

func (*ClientStreamCloseAndRecv_Request) ProtoMessage()

func (*ClientStreamCloseAndRecv_Request) ProtoReflect added in v2.470.4

func (*ClientStreamCloseAndRecv_Request) Reset

func (*ClientStreamCloseAndRecv_Request) String

type ClientStreamClose_Reply

type ClientStreamClose_Reply struct {
	StreamId string      `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	Trailer  []*Metadata `protobuf:"bytes,2,rep,name=trailer,proto3" json:"trailer,omitempty"`
	Error    *Error      `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamClose_Reply) Descriptor deprecated

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

Deprecated: Use ClientStreamClose_Reply.ProtoReflect.Descriptor instead.

func (*ClientStreamClose_Reply) GetError

func (x *ClientStreamClose_Reply) GetError() *Error

func (*ClientStreamClose_Reply) GetStreamId

func (x *ClientStreamClose_Reply) GetStreamId() string

func (*ClientStreamClose_Reply) GetTrailer

func (x *ClientStreamClose_Reply) GetTrailer() []*Metadata

func (*ClientStreamClose_Reply) ProtoMessage

func (*ClientStreamClose_Reply) ProtoMessage()

func (*ClientStreamClose_Reply) ProtoReflect added in v2.470.4

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

func (*ClientStreamClose_Reply) Reset

func (x *ClientStreamClose_Reply) Reset()

func (*ClientStreamClose_Reply) String

func (x *ClientStreamClose_Reply) String() string

type ClientStreamClose_Request

type ClientStreamClose_Request struct {
	StreamId string `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamClose_Request) Descriptor deprecated

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

Deprecated: Use ClientStreamClose_Request.ProtoReflect.Descriptor instead.

func (*ClientStreamClose_Request) GetStreamId

func (x *ClientStreamClose_Request) GetStreamId() string

func (*ClientStreamClose_Request) ProtoMessage

func (*ClientStreamClose_Request) ProtoMessage()

func (*ClientStreamClose_Request) ProtoReflect added in v2.470.4

func (*ClientStreamClose_Request) Reset

func (x *ClientStreamClose_Request) Reset()

func (*ClientStreamClose_Request) String

func (x *ClientStreamClose_Request) String() string

type ClientStreamRecv

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

func (*ClientStreamRecv) Descriptor deprecated

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

Deprecated: Use ClientStreamRecv.ProtoReflect.Descriptor instead.

func (*ClientStreamRecv) ProtoMessage

func (*ClientStreamRecv) ProtoMessage()

func (*ClientStreamRecv) ProtoReflect added in v2.470.4

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

func (*ClientStreamRecv) Reset

func (x *ClientStreamRecv) Reset()

func (*ClientStreamRecv) String

func (x *ClientStreamRecv) String() string

type ClientStreamRecv_Reply

type ClientStreamRecv_Reply struct {
	StreamId string      `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	Payload  []byte      `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	Trailer  []*Metadata `protobuf:"bytes,3,rep,name=trailer,proto3" json:"trailer,omitempty"`
	Error    *Error      `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamRecv_Reply) Descriptor deprecated

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

Deprecated: Use ClientStreamRecv_Reply.ProtoReflect.Descriptor instead.

func (*ClientStreamRecv_Reply) GetError

func (x *ClientStreamRecv_Reply) GetError() *Error

func (*ClientStreamRecv_Reply) GetPayload

func (x *ClientStreamRecv_Reply) GetPayload() []byte

func (*ClientStreamRecv_Reply) GetStreamId

func (x *ClientStreamRecv_Reply) GetStreamId() string

func (*ClientStreamRecv_Reply) GetTrailer

func (x *ClientStreamRecv_Reply) GetTrailer() []*Metadata

func (*ClientStreamRecv_Reply) ProtoMessage

func (*ClientStreamRecv_Reply) ProtoMessage()

func (*ClientStreamRecv_Reply) ProtoReflect added in v2.470.4

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

func (*ClientStreamRecv_Reply) Reset

func (x *ClientStreamRecv_Reply) Reset()

func (*ClientStreamRecv_Reply) String

func (x *ClientStreamRecv_Reply) String() string

type ClientStreamRecv_Request

type ClientStreamRecv_Request struct {
	StreamId string `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamRecv_Request) Descriptor deprecated

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

Deprecated: Use ClientStreamRecv_Request.ProtoReflect.Descriptor instead.

func (*ClientStreamRecv_Request) GetStreamId

func (x *ClientStreamRecv_Request) GetStreamId() string

func (*ClientStreamRecv_Request) ProtoMessage

func (*ClientStreamRecv_Request) ProtoMessage()

func (*ClientStreamRecv_Request) ProtoReflect added in v2.470.4

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

func (*ClientStreamRecv_Request) Reset

func (x *ClientStreamRecv_Request) Reset()

func (*ClientStreamRecv_Request) String

func (x *ClientStreamRecv_Request) String() string

type ClientStreamSend

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

func (*ClientStreamSend) Descriptor deprecated

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

Deprecated: Use ClientStreamSend.ProtoReflect.Descriptor instead.

func (*ClientStreamSend) ProtoMessage

func (*ClientStreamSend) ProtoMessage()

func (*ClientStreamSend) ProtoReflect added in v2.470.4

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

func (*ClientStreamSend) Reset

func (x *ClientStreamSend) Reset()

func (*ClientStreamSend) String

func (x *ClientStreamSend) String() string

type ClientStreamSend_Reply

type ClientStreamSend_Reply struct {
	StreamId string      `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	Trailer  []*Metadata `protobuf:"bytes,2,rep,name=trailer,proto3" json:"trailer,omitempty"`
	Error    *Error      `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamSend_Reply) Descriptor deprecated

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

Deprecated: Use ClientStreamSend_Reply.ProtoReflect.Descriptor instead.

func (*ClientStreamSend_Reply) GetError

func (x *ClientStreamSend_Reply) GetError() *Error

func (*ClientStreamSend_Reply) GetStreamId

func (x *ClientStreamSend_Reply) GetStreamId() string

func (*ClientStreamSend_Reply) GetTrailer

func (x *ClientStreamSend_Reply) GetTrailer() []*Metadata

func (*ClientStreamSend_Reply) ProtoMessage

func (*ClientStreamSend_Reply) ProtoMessage()

func (*ClientStreamSend_Reply) ProtoReflect added in v2.470.4

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

func (*ClientStreamSend_Reply) Reset

func (x *ClientStreamSend_Reply) Reset()

func (*ClientStreamSend_Reply) String

func (x *ClientStreamSend_Reply) String() string

type ClientStreamSend_Request

type ClientStreamSend_Request struct {
	StreamId string `protobuf:"bytes,1,opt,name=stream_id,json=streamId,proto3" json:"stream_id,omitempty"`
	Payload  []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientStreamSend_Request) Descriptor deprecated

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

Deprecated: Use ClientStreamSend_Request.ProtoReflect.Descriptor instead.

func (*ClientStreamSend_Request) GetPayload

func (x *ClientStreamSend_Request) GetPayload() []byte

func (*ClientStreamSend_Request) GetStreamId

func (x *ClientStreamSend_Request) GetStreamId() string

func (*ClientStreamSend_Request) ProtoMessage

func (*ClientStreamSend_Request) ProtoMessage()

func (*ClientStreamSend_Request) ProtoReflect added in v2.470.4

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

func (*ClientStreamSend_Request) Reset

func (x *ClientStreamSend_Request) Reset()

func (*ClientStreamSend_Request) String

func (x *ClientStreamSend_Request) String() string

type Error

type Error struct {

	// grpc error code
	GrpcErrorCode GRPCErrCode `` /* 136-byte string literal not displayed */
	// toplevel error
	ErrorCode errcode.ErrCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=berty.errcode.ErrCode" json:"error_code,omitempty"`
	// toplevel error message
	Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// detailed errors
	ErrorDetails *errcode.ErrDetails `protobuf:"bytes,4,opt,name=error_details,json=errorDetails,proto3" json:"error_details,omitempty"`
	// contains filtered or unexported fields
}

func (*Error) Descriptor deprecated

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetErrorCode

func (x *Error) GetErrorCode() errcode.ErrCode

func (*Error) GetErrorDetails

func (x *Error) GetErrorDetails() *errcode.ErrDetails

func (*Error) GetGrpcErrorCode

func (x *Error) GetGrpcErrorCode() GRPCErrCode

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect added in v2.470.4

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

type GRPCErrCode

type GRPCErrCode int32
const (
	// OK is returned on success.
	GRPCErrCode_OK GRPCErrCode = 0
	// Canceled indicates the operation was canceled (typically by the caller).
	//
	// The gRPC framework will generate this error code when cancellation
	// is requested.
	GRPCErrCode_CANCELED GRPCErrCode = 1
	// Unknown error. An example of where this error may be returned is
	// if a Status value received from another address space belongs to
	// an error-space that is not known in this address space. Also
	// errors raised by APIs that do not return enough error information
	// may be converted to this error.
	//
	// The gRPC framework will generate this error code in the above two
	// mentioned cases.
	GRPCErrCode_UNKNOWN GRPCErrCode = 2
	// InvalidArgument indicates client specified an invalid argument.
	// Note that this differs from FailedPrecondition. It indicates arguments
	// that are problematic regardless of the state of the system
	// (e.g., a malformed file name).
	//
	// This error code will not be generated by the gRPC framework.
	GRPCErrCode_INVALID_ARGUMENT GRPCErrCode = 3
	// DeadlineExceeded means operation expired before completion.
	// For operations that change the state of the system, this error may be
	// returned even if the operation has completed successfully. For
	// example, a successful response from a server could have been delayed
	// long enough for the deadline to expire.
	//
	// The gRPC framework will generate this error code when the deadline is
	// exceeded.
	GRPCErrCode_DEADLINE_EXCEEDED GRPCErrCode = 4
	// NotFound means some requested entity (e.g., file or directory) was
	// not found.
	//
	// This error code will not be generated by the gRPC framework.
	GRPCErrCode_NOT_FOUND GRPCErrCode = 5
	// AlreadyExists means an attempt to create an entity failed because one
	// already exists.
	//
	// This error code will not be generated by the gRPC framework.
	GRPCErrCode_ALREADY_EXISTS GRPCErrCode = 6
	// PermissionDenied indicates the caller does not have permission to
	// execute the specified operation. It must not be used for rejections
	// caused by exhausting some resource (use ResourceExhausted
	// instead for those errors). It must not be
	// used if the caller cannot be identified (use Unauthenticated
	// instead for those errors).
	//
	// This error code will not be generated by the gRPC core framework,
	// but expect authentication middleware to use it.
	GRPCErrCode_PERMISSION_DENIED GRPCErrCode = 7
	// ResourceExhausted indicates some resource has been exhausted, perhaps
	// a per-user quota, or perhaps the entire file system is out of space.
	//
	// This error code will be generated by the gRPC framework in
	// out-of-memory and server overload situations, or when a message is
	// larger than the configured maximum size.
	GRPCErrCode_RESOURCE_EXHAUSTED GRPCErrCode = 8
	// FailedPrecondition indicates operation was rejected because the
	// system is not in a state required for the operation's execution.
	// For example, directory to be deleted may be non-empty, an rmdir
	// operation is applied to a non-directory, etc.
	//
	// A litmus test that may help a service implementor in deciding
	// between FailedPrecondition, Aborted, and Unavailable:
	//
	//	(a) Use Unavailable if the client can retry just the failing call.
	//	(b) Use Aborted if the client should retry at a higher-level
	//	    (e.g., restarting a read-modify-write sequence).
	//	(c) Use FailedPrecondition if the client should not retry until
	//	    the system state has been explicitly fixed. E.g., if an "rmdir"
	//	    fails because the directory is non-empty, FailedPrecondition
	//	    should be returned since the client should not retry unless
	//	    they have first fixed up the directory by deleting files from it.
	//	(d) Use FailedPrecondition if the client performs conditional
	//	    REST Get/Update/Delete on a resource and the resource on the
	//	    server does not match the condition. E.g., conflicting
	//	    read-modify-write on the same resource.
	//
	// This error code will not be generated by the gRPC framework.
	GRPCErrCode_FAILED_PRECONDITION GRPCErrCode = 9
	// Aborted indicates the operation was aborted, typically due to a
	// concurrency issue like sequencer check failures, transaction aborts,
	// etc.
	//
	// See litmus test above for deciding between FailedPrecondition,
	// Aborted, and Unavailable.
	//
	// This error code will not be generated by the gRPC framework.
	GRPCErrCode_ABORTED GRPCErrCode = 10
	// OutOfRange means operation was attempted past the valid range.
	// E.g., seeking or reading past end of file.
	//
	// Unlike InvalidArgument, this error indicates a problem that may
	// be fixed if the system state changes. For example, a 32-bit file
	// system will generate InvalidArgument if asked to read at an
	// offset that is not in the range [0,2^32-1], but it will generate
	// OutOfRange if asked to read from an offset past the current
	// file size.
	//
	// There is a fair bit of overlap between FailedPrecondition and
	// OutOfRange. We recommend using OutOfRange (the more specific
	// error) when it applies so that callers who are iterating through
	// a space can easily look for an OutOfRange error to detect when
	// they are done.
	//
	// This error code will not be generated by the gRPC framework.
	GRPCErrCode_OUT_OF_RANGE GRPCErrCode = 11
	// Unimplemented indicates operation is not implemented or not
	// supported/enabled in this service.
	//
	// This error code will be generated by the gRPC framework. Most
	// commonly, you will see this error code when a method implementation
	// is missing on the server. It can also be generated for unknown
	// compression algorithms or a disagreement as to whether an RPC should
	// be streaming.
	GRPCErrCode_UNIMPLEMENTED GRPCErrCode = 12
	// Internal errors. Means some invariants expected by underlying
	// system has been broken. If you see one of these errors,
	// something is very broken.
	//
	// This error code will be generated by the gRPC framework in several
	// internal error conditions.
	GRPCErrCode_INTERNAL GRPCErrCode = 13
	// Unavailable indicates the service is currently unavailable.
	// This is a most likely a transient condition and may be corrected
	// by retrying with a backoff. Note that it is not always safe to retry
	// non-idempotent operations.
	//
	// See litmus test above for deciding between FailedPrecondition,
	// Aborted, and Unavailable.
	//
	// This error code will be generated by the gRPC framework during
	// abrupt shutdown of a server process or network connection.
	GRPCErrCode_UNAVAILABLE GRPCErrCode = 14
	// DataLoss indicates unrecoverable data loss or corruption.
	//
	// This error code will not be generated by the gRPC framework.
	GRPCErrCode_DATA_LOSS GRPCErrCode = 15
	// Unauthenticated indicates the request does not have valid
	// authentication credentials for the operation.
	//
	// The gRPC framework will generate this error code when the
	// authentication metadata is invalid or a Credentials callback fails,
	// but also expect authentication middleware to generate it.
	GRPCErrCode_UNAUTHENTICATED GRPCErrCode = 16
)

func (GRPCErrCode) Descriptor added in v2.470.4

func (GRPCErrCode) Enum added in v2.470.4

func (x GRPCErrCode) Enum() *GRPCErrCode

func (GRPCErrCode) EnumDescriptor deprecated

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

Deprecated: Use GRPCErrCode.Descriptor instead.

func (GRPCErrCode) Number added in v2.470.4

func (x GRPCErrCode) Number() protoreflect.EnumNumber

func (GRPCErrCode) String

func (x GRPCErrCode) String() string

func (GRPCErrCode) Type added in v2.470.4

type Metadata

type Metadata struct {
	Key    string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
	// contains filtered or unexported fields
}

func (*Metadata) Descriptor deprecated

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

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetKey

func (x *Metadata) GetKey() string

func (*Metadata) GetValues

func (x *Metadata) GetValues() []string

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect added in v2.470.4

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

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type MethodDesc

type MethodDesc struct {

	// Name is the method name only, without the service name or package name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// IsClientStream indicates whether the RPC is a client streaming RPC.
	IsClientStream bool `protobuf:"varint,2,opt,name=is_client_stream,json=isClientStream,proto3" json:"is_client_stream,omitempty"`
	// IsServerStream indicates whether the RPC is a server streaming RPC.
	IsServerStream bool `protobuf:"varint,3,opt,name=is_server_stream,json=isServerStream,proto3" json:"is_server_stream,omitempty"`
	// contains filtered or unexported fields
}

func (*MethodDesc) Descriptor deprecated

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

Deprecated: Use MethodDesc.ProtoReflect.Descriptor instead.

func (*MethodDesc) GetIsClientStream

func (x *MethodDesc) GetIsClientStream() bool

func (*MethodDesc) GetIsServerStream

func (x *MethodDesc) GetIsServerStream() bool

func (*MethodDesc) GetName

func (x *MethodDesc) GetName() string

func (*MethodDesc) ProtoMessage

func (*MethodDesc) ProtoMessage()

func (*MethodDesc) ProtoReflect added in v2.470.4

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

func (*MethodDesc) Reset

func (x *MethodDesc) Reset()

func (*MethodDesc) String

func (x *MethodDesc) String() string

type Options

type Options struct {
	Logger *zap.Logger
}

type Service

type Service interface {
	BridgeServiceServer
	ServiceClientRegister

	Close() error
}

func NewService

func NewService(opts *Options) Service

type ServiceClientRegister

type ServiceClientRegister interface {
	RegisterService(name string, cc *grpc.ClientConn)
}

func NewNoopServiceClientRegister

func NewNoopServiceClientRegister() ServiceClientRegister

type UnimplementedBridgeServiceServer

type UnimplementedBridgeServiceServer struct{}

UnimplementedBridgeServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedBridgeServiceServer) ClientInvokeUnary

func (UnimplementedBridgeServiceServer) ClientStreamClose

func (UnimplementedBridgeServiceServer) ClientStreamRecv

func (UnimplementedBridgeServiceServer) ClientStreamSend

func (UnimplementedBridgeServiceServer) CreateClientStream

type UnsafeBridgeServiceServer added in v2.455.0

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

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

Jump to

Keyboard shortcuts

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