Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterEventsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterEventsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventsClient) error
- func RegisterEventsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterEventsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventsServer) error
- func RegisterEventsServer(s grpc.ServiceRegistrar, srv EventsServer)
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetD() string
- func (x *Event) GetH() bool
- func (x *Event) GetIp() string
- func (x *Event) GetN() string
- func (x *Event) GetR() string
- func (x *Event) GetUa() string
- func (x *Event) GetUrl() string
- func (x *Event) GetW() int32
- func (m *Event) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *Event) MarshalToVT(dAtA []byte) (int, error)
- func (m *Event) MarshalVT() (dAtA []byte, err error)
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (m *Event) SizeVT() (n int)
- func (x *Event) String() string
- func (m *Event) UnmarshalVT(dAtA []byte) error
- type EventsClient
- type EventsServer
- type UnimplementedEventsServer
- type UnsafeEventsServer
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflow = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") )
var Events_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.Events", HandlerType: (*EventsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendEvent", Handler: _Events_SendEvent_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "vince/events/v1/events.proto", }
Events_ServiceDesc is the grpc.ServiceDesc for Events service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_vince_events_v1_events_proto protoreflect.FileDescriptor
Functions ¶
func RegisterEventsHandler ¶
RegisterEventsHandler registers the http handlers for service Events to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterEventsHandlerClient ¶
func RegisterEventsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventsClient) error
RegisterEventsHandlerClient registers the http handlers for service Events to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "EventsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "EventsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "EventsClient" to call the correct interceptors.
func RegisterEventsHandlerFromEndpoint ¶
func RegisterEventsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterEventsHandlerFromEndpoint is same as RegisterEventsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterEventsHandlerServer ¶
func RegisterEventsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventsServer) error
RegisterEventsHandlerServer registers the http handlers for service Events to "mux". UnaryRPC :call EventsServer 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 RegisterEventsHandlerFromEndpoint instead.
func RegisterEventsServer ¶
func RegisterEventsServer(s grpc.ServiceRegistrar, srv EventsServer)
Types ¶
type Event ¶
type Event struct { // / EventName N string `protobuf:"bytes,1,opt,name=n,proto3" json:"n,omitempty"` Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` // Domain D string `protobuf:"bytes,3,opt,name=d,proto3" json:"d,omitempty"` // Screen width W int32 `protobuf:"varint,4,opt,name=w,proto3" json:"w,omitempty"` // Hash mode H bool `protobuf:"varint,5,opt,name=h,proto3" json:"h,omitempty"` Ip string `protobuf:"bytes,6,opt,name=ip,proto3" json:"ip,omitempty"` // user agent Ua string `protobuf:"bytes,7,opt,name=ua,proto3" json:"ua,omitempty"` // Referrer R string `protobuf:"bytes,8,opt,name=r,proto3" json:"r,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) MarshalToSizedBufferVT ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
func (*Event) UnmarshalVT ¶
type EventsClient ¶
type EventsClient interface {
SendEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
EventsClient is the client API for Events 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 NewEventsClient ¶
func NewEventsClient(cc grpc.ClientConnInterface) EventsClient
type EventsServer ¶
type EventsServer interface { SendEvent(context.Context, *Event) (*emptypb.Empty, error) // contains filtered or unexported methods }
EventsServer is the server API for Events service. All implementations must embed UnimplementedEventsServer for forward compatibility
type UnimplementedEventsServer ¶
type UnimplementedEventsServer struct { }
UnimplementedEventsServer must be embedded to have forward compatible implementations.
type UnsafeEventsServer ¶
type UnsafeEventsServer interface {
// contains filtered or unexported methods
}
UnsafeEventsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EventsServer will result in compilation errors.