apis

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package apis is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var ExchangeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "apis.ExchangeService",
	HandlerType: (*ExchangeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSession",
			Handler:    _ExchangeService_CreateSession_Handler,
		},
		{
			MethodName: "GetSessionAnswer",
			Handler:    _ExchangeService_GetSessionAnswer_Handler,
		},
		{
			MethodName: "GetSessionOffer",
			Handler:    _ExchangeService_GetSessionOffer_Handler,
		},
		{
			MethodName: "DeleteSession",
			Handler:    _ExchangeService_DeleteSession_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "exchange.proto",
}

ExchangeService_ServiceDesc is the grpc.ServiceDesc for ExchangeService 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_exchange_proto protoreflect.FileDescriptor

Functions

func RegisterExchangeServiceHandler

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

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

func RegisterExchangeServiceHandlerClient

func RegisterExchangeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExchangeServiceClient) error

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

func RegisterExchangeServiceHandlerFromEndpoint

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

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

func RegisterExchangeServiceHandlerServer added in v0.2.0

func RegisterExchangeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExchangeServiceServer) error

RegisterExchangeServiceHandlerServer registers the http handlers for service ExchangeService to "mux". UnaryRPC :call ExchangeServiceServer 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 RegisterExchangeServiceHandlerFromEndpoint instead.

func RegisterExchangeServiceServer

func RegisterExchangeServiceServer(s grpc.ServiceRegistrar, srv ExchangeServiceServer)

Types

type CreateSessionRequest

type CreateSessionRequest struct {
	SessionDescription *SessionDescription `protobuf:"bytes,1,opt,name=session_description,json=sessionDescription,proto3" json:"session_description,omitempty"`
	SessionId          string              `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSessionRequest) Descriptor deprecated

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

Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead.

func (*CreateSessionRequest) GetSessionDescription

func (x *CreateSessionRequest) GetSessionDescription() *SessionDescription

func (*CreateSessionRequest) GetSessionId

func (x *CreateSessionRequest) GetSessionId() string

func (*CreateSessionRequest) ProtoMessage

func (*CreateSessionRequest) ProtoMessage()

func (*CreateSessionRequest) ProtoReflect added in v0.2.0

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

func (*CreateSessionRequest) Reset

func (x *CreateSessionRequest) Reset()

func (*CreateSessionRequest) String

func (x *CreateSessionRequest) String() string

type CreateSessionResponse

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

func (*CreateSessionResponse) Descriptor deprecated

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

Deprecated: Use CreateSessionResponse.ProtoReflect.Descriptor instead.

func (*CreateSessionResponse) ProtoMessage

func (*CreateSessionResponse) ProtoMessage()

func (*CreateSessionResponse) ProtoReflect added in v0.2.0

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

func (*CreateSessionResponse) Reset

func (x *CreateSessionResponse) Reset()

func (*CreateSessionResponse) String

func (x *CreateSessionResponse) String() string

type DeleteSessionRequest

type DeleteSessionRequest struct {
	SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteSessionRequest) Descriptor deprecated

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

Deprecated: Use DeleteSessionRequest.ProtoReflect.Descriptor instead.

func (*DeleteSessionRequest) GetSessionId

func (x *DeleteSessionRequest) GetSessionId() string

func (*DeleteSessionRequest) ProtoMessage

func (*DeleteSessionRequest) ProtoMessage()

func (*DeleteSessionRequest) ProtoReflect added in v0.2.0

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

func (*DeleteSessionRequest) Reset

func (x *DeleteSessionRequest) Reset()

func (*DeleteSessionRequest) String

func (x *DeleteSessionRequest) String() string

type DeleteSessionResponse

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

func (*DeleteSessionResponse) Descriptor deprecated

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

Deprecated: Use DeleteSessionResponse.ProtoReflect.Descriptor instead.

func (*DeleteSessionResponse) ProtoMessage

func (*DeleteSessionResponse) ProtoMessage()

func (*DeleteSessionResponse) ProtoReflect added in v0.2.0

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

func (*DeleteSessionResponse) Reset

func (x *DeleteSessionResponse) Reset()

func (*DeleteSessionResponse) String

func (x *DeleteSessionResponse) String() string

type ExchangeServiceClient

type ExchangeServiceClient interface {
	CreateSession(ctx context.Context, in *CreateSessionRequest, opts ...grpc.CallOption) (*CreateSessionResponse, error)
	GetSessionAnswer(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error)
	GetSessionOffer(ctx context.Context, in *GetSessionRequest, opts ...grpc.CallOption) (*GetSessionResponse, error)
	DeleteSession(ctx context.Context, in *DeleteSessionRequest, opts ...grpc.CallOption) (*DeleteSessionResponse, error)
}

ExchangeServiceClient is the client API for ExchangeService 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 ExchangeServiceServer

type ExchangeServiceServer interface {
	CreateSession(context.Context, *CreateSessionRequest) (*CreateSessionResponse, error)
	GetSessionAnswer(context.Context, *GetSessionRequest) (*GetSessionResponse, error)
	GetSessionOffer(context.Context, *GetSessionRequest) (*GetSessionResponse, error)
	DeleteSession(context.Context, *DeleteSessionRequest) (*DeleteSessionResponse, error)
	// contains filtered or unexported methods
}

ExchangeServiceServer is the server API for ExchangeService service. All implementations must embed UnimplementedExchangeServiceServer for forward compatibility

type GetSessionRequest

type GetSessionRequest struct {
	SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSessionRequest) Descriptor deprecated

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

Deprecated: Use GetSessionRequest.ProtoReflect.Descriptor instead.

func (*GetSessionRequest) GetSessionId

func (x *GetSessionRequest) GetSessionId() string

func (*GetSessionRequest) ProtoMessage

func (*GetSessionRequest) ProtoMessage()

func (*GetSessionRequest) ProtoReflect added in v0.2.0

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

func (*GetSessionRequest) Reset

func (x *GetSessionRequest) Reset()

func (*GetSessionRequest) String

func (x *GetSessionRequest) String() string

type GetSessionResponse

type GetSessionResponse struct {
	SessionDescription *SessionDescription `protobuf:"bytes,1,opt,name=session_description,json=sessionDescription,proto3" json:"session_description,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSessionResponse) Descriptor deprecated

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

Deprecated: Use GetSessionResponse.ProtoReflect.Descriptor instead.

func (*GetSessionResponse) GetSessionDescription

func (x *GetSessionResponse) GetSessionDescription() *SessionDescription

func (*GetSessionResponse) ProtoMessage

func (*GetSessionResponse) ProtoMessage()

func (*GetSessionResponse) ProtoReflect added in v0.2.0

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

func (*GetSessionResponse) Reset

func (x *GetSessionResponse) Reset()

func (*GetSessionResponse) String

func (x *GetSessionResponse) String() string

type SessionDescription

type SessionDescription struct {
	Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Sdp  string `protobuf:"bytes,2,opt,name=sdp,proto3" json:"sdp,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionDescription) Descriptor deprecated

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

Deprecated: Use SessionDescription.ProtoReflect.Descriptor instead.

func (*SessionDescription) GetSdp

func (x *SessionDescription) GetSdp() string

func (*SessionDescription) GetType

func (x *SessionDescription) GetType() string

func (*SessionDescription) ProtoMessage

func (*SessionDescription) ProtoMessage()

func (*SessionDescription) ProtoReflect added in v0.2.0

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

func (*SessionDescription) Reset

func (x *SessionDescription) Reset()

func (*SessionDescription) String

func (x *SessionDescription) String() string

type UnimplementedExchangeServiceServer added in v0.2.0

type UnimplementedExchangeServiceServer struct {
}

UnimplementedExchangeServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedExchangeServiceServer) CreateSession added in v0.2.0

func (UnimplementedExchangeServiceServer) DeleteSession added in v0.2.0

func (UnimplementedExchangeServiceServer) GetSessionAnswer added in v0.2.0

func (UnimplementedExchangeServiceServer) GetSessionOffer added in v0.2.0

type UnsafeExchangeServiceServer added in v0.2.0

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

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

Jump to

Keyboard shortcuts

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