Documentation ¶
Index ¶
- Variables
- func NewApiEndpoints() []*api.Endpoint
- func RegisterApiHandler(s server.Server, hdlr ApiHandler, opts ...server.HandlerOption) error
- func RegisterApiServer(s *grpc.Server, srv ApiServer)
- type AddToBlockListRequest
- func (*AddToBlockListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddToBlockListRequest) GetId() string
- func (x *AddToBlockListRequest) GetNamespace() string
- func (*AddToBlockListRequest) ProtoMessage()
- func (x *AddToBlockListRequest) ProtoReflect() protoreflect.Message
- func (x *AddToBlockListRequest) Reset()
- func (x *AddToBlockListRequest) String() string
- type AddToBlockListResponse
- type ApiClient
- type ApiHandler
- type ApiServer
- type ApiService
- type EmptyResponse
- type Endpoint
- func (*Endpoint) Descriptor() ([]byte, []int)deprecated
- func (x *Endpoint) GetHost() []string
- func (x *Endpoint) GetMethod() []string
- func (x *Endpoint) GetName() string
- func (x *Endpoint) GetPath() []string
- func (x *Endpoint) GetStream() bool
- func (*Endpoint) ProtoMessage()
- func (x *Endpoint) ProtoReflect() protoreflect.Message
- func (x *Endpoint) Reset()
- func (x *Endpoint) String() string
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetData() string
- func (x *Event) GetHeader() map[string]*Pair
- func (x *Event) GetId() string
- func (x *Event) GetName() string
- func (x *Event) GetTimestamp() int64
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type Pair
- type ReadBlockListRequest
- type ReadBlockListResponse
- func (*ReadBlockListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadBlockListResponse) GetIds() []string
- func (*ReadBlockListResponse) ProtoMessage()
- func (x *ReadBlockListResponse) ProtoReflect() protoreflect.Message
- func (x *ReadBlockListResponse) Reset()
- func (x *ReadBlockListResponse) String() string
- type RemoveFromBlockListRequest
- func (*RemoveFromBlockListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveFromBlockListRequest) GetId() string
- func (x *RemoveFromBlockListRequest) GetNamespace() string
- func (*RemoveFromBlockListRequest) ProtoMessage()
- func (x *RemoveFromBlockListRequest) ProtoReflect() protoreflect.Message
- func (x *RemoveFromBlockListRequest) Reset()
- func (x *RemoveFromBlockListRequest) String() string
- type RemoveFromBlockListResponse
- type Request
- func (*Request) Descriptor() ([]byte, []int)deprecated
- func (x *Request) GetBody() string
- func (x *Request) GetGet() map[string]*Pair
- func (x *Request) GetHeader() map[string]*Pair
- func (x *Request) GetMethod() string
- func (x *Request) GetPath() string
- func (x *Request) GetPost() map[string]*Pair
- func (x *Request) GetUrl() string
- func (*Request) ProtoMessage()
- func (x *Request) ProtoReflect() protoreflect.Message
- func (x *Request) Reset()
- func (x *Request) String() string
- type Response
- func (*Response) Descriptor() ([]byte, []int)deprecated
- func (x *Response) GetBody() string
- func (x *Response) GetHeader() map[string]*Pair
- func (x *Response) GetStatusCode() int32
- func (*Response) ProtoMessage()
- func (x *Response) ProtoReflect() protoreflect.Message
- func (x *Response) Reset()
- func (x *Response) String() string
- type UnimplementedApiServer
- func (*UnimplementedApiServer) AddToBlockList(context.Context, *AddToBlockListRequest) (*AddToBlockListResponse, error)
- func (*UnimplementedApiServer) ReadBlockList(context.Context, *ReadBlockListRequest) (*ReadBlockListResponse, error)
- func (*UnimplementedApiServer) RemoveFromBlockList(context.Context, *RemoveFromBlockListRequest) (*RemoveFromBlockListResponse, error)
Constants ¶
This section is empty.
Variables ¶
var File_proto_api_api_proto protoreflect.FileDescriptor
Functions ¶
func NewApiEndpoints ¶
func RegisterApiHandler ¶
func RegisterApiHandler(s server.Server, hdlr ApiHandler, opts ...server.HandlerOption) error
func RegisterApiServer ¶ added in v3.8.3
Types ¶
type AddToBlockListRequest ¶
type AddToBlockListRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // contains filtered or unexported fields }
func (*AddToBlockListRequest) Descriptor
deprecated
func (*AddToBlockListRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddToBlockListRequest.ProtoReflect.Descriptor instead.
func (*AddToBlockListRequest) GetId ¶
func (x *AddToBlockListRequest) GetId() string
func (*AddToBlockListRequest) GetNamespace ¶
func (x *AddToBlockListRequest) GetNamespace() string
func (*AddToBlockListRequest) ProtoMessage ¶
func (*AddToBlockListRequest) ProtoMessage()
func (*AddToBlockListRequest) ProtoReflect ¶
func (x *AddToBlockListRequest) ProtoReflect() protoreflect.Message
func (*AddToBlockListRequest) Reset ¶
func (x *AddToBlockListRequest) Reset()
func (*AddToBlockListRequest) String ¶
func (x *AddToBlockListRequest) String() string
type AddToBlockListResponse ¶
type AddToBlockListResponse struct {
// contains filtered or unexported fields
}
func (*AddToBlockListResponse) Descriptor
deprecated
func (*AddToBlockListResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddToBlockListResponse.ProtoReflect.Descriptor instead.
func (*AddToBlockListResponse) ProtoMessage ¶
func (*AddToBlockListResponse) ProtoMessage()
func (*AddToBlockListResponse) ProtoReflect ¶
func (x *AddToBlockListResponse) ProtoReflect() protoreflect.Message
func (*AddToBlockListResponse) Reset ¶
func (x *AddToBlockListResponse) Reset()
func (*AddToBlockListResponse) String ¶
func (x *AddToBlockListResponse) String() string
type ApiClient ¶ added in v3.8.3
type ApiClient interface { AddToBlockList(ctx context.Context, in *AddToBlockListRequest, opts ...grpc.CallOption) (*AddToBlockListResponse, error) RemoveFromBlockList(ctx context.Context, in *RemoveFromBlockListRequest, opts ...grpc.CallOption) (*RemoveFromBlockListResponse, error) ReadBlockList(ctx context.Context, in *ReadBlockListRequest, opts ...grpc.CallOption) (*ReadBlockListResponse, error) }
ApiClient is the client API for Api service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewApiClient ¶ added in v3.8.3
func NewApiClient(cc grpc.ClientConnInterface) ApiClient
type ApiHandler ¶
type ApiHandler interface { AddToBlockList(context.Context, *AddToBlockListRequest, *AddToBlockListResponse) error RemoveFromBlockList(context.Context, *RemoveFromBlockListRequest, *RemoveFromBlockListResponse) error ReadBlockList(context.Context, *ReadBlockListRequest, *ReadBlockListResponse) error }
type ApiServer ¶ added in v3.8.3
type ApiServer interface { AddToBlockList(context.Context, *AddToBlockListRequest) (*AddToBlockListResponse, error) RemoveFromBlockList(context.Context, *RemoveFromBlockListRequest) (*RemoveFromBlockListResponse, error) ReadBlockList(context.Context, *ReadBlockListRequest) (*ReadBlockListResponse, error) }
ApiServer is the server API for Api service.
type ApiService ¶
type ApiService interface { AddToBlockList(ctx context.Context, in *AddToBlockListRequest, opts ...client.CallOption) (*AddToBlockListResponse, error) RemoveFromBlockList(ctx context.Context, in *RemoveFromBlockListRequest, opts ...client.CallOption) (*RemoveFromBlockListResponse, error) ReadBlockList(ctx context.Context, in *ReadBlockListRequest, opts ...client.CallOption) (*ReadBlockListResponse, error) }
func NewApiService ¶
func NewApiService(name string, c client.Client) ApiService
type EmptyResponse ¶
type EmptyResponse struct {
// contains filtered or unexported fields
}
func (*EmptyResponse) Descriptor
deprecated
func (*EmptyResponse) Descriptor() ([]byte, []int)
Deprecated: Use EmptyResponse.ProtoReflect.Descriptor instead.
func (*EmptyResponse) ProtoMessage ¶
func (*EmptyResponse) ProtoMessage()
func (*EmptyResponse) ProtoReflect ¶
func (x *EmptyResponse) ProtoReflect() protoreflect.Message
func (*EmptyResponse) Reset ¶
func (x *EmptyResponse) Reset()
func (*EmptyResponse) String ¶
func (x *EmptyResponse) String() string
type Endpoint ¶
type Endpoint struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Host []string `protobuf:"bytes,2,rep,name=host,proto3" json:"host,omitempty"` Path []string `protobuf:"bytes,3,rep,name=path,proto3" json:"path,omitempty"` Method []string `protobuf:"bytes,4,rep,name=method,proto3" json:"method,omitempty"` Stream bool `protobuf:"varint,5,opt,name=stream,proto3" json:"stream,omitempty"` // contains filtered or unexported fields }
func (*Endpoint) Descriptor
deprecated
func (*Endpoint) ProtoMessage ¶
func (*Endpoint) ProtoMessage()
func (*Endpoint) ProtoReflect ¶
func (x *Endpoint) ProtoReflect() protoreflect.Message
type Event ¶
type Event struct { // e.g login Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // uuid Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` // unix timestamp of event Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // event headers Header map[string]*Pair `` /* 153-byte string literal not displayed */ // the event data Data string `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
A HTTP event as RPC Forwarded by the event handler
func (*Event) Descriptor
deprecated
func (*Event) GetTimestamp ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type Pair ¶
type Pair 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 (*Pair) Descriptor
deprecated
func (*Pair) ProtoMessage ¶
func (*Pair) ProtoMessage()
func (*Pair) ProtoReflect ¶
func (x *Pair) ProtoReflect() protoreflect.Message
type ReadBlockListRequest ¶
type ReadBlockListRequest struct {
// contains filtered or unexported fields
}
func (*ReadBlockListRequest) Descriptor
deprecated
func (*ReadBlockListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadBlockListRequest.ProtoReflect.Descriptor instead.
func (*ReadBlockListRequest) ProtoMessage ¶
func (*ReadBlockListRequest) ProtoMessage()
func (*ReadBlockListRequest) ProtoReflect ¶
func (x *ReadBlockListRequest) ProtoReflect() protoreflect.Message
func (*ReadBlockListRequest) Reset ¶
func (x *ReadBlockListRequest) Reset()
func (*ReadBlockListRequest) String ¶
func (x *ReadBlockListRequest) String() string
type ReadBlockListResponse ¶
type ReadBlockListResponse struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*ReadBlockListResponse) Descriptor
deprecated
func (*ReadBlockListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadBlockListResponse.ProtoReflect.Descriptor instead.
func (*ReadBlockListResponse) GetIds ¶
func (x *ReadBlockListResponse) GetIds() []string
func (*ReadBlockListResponse) ProtoMessage ¶
func (*ReadBlockListResponse) ProtoMessage()
func (*ReadBlockListResponse) ProtoReflect ¶
func (x *ReadBlockListResponse) ProtoReflect() protoreflect.Message
func (*ReadBlockListResponse) Reset ¶
func (x *ReadBlockListResponse) Reset()
func (*ReadBlockListResponse) String ¶
func (x *ReadBlockListResponse) String() string
type RemoveFromBlockListRequest ¶
type RemoveFromBlockListRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` // contains filtered or unexported fields }
func (*RemoveFromBlockListRequest) Descriptor
deprecated
func (*RemoveFromBlockListRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveFromBlockListRequest.ProtoReflect.Descriptor instead.
func (*RemoveFromBlockListRequest) GetId ¶
func (x *RemoveFromBlockListRequest) GetId() string
func (*RemoveFromBlockListRequest) GetNamespace ¶
func (x *RemoveFromBlockListRequest) GetNamespace() string
func (*RemoveFromBlockListRequest) ProtoMessage ¶
func (*RemoveFromBlockListRequest) ProtoMessage()
func (*RemoveFromBlockListRequest) ProtoReflect ¶
func (x *RemoveFromBlockListRequest) ProtoReflect() protoreflect.Message
func (*RemoveFromBlockListRequest) Reset ¶
func (x *RemoveFromBlockListRequest) Reset()
func (*RemoveFromBlockListRequest) String ¶
func (x *RemoveFromBlockListRequest) String() string
type RemoveFromBlockListResponse ¶
type RemoveFromBlockListResponse struct {
// contains filtered or unexported fields
}
func (*RemoveFromBlockListResponse) Descriptor
deprecated
func (*RemoveFromBlockListResponse) Descriptor() ([]byte, []int)
Deprecated: Use RemoveFromBlockListResponse.ProtoReflect.Descriptor instead.
func (*RemoveFromBlockListResponse) ProtoMessage ¶
func (*RemoveFromBlockListResponse) ProtoMessage()
func (*RemoveFromBlockListResponse) ProtoReflect ¶
func (x *RemoveFromBlockListResponse) ProtoReflect() protoreflect.Message
func (*RemoveFromBlockListResponse) Reset ¶
func (x *RemoveFromBlockListResponse) Reset()
func (*RemoveFromBlockListResponse) String ¶
func (x *RemoveFromBlockListResponse) String() string
type Request ¶
type Request struct { Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` Header map[string]*Pair `` /* 153-byte string literal not displayed */ Get map[string]*Pair `` /* 147-byte string literal not displayed */ Post map[string]*Pair `` /* 149-byte string literal not displayed */ Body string `protobuf:"bytes,6,opt,name=body,proto3" json:"body,omitempty"` // raw request body; if not application/x-www-form-urlencoded Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"` // the full url // contains filtered or unexported fields }
func (*Request) Descriptor
deprecated
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) ProtoReflect ¶
func (x *Request) ProtoReflect() protoreflect.Message
type Response ¶
type Response struct { StatusCode int32 `protobuf:"varint,1,opt,name=statusCode,proto3" json:"statusCode,omitempty"` Header map[string]*Pair `` /* 153-byte string literal not displayed */ Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` // contains filtered or unexported fields }
func (*Response) Descriptor
deprecated
func (*Response) GetStatusCode ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
type UnimplementedApiServer ¶ added in v3.8.3
type UnimplementedApiServer struct { }
UnimplementedApiServer can be embedded to have forward compatible implementations.
func (*UnimplementedApiServer) AddToBlockList ¶ added in v3.8.3
func (*UnimplementedApiServer) AddToBlockList(context.Context, *AddToBlockListRequest) (*AddToBlockListResponse, error)
func (*UnimplementedApiServer) ReadBlockList ¶ added in v3.8.3
func (*UnimplementedApiServer) ReadBlockList(context.Context, *ReadBlockListRequest) (*ReadBlockListResponse, error)
func (*UnimplementedApiServer) RemoveFromBlockList ¶ added in v3.8.3
func (*UnimplementedApiServer) RemoveFromBlockList(context.Context, *RemoveFromBlockListRequest) (*RemoveFromBlockListResponse, error)