events

package
v0.0.0-...-28787c5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package events is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	SortOrderEnums_name = map[int32]string{
		0: "UNKNOWN",
		1: "ASC",
		2: "DESC",
	}
	SortOrderEnums_value = map[string]int32{
		"UNKNOWN": 0,
		"ASC":     1,
		"DESC":    2,
	}
)

Enum value maps for SortOrderEnums.

View Source
var File_api_proto_events_proto protoreflect.FileDescriptor

Functions

func RegisterEventsServiceHandler

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

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

func RegisterEventsServiceHandlerClient

func RegisterEventsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client EventsServiceClient) error

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

func RegisterEventsServiceHandlerFromEndpoint

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

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

func RegisterEventsServiceHandlerServer

func RegisterEventsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server EventsServiceServer) error

RegisterEventsServiceHandlerServer registers the http handlers for service EventsService to "mux". UnaryRPC :call EventsServiceServer 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 RegisterEventsServiceHandlerFromEndpoint instead.

func RegisterEventsServiceServer

func RegisterEventsServiceServer(s *grpc.Server, srv EventsServiceServer)

Types

type Event

type Event struct {
	Name   string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Level  string `protobuf:"bytes,2,opt,name=level,proto3" json:"level,omitempty"`
	Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
	// Deprecated: Do not use.
	Timestamp    string            `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Message      string            `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"`
	Extract      map[string]string `` /* 155-byte string literal not displayed */
	Envirionment string            `protobuf:"bytes,7,opt,name=envirionment,proto3" json:"envirionment,omitempty"`
	TimestampInt int64             `protobuf:"varint,8,opt,name=timestamp_int,json=timestampInt,proto3" json:"timestamp_int,omitempty"`
	Hostname     string            `protobuf:"bytes,9,opt,name=hostname,proto3" json:"hostname,omitempty"`
	AppName      string            `protobuf:"bytes,10,opt,name=appName,proto3" json:"appName,omitempty"`
	ProcId       string            `protobuf:"bytes,11,opt,name=procId,proto3" json:"procId,omitempty"`
	Namespace    string            `protobuf:"bytes,12,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Destination  string            `protobuf:"bytes,13,opt,name=destination,proto3" json:"destination,omitempty"`
	GroupName    string            `protobuf:"bytes,14,opt,name=groupName,proto3" json:"groupName,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAppName

func (x *Event) GetAppName() string

func (*Event) GetDestination

func (x *Event) GetDestination() string

func (*Event) GetEnvirionment

func (x *Event) GetEnvirionment() string

func (*Event) GetExtract

func (x *Event) GetExtract() map[string]string

func (*Event) GetGroupName

func (x *Event) GetGroupName() string

func (*Event) GetHostname

func (x *Event) GetHostname() string

func (*Event) GetLevel

func (x *Event) GetLevel() string

func (*Event) GetMessage

func (x *Event) GetMessage() string

func (*Event) GetName

func (x *Event) GetName() string

func (*Event) GetNamespace

func (x *Event) GetNamespace() string

func (*Event) GetProcId

func (x *Event) GetProcId() string

func (*Event) GetSender

func (x *Event) GetSender() string

func (*Event) GetTimestamp deprecated

func (x *Event) GetTimestamp() string

Deprecated: Do not use.

func (*Event) GetTimestampInt

func (x *Event) GetTimestampInt() int64

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

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

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type EventGroupsResponse

type EventGroupsResponse struct {
	GroupNames []string `protobuf:"bytes,1,rep,name=groupNames,proto3" json:"groupNames,omitempty"`
	// contains filtered or unexported fields
}

func (*EventGroupsResponse) Descriptor deprecated

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

Deprecated: Use EventGroupsResponse.ProtoReflect.Descriptor instead.

func (*EventGroupsResponse) GetGroupNames

func (x *EventGroupsResponse) GetGroupNames() []string

func (*EventGroupsResponse) ProtoMessage

func (*EventGroupsResponse) ProtoMessage()

func (*EventGroupsResponse) ProtoReflect

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

func (*EventGroupsResponse) Reset

func (x *EventGroupsResponse) Reset()

func (*EventGroupsResponse) String

func (x *EventGroupsResponse) String() string

type EventsFilter

type EventsFilter struct {
	Names          []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	Search         string   `protobuf:"bytes,2,opt,name=search,proto3" json:"search,omitempty"`
	Level          []string `protobuf:"bytes,3,rep,name=level,proto3" json:"level,omitempty"`
	TimestampStart string   `protobuf:"bytes,4,opt,name=timestamp_start,json=timestampStart,proto3" json:"timestamp_start,omitempty"`
	TimestampEnd   string   `protobuf:"bytes,5,opt,name=timestamp_end,json=timestampEnd,proto3" json:"timestamp_end,omitempty"`
	Hostname       []string `protobuf:"bytes,6,rep,name=hostname,proto3" json:"hostname,omitempty"`
	AppName        []string `protobuf:"bytes,7,rep,name=appName,proto3" json:"appName,omitempty"`
	ProcId         []string `protobuf:"bytes,8,rep,name=procId,proto3" json:"procId,omitempty"`
	Namespace      []string `protobuf:"bytes,9,rep,name=namespace,proto3" json:"namespace,omitempty"`
	GroupNames     []string `protobuf:"bytes,10,rep,name=groupNames,proto3" json:"groupNames,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsFilter) Descriptor deprecated

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

Deprecated: Use EventsFilter.ProtoReflect.Descriptor instead.

func (*EventsFilter) GetAppName

func (x *EventsFilter) GetAppName() []string

func (*EventsFilter) GetGroupNames

func (x *EventsFilter) GetGroupNames() []string

func (*EventsFilter) GetHostname

func (x *EventsFilter) GetHostname() []string

func (*EventsFilter) GetLevel

func (x *EventsFilter) GetLevel() []string

func (*EventsFilter) GetNames

func (x *EventsFilter) GetNames() []string

func (*EventsFilter) GetNamespace

func (x *EventsFilter) GetNamespace() []string

func (*EventsFilter) GetProcId

func (x *EventsFilter) GetProcId() []string

func (*EventsFilter) GetSearch

func (x *EventsFilter) GetSearch() string

func (*EventsFilter) GetTimestampEnd

func (x *EventsFilter) GetTimestampEnd() string

func (*EventsFilter) GetTimestampStart

func (x *EventsFilter) GetTimestampStart() string

func (*EventsFilter) ProtoMessage

func (*EventsFilter) ProtoMessage()

func (*EventsFilter) ProtoReflect

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

func (*EventsFilter) Reset

func (x *EventsFilter) Reset()

func (*EventsFilter) String

func (x *EventsFilter) String() string

type EventsPostRequest

type EventsPostRequest struct {
	Offset         uint64        `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	Count          uint64        `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	Filter         *EventsFilter `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	Sort           *SortOrder    `protobuf:"bytes,4,opt,name=sort,proto3" json:"sort,omitempty"`
	TimestampStart uint64        `protobuf:"varint,5,opt,name=timestamp_start,json=timestampStart,proto3" json:"timestamp_start,omitempty"`
	TimestampEnd   uint64        `protobuf:"varint,6,opt,name=timestamp_end,json=timestampEnd,proto3" json:"timestamp_end,omitempty"`
	Destination    string        `protobuf:"bytes,7,opt,name=destination,proto3" json:"destination,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsPostRequest) Descriptor deprecated

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

Deprecated: Use EventsPostRequest.ProtoReflect.Descriptor instead.

func (*EventsPostRequest) GetCount

func (x *EventsPostRequest) GetCount() uint64

func (*EventsPostRequest) GetDestination

func (x *EventsPostRequest) GetDestination() string

func (*EventsPostRequest) GetFilter

func (x *EventsPostRequest) GetFilter() *EventsFilter

func (*EventsPostRequest) GetOffset

func (x *EventsPostRequest) GetOffset() uint64

func (*EventsPostRequest) GetSort

func (x *EventsPostRequest) GetSort() *SortOrder

func (*EventsPostRequest) GetTimestampEnd

func (x *EventsPostRequest) GetTimestampEnd() uint64

func (*EventsPostRequest) GetTimestampStart

func (x *EventsPostRequest) GetTimestampStart() uint64

func (*EventsPostRequest) ProtoMessage

func (*EventsPostRequest) ProtoMessage()

func (*EventsPostRequest) ProtoReflect

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

func (*EventsPostRequest) Reset

func (x *EventsPostRequest) Reset()

func (*EventsPostRequest) String

func (x *EventsPostRequest) String() string

type EventsResponse

type EventsResponse struct {
	Offset     int64    `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
	Count      int64    `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
	TotalCount int64    `protobuf:"varint,3,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
	Events     []*Event `protobuf:"bytes,4,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

func (*EventsResponse) Descriptor deprecated

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

Deprecated: Use EventsResponse.ProtoReflect.Descriptor instead.

func (*EventsResponse) GetCount

func (x *EventsResponse) GetCount() int64

func (*EventsResponse) GetEvents

func (x *EventsResponse) GetEvents() []*Event

func (*EventsResponse) GetOffset

func (x *EventsResponse) GetOffset() int64

func (*EventsResponse) GetTotalCount

func (x *EventsResponse) GetTotalCount() int64

func (*EventsResponse) ProtoMessage

func (*EventsResponse) ProtoMessage()

func (*EventsResponse) ProtoReflect

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

func (*EventsResponse) Reset

func (x *EventsResponse) Reset()

func (*EventsResponse) String

func (x *EventsResponse) String() string

type EventsServiceClient

type EventsServiceClient interface {
	GetEvents(ctx context.Context, in *EventsPostRequest, opts ...grpc.CallOption) (*EventsResponse, error)
	CreateEvent(ctx context.Context, in *Event, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetEventGroups(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*EventGroupsResponse, error)
}

EventsServiceClient is the client API for EventsService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type EventsServiceServer

type EventsServiceServer interface {
	GetEvents(context.Context, *EventsPostRequest) (*EventsResponse, error)
	CreateEvent(context.Context, *Event) (*emptypb.Empty, error)
	GetEventGroups(context.Context, *emptypb.Empty) (*EventGroupsResponse, error)
}

EventsServiceServer is the server API for EventsService service.

type SortOrder

type SortOrder struct {
	Attribute string         `protobuf:"bytes,1,opt,name=attribute,proto3" json:"attribute,omitempty"`
	Order     SortOrderEnums `protobuf:"varint,2,opt,name=order,proto3,enum=events.SortOrderEnums" json:"order,omitempty"`
	// contains filtered or unexported fields
}

func (*SortOrder) Descriptor deprecated

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

Deprecated: Use SortOrder.ProtoReflect.Descriptor instead.

func (*SortOrder) GetAttribute

func (x *SortOrder) GetAttribute() string

func (*SortOrder) GetOrder

func (x *SortOrder) GetOrder() SortOrderEnums

func (*SortOrder) ProtoMessage

func (*SortOrder) ProtoMessage()

func (*SortOrder) ProtoReflect

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

func (*SortOrder) Reset

func (x *SortOrder) Reset()

func (*SortOrder) String

func (x *SortOrder) String() string

type SortOrderEnums

type SortOrderEnums int32
const (
	SortOrderEnums_UNKNOWN SortOrderEnums = 0
	SortOrderEnums_ASC     SortOrderEnums = 1
	SortOrderEnums_DESC    SortOrderEnums = 2
)

func (SortOrderEnums) Descriptor

func (SortOrderEnums) Enum

func (x SortOrderEnums) Enum() *SortOrderEnums

func (SortOrderEnums) EnumDescriptor deprecated

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

Deprecated: Use SortOrderEnums.Descriptor instead.

func (SortOrderEnums) Number

func (SortOrderEnums) String

func (x SortOrderEnums) String() string

func (SortOrderEnums) Type

type UnimplementedEventsServiceServer

type UnimplementedEventsServiceServer struct {
}

UnimplementedEventsServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedEventsServiceServer) CreateEvent

func (*UnimplementedEventsServiceServer) GetEventGroups

func (*UnimplementedEventsServiceServer) GetEvents

Jump to

Keyboard shortcuts

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