pb

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package pb is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_log_proto protoreflect.FileDescriptor

Functions

func RegisterLogServiceHandler

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

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

func RegisterLogServiceHandlerClient

func RegisterLogServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LogServiceClient) error

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

func RegisterLogServiceHandlerFromEndpoint

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

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

func RegisterLogServiceHandlerServer

func RegisterLogServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LogServiceServer) error

RegisterLogServiceHandlerServer registers the http handlers for service LogService to "mux". UnaryRPC :call LogServiceServer 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 RegisterLogServiceHandlerFromEndpoint instead.

func RegisterLogServiceServer

func RegisterLogServiceServer(s *grpc.Server, srv LogServiceServer)

Types

type DHCPLog

type DHCPLog struct {
	Ip        string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
	Timestamp string `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Message   string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*DHCPLog) Descriptor deprecated

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

Deprecated: Use DHCPLog.ProtoReflect.Descriptor instead.

func (*DHCPLog) GetIp

func (x *DHCPLog) GetIp() string

func (*DHCPLog) GetMessage

func (x *DHCPLog) GetMessage() string

func (*DHCPLog) GetTimestamp

func (x *DHCPLog) GetTimestamp() string

func (*DHCPLog) ProtoMessage

func (*DHCPLog) ProtoMessage()

func (*DHCPLog) ProtoReflect

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

func (*DHCPLog) Reset

func (x *DHCPLog) Reset()

func (*DHCPLog) String

func (x *DHCPLog) String() string

type DHCPLogsRequest

type DHCPLogsRequest struct {
	MAC  string `protobuf:"bytes,1,opt,name=MAC,proto3" json:"MAC,omitempty"`
	From int64  `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"`
	To   int64  `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*DHCPLogsRequest) Descriptor deprecated

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

Deprecated: Use DHCPLogsRequest.ProtoReflect.Descriptor instead.

func (*DHCPLogsRequest) GetFrom

func (x *DHCPLogsRequest) GetFrom() int64

func (*DHCPLogsRequest) GetMAC

func (x *DHCPLogsRequest) GetMAC() string

func (*DHCPLogsRequest) GetTo

func (x *DHCPLogsRequest) GetTo() int64

func (*DHCPLogsRequest) ProtoMessage

func (*DHCPLogsRequest) ProtoMessage()

func (*DHCPLogsRequest) ProtoReflect

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

func (*DHCPLogsRequest) Reset

func (x *DHCPLogsRequest) Reset()

func (*DHCPLogsRequest) String

func (x *DHCPLogsRequest) String() string

type DHCPLogsResponse

type DHCPLogsResponse struct {
	Logs []*DHCPLog `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"`
	// contains filtered or unexported fields
}

func (*DHCPLogsResponse) Descriptor deprecated

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

Deprecated: Use DHCPLogsResponse.ProtoReflect.Descriptor instead.

func (*DHCPLogsResponse) GetLogs

func (x *DHCPLogsResponse) GetLogs() []*DHCPLog

func (*DHCPLogsResponse) ProtoMessage

func (*DHCPLogsResponse) ProtoMessage()

func (*DHCPLogsResponse) ProtoReflect

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

func (*DHCPLogsResponse) Reset

func (x *DHCPLogsResponse) Reset()

func (*DHCPLogsResponse) String

func (x *DHCPLogsResponse) String() string

type LogServiceClient

type LogServiceClient interface {
	GetDHCPLogs(ctx context.Context, in *DHCPLogsRequest, opts ...grpc.CallOption) (*DHCPLogsResponse, error)
	GetNginxLogs(ctx context.Context, in *NginxLogsRequest, opts ...grpc.CallOption) (*NginxLogsResponse, error)
	GetNginxHosts(ctx context.Context, in *NginxHostsRequest, opts ...grpc.CallOption) (*NginxHostsResponse, error)
	GetSwitchLogs(ctx context.Context, in *SwitchLogsRequest, opts ...grpc.CallOption) (*SwitchLogsResponse, error)
	GetSimilarSwitches(ctx context.Context, in *SimilarSwitchesRequest, opts ...grpc.CallOption) (*SimilarSwitchesResponse, error)
}

LogServiceClient is the client API for LogService service.

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

func NewLogServiceClient

func NewLogServiceClient(cc grpc.ClientConnInterface) LogServiceClient

type LogServiceServer

LogServiceServer is the server API for LogService service.

type NginxHost added in v1.2.0

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

func (*NginxHost) Descriptor deprecated added in v1.2.0

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

Deprecated: Use NginxHost.ProtoReflect.Descriptor instead.

func (*NginxHost) GetName added in v1.2.0

func (x *NginxHost) GetName() string

func (*NginxHost) ProtoMessage added in v1.2.0

func (*NginxHost) ProtoMessage()

func (*NginxHost) ProtoReflect added in v1.2.0

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

func (*NginxHost) Reset added in v1.2.0

func (x *NginxHost) Reset()

func (*NginxHost) String added in v1.2.0

func (x *NginxHost) String() string

type NginxHostsRequest added in v1.2.0

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

func (*NginxHostsRequest) Descriptor deprecated added in v1.2.0

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

Deprecated: Use NginxHostsRequest.ProtoReflect.Descriptor instead.

func (*NginxHostsRequest) ProtoMessage added in v1.2.0

func (*NginxHostsRequest) ProtoMessage()

func (*NginxHostsRequest) ProtoReflect added in v1.2.0

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

func (*NginxHostsRequest) Reset added in v1.2.0

func (x *NginxHostsRequest) Reset()

func (*NginxHostsRequest) String added in v1.2.0

func (x *NginxHostsRequest) String() string

type NginxHostsResponse added in v1.2.0

type NginxHostsResponse struct {
	Hosts []*NginxHost `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"`
	// contains filtered or unexported fields
}

func (*NginxHostsResponse) Descriptor deprecated added in v1.2.0

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

Deprecated: Use NginxHostsResponse.ProtoReflect.Descriptor instead.

func (*NginxHostsResponse) GetHosts added in v1.2.0

func (x *NginxHostsResponse) GetHosts() []*NginxHost

func (*NginxHostsResponse) ProtoMessage added in v1.2.0

func (*NginxHostsResponse) ProtoMessage()

func (*NginxHostsResponse) ProtoReflect added in v1.2.0

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

func (*NginxHostsResponse) Reset added in v1.2.0

func (x *NginxHostsResponse) Reset()

func (*NginxHostsResponse) String added in v1.2.0

func (x *NginxHostsResponse) String() string

type NginxLog added in v1.2.0

type NginxLog struct {
	Timestamp string `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Message   string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Facility  string `protobuf:"bytes,3,opt,name=facility,proto3" json:"facility,omitempty"`
	Severity  string `protobuf:"bytes,4,opt,name=severity,proto3" json:"severity,omitempty"`
	// contains filtered or unexported fields
}

func (*NginxLog) Descriptor deprecated added in v1.2.0

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

Deprecated: Use NginxLog.ProtoReflect.Descriptor instead.

func (*NginxLog) GetFacility added in v1.2.0

func (x *NginxLog) GetFacility() string

func (*NginxLog) GetMessage added in v1.2.0

func (x *NginxLog) GetMessage() string

func (*NginxLog) GetSeverity added in v1.2.0

func (x *NginxLog) GetSeverity() string

func (*NginxLog) GetTimestamp added in v1.2.0

func (x *NginxLog) GetTimestamp() string

func (*NginxLog) ProtoMessage added in v1.2.0

func (*NginxLog) ProtoMessage()

func (*NginxLog) ProtoReflect added in v1.2.0

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

func (*NginxLog) Reset added in v1.2.0

func (x *NginxLog) Reset()

func (*NginxLog) String added in v1.2.0

func (x *NginxLog) String() string

type NginxLogsRequest added in v1.2.0

type NginxLogsRequest struct {
	Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
	From     int64  `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"`
	To       int64  `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*NginxLogsRequest) Descriptor deprecated added in v1.2.0

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

Deprecated: Use NginxLogsRequest.ProtoReflect.Descriptor instead.

func (*NginxLogsRequest) GetFrom added in v1.2.0

func (x *NginxLogsRequest) GetFrom() int64

func (*NginxLogsRequest) GetHostname added in v1.2.0

func (x *NginxLogsRequest) GetHostname() string

func (*NginxLogsRequest) GetTo added in v1.2.0

func (x *NginxLogsRequest) GetTo() int64

func (*NginxLogsRequest) ProtoMessage added in v1.2.0

func (*NginxLogsRequest) ProtoMessage()

func (*NginxLogsRequest) ProtoReflect added in v1.2.0

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

func (*NginxLogsRequest) Reset added in v1.2.0

func (x *NginxLogsRequest) Reset()

func (*NginxLogsRequest) String added in v1.2.0

func (x *NginxLogsRequest) String() string

type NginxLogsResponse added in v1.2.0

type NginxLogsResponse struct {
	Logs []*NginxLog `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"`
	// contains filtered or unexported fields
}

func (*NginxLogsResponse) Descriptor deprecated added in v1.2.0

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

Deprecated: Use NginxLogsResponse.ProtoReflect.Descriptor instead.

func (*NginxLogsResponse) GetLogs added in v1.2.0

func (x *NginxLogsResponse) GetLogs() []*NginxLog

func (*NginxLogsResponse) ProtoMessage added in v1.2.0

func (*NginxLogsResponse) ProtoMessage()

func (*NginxLogsResponse) ProtoReflect added in v1.2.0

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

func (*NginxLogsResponse) Reset added in v1.2.0

func (x *NginxLogsResponse) Reset()

func (*NginxLogsResponse) String added in v1.2.0

func (x *NginxLogsResponse) String() string

type SimilarSwitch

type SimilarSwitch struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	IP   string `protobuf:"bytes,2,opt,name=IP,proto3" json:"IP,omitempty"`
	// contains filtered or unexported fields
}

func (*SimilarSwitch) Descriptor deprecated

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

Deprecated: Use SimilarSwitch.ProtoReflect.Descriptor instead.

func (*SimilarSwitch) GetIP

func (x *SimilarSwitch) GetIP() string

func (*SimilarSwitch) GetName

func (x *SimilarSwitch) GetName() string

func (*SimilarSwitch) ProtoMessage

func (*SimilarSwitch) ProtoMessage()

func (*SimilarSwitch) ProtoReflect

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

func (*SimilarSwitch) Reset

func (x *SimilarSwitch) Reset()

func (*SimilarSwitch) String

func (x *SimilarSwitch) String() string

type SimilarSwitchesRequest

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

func (*SimilarSwitchesRequest) Descriptor deprecated

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

Deprecated: Use SimilarSwitchesRequest.ProtoReflect.Descriptor instead.

func (*SimilarSwitchesRequest) GetName

func (x *SimilarSwitchesRequest) GetName() string

func (*SimilarSwitchesRequest) ProtoMessage

func (*SimilarSwitchesRequest) ProtoMessage()

func (*SimilarSwitchesRequest) ProtoReflect

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

func (*SimilarSwitchesRequest) Reset

func (x *SimilarSwitchesRequest) Reset()

func (*SimilarSwitchesRequest) String

func (x *SimilarSwitchesRequest) String() string

type SimilarSwitchesResponse

type SimilarSwitchesResponse struct {
	Switches []*SimilarSwitch `protobuf:"bytes,1,rep,name=switches,proto3" json:"switches,omitempty"`
	// contains filtered or unexported fields
}

func (*SimilarSwitchesResponse) Descriptor deprecated

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

Deprecated: Use SimilarSwitchesResponse.ProtoReflect.Descriptor instead.

func (*SimilarSwitchesResponse) GetSwitches

func (x *SimilarSwitchesResponse) GetSwitches() []*SimilarSwitch

func (*SimilarSwitchesResponse) ProtoMessage

func (*SimilarSwitchesResponse) ProtoMessage()

func (*SimilarSwitchesResponse) ProtoReflect

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

func (*SimilarSwitchesResponse) Reset

func (x *SimilarSwitchesResponse) Reset()

func (*SimilarSwitchesResponse) String

func (x *SimilarSwitchesResponse) String() string

type SwitchLog

type SwitchLog struct {
	TsLocal  string `protobuf:"bytes,1,opt,name=ts_local,json=tsLocal,proto3" json:"ts_local,omitempty"`
	TsRemote string `protobuf:"bytes,2,opt,name=ts_remote,json=tsRemote,proto3" json:"ts_remote,omitempty"`
	Message  string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
	Facility string `protobuf:"bytes,4,opt,name=facility,proto3" json:"facility,omitempty"`
	Severity string `protobuf:"bytes,5,opt,name=severity,proto3" json:"severity,omitempty"`
	// contains filtered or unexported fields
}

func (*SwitchLog) Descriptor deprecated

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

Deprecated: Use SwitchLog.ProtoReflect.Descriptor instead.

func (*SwitchLog) GetFacility added in v1.1.0

func (x *SwitchLog) GetFacility() string

func (*SwitchLog) GetMessage

func (x *SwitchLog) GetMessage() string

func (*SwitchLog) GetSeverity added in v1.1.0

func (x *SwitchLog) GetSeverity() string

func (*SwitchLog) GetTsLocal

func (x *SwitchLog) GetTsLocal() string

func (*SwitchLog) GetTsRemote

func (x *SwitchLog) GetTsRemote() string

func (*SwitchLog) ProtoMessage

func (*SwitchLog) ProtoMessage()

func (*SwitchLog) ProtoReflect

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

func (*SwitchLog) Reset

func (x *SwitchLog) Reset()

func (*SwitchLog) String

func (x *SwitchLog) String() string

type SwitchLogsRequest

type SwitchLogsRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	From int64  `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"`
	To   int64  `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"`
	// contains filtered or unexported fields
}

func (*SwitchLogsRequest) Descriptor deprecated

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

Deprecated: Use SwitchLogsRequest.ProtoReflect.Descriptor instead.

func (*SwitchLogsRequest) GetFrom

func (x *SwitchLogsRequest) GetFrom() int64

func (*SwitchLogsRequest) GetName

func (x *SwitchLogsRequest) GetName() string

func (*SwitchLogsRequest) GetTo

func (x *SwitchLogsRequest) GetTo() int64

func (*SwitchLogsRequest) ProtoMessage

func (*SwitchLogsRequest) ProtoMessage()

func (*SwitchLogsRequest) ProtoReflect

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

func (*SwitchLogsRequest) Reset

func (x *SwitchLogsRequest) Reset()

func (*SwitchLogsRequest) String

func (x *SwitchLogsRequest) String() string

type SwitchLogsResponse

type SwitchLogsResponse struct {
	Logs []*SwitchLog `protobuf:"bytes,1,rep,name=logs,proto3" json:"logs,omitempty"`
	// contains filtered or unexported fields
}

func (*SwitchLogsResponse) Descriptor deprecated

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

Deprecated: Use SwitchLogsResponse.ProtoReflect.Descriptor instead.

func (*SwitchLogsResponse) GetLogs

func (x *SwitchLogsResponse) GetLogs() []*SwitchLog

func (*SwitchLogsResponse) ProtoMessage

func (*SwitchLogsResponse) ProtoMessage()

func (*SwitchLogsResponse) ProtoReflect

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

func (*SwitchLogsResponse) Reset

func (x *SwitchLogsResponse) Reset()

func (*SwitchLogsResponse) String

func (x *SwitchLogsResponse) String() string

type UnimplementedLogServiceServer

type UnimplementedLogServiceServer struct {
}

UnimplementedLogServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedLogServiceServer) GetDHCPLogs

func (*UnimplementedLogServiceServer) GetNginxHosts added in v1.2.0

func (*UnimplementedLogServiceServer) GetNginxLogs added in v1.2.0

func (*UnimplementedLogServiceServer) GetSimilarSwitches

func (*UnimplementedLogServiceServer) GetSwitchLogs

Jump to

Keyboard shortcuts

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