server_proto

package
v0.0.0-...-5ecf4e5 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package server_proto is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_server_server_proto protoreflect.FileDescriptor
View Source
var Greeter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "server.Greeter",
	HandlerType: (*GreeterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InformationPlatformPing",
			Handler:    _Greeter_InformationPlatformPing_Handler,
		},
		{
			MethodName: "InformationPlatformVersion",
			Handler:    _Greeter_InformationPlatformVersion_Handler,
		},
		{
			MethodName: "InformationDevicesSummary",
			Handler:    _Greeter_InformationDevicesSummary_Handler,
		},
		{
			MethodName: "InformationDeviceStatus",
			Handler:    _Greeter_InformationDeviceStatus_Handler,
		},
		{
			MethodName: "InformationDeviceChannelStatus",
			Handler:    _Greeter_InformationDeviceChannelStatus_Handler,
		},
		{
			MethodName: "InformationDeviceChannelStatistic",
			Handler:    _Greeter_InformationDeviceChannelStatistic_Handler,
		},
		{
			MethodName: "InformationDeviceStatistic",
			Handler:    _Greeter_InformationDeviceStatistic_Handler,
		},
		{
			MethodName: "InformationDeviceSummary",
			Handler:    _Greeter_InformationDeviceSummary_Handler,
		},
		{
			MethodName: "InformationPlatformSummary",
			Handler:    _Greeter_InformationPlatformSummary_Handler,
		},
		{
			MethodName: "ConfigurationsDeviceAddition",
			Handler:    _Greeter_ConfigurationsDeviceAddition_Handler,
		},
		{
			MethodName: "ConfigurationsDeviceEditing",
			Handler:    _Greeter_ConfigurationsDeviceEditing_Handler,
		},
		{
			MethodName: "ConfigurationsDeviceDeletion",
			Handler:    _Greeter_ConfigurationsDeviceDeletion_Handler,
		},
		{
			MethodName: "ConfigurationsDeviceReconnection",
			Handler:    _Greeter_ConfigurationsDeviceReconnection_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "server/server.proto",
}

Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGreeterHandler

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

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

func RegisterGreeterHandlerClient

func RegisterGreeterHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GreeterClient) error

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

func RegisterGreeterHandlerFromEndpoint

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

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

func RegisterGreeterHandlerServer

func RegisterGreeterHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GreeterServer) error

RegisterGreeterHandlerServer registers the http handlers for service Greeter to "mux". UnaryRPC :call GreeterServer 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 RegisterGreeterHandlerFromEndpoint instead.

func RegisterGreeterServer

func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer)

Types

type BoolReply

type BoolReply struct {
	Channel bool `protobuf:"varint,1,opt,name=Channel,proto3" json:"Channel,omitempty"`
	// contains filtered or unexported fields
}

func (*BoolReply) Descriptor deprecated

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

Deprecated: Use BoolReply.ProtoReflect.Descriptor instead.

func (*BoolReply) GetChannel

func (x *BoolReply) GetChannel() bool

func (*BoolReply) ProtoMessage

func (*BoolReply) ProtoMessage()

func (*BoolReply) ProtoReflect

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

func (*BoolReply) Reset

func (x *BoolReply) Reset()

func (*BoolReply) String

func (x *BoolReply) String() string

type CodedReply

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

func (*CodedReply) Descriptor deprecated

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

Deprecated: Use CodedReply.ProtoReflect.Descriptor instead.

func (*CodedReply) GetMessage

func (x *CodedReply) GetMessage() string

func (*CodedReply) ProtoMessage

func (*CodedReply) ProtoMessage()

func (*CodedReply) ProtoReflect

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

func (*CodedReply) Reset

func (x *CodedReply) Reset()

func (*CodedReply) String

func (x *CodedReply) String() string

type ConfigurationsDeviceRequest

type ConfigurationsDeviceRequest struct {
	DeviceUniqID string                    `protobuf:"bytes,1,opt,name=DeviceUniqID,proto3" json:"DeviceUniqID,omitempty"`
	ChannelsMode string                    `protobuf:"bytes,2,opt,name=ChannelsMode,proto3" json:"ChannelsMode,omitempty"`
	Name         string                    `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	OnvifURL     string                    `protobuf:"bytes,4,opt,name=OnvifURL,proto3" json:"OnvifURL,omitempty"`
	Channels     map[string]*DeviceChannel `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigurationsDeviceRequest) Descriptor deprecated

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

Deprecated: Use ConfigurationsDeviceRequest.ProtoReflect.Descriptor instead.

func (*ConfigurationsDeviceRequest) GetChannels

func (x *ConfigurationsDeviceRequest) GetChannels() map[string]*DeviceChannel

func (*ConfigurationsDeviceRequest) GetChannelsMode

func (x *ConfigurationsDeviceRequest) GetChannelsMode() string

func (*ConfigurationsDeviceRequest) GetDeviceUniqID

func (x *ConfigurationsDeviceRequest) GetDeviceUniqID() string

func (*ConfigurationsDeviceRequest) GetName

func (x *ConfigurationsDeviceRequest) GetName() string

func (*ConfigurationsDeviceRequest) GetOnvifURL

func (x *ConfigurationsDeviceRequest) GetOnvifURL() string

func (*ConfigurationsDeviceRequest) ProtoMessage

func (*ConfigurationsDeviceRequest) ProtoMessage()

func (*ConfigurationsDeviceRequest) ProtoReflect

func (*ConfigurationsDeviceRequest) Reset

func (x *ConfigurationsDeviceRequest) Reset()

func (*ConfigurationsDeviceRequest) String

func (x *ConfigurationsDeviceRequest) String() string

type DeviceChannel

type DeviceChannel struct {
	Name        string  `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	DataURL     string  `protobuf:"bytes,2,opt,name=DataURL,proto3" json:"DataURL,omitempty"`
	SnapshotURL string  `protobuf:"bytes,3,opt,name=SnapshotURL,proto3" json:"SnapshotURL,omitempty"`
	VOD         bool    `protobuf:"varint,4,opt,name=VOD,proto3" json:"VOD,omitempty"`
	Record      bool    `protobuf:"varint,5,opt,name=Record,proto3" json:"Record,omitempty"`
	RecordTime  uint32  `protobuf:"varint,6,opt,name=RecordTime,proto3" json:"RecordTime,omitempty"`
	Audio       bool    `protobuf:"varint,7,opt,name=Audio,proto3" json:"Audio,omitempty"`
	RTPProxy    bool    `protobuf:"varint,8,opt,name=RTPProxy,proto3" json:"RTPProxy,omitempty"`
	Debug       bool    `protobuf:"varint,9,opt,name=Debug,proto3" json:"Debug,omitempty"`
	DebugRaw    bool    `protobuf:"varint,10,opt,name=DebugRaw,proto3" json:"DebugRaw,omitempty"`
	Status      uint32  `protobuf:"varint,11,opt,name=Status,proto3" json:"Status,omitempty"`
	Bitrate     float32 `protobuf:"fixed32,12,opt,name=Bitrate,proto3" json:"Bitrate,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceChannel) Descriptor deprecated

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

Deprecated: Use DeviceChannel.ProtoReflect.Descriptor instead.

func (*DeviceChannel) GetAudio

func (x *DeviceChannel) GetAudio() bool

func (*DeviceChannel) GetBitrate

func (x *DeviceChannel) GetBitrate() float32

func (*DeviceChannel) GetDataURL

func (x *DeviceChannel) GetDataURL() string

func (*DeviceChannel) GetDebug

func (x *DeviceChannel) GetDebug() bool

func (*DeviceChannel) GetDebugRaw

func (x *DeviceChannel) GetDebugRaw() bool

func (*DeviceChannel) GetName

func (x *DeviceChannel) GetName() string

func (*DeviceChannel) GetRTPProxy

func (x *DeviceChannel) GetRTPProxy() bool

func (*DeviceChannel) GetRecord

func (x *DeviceChannel) GetRecord() bool

func (*DeviceChannel) GetRecordTime

func (x *DeviceChannel) GetRecordTime() uint32

func (*DeviceChannel) GetSnapshotURL

func (x *DeviceChannel) GetSnapshotURL() string

func (*DeviceChannel) GetStatus

func (x *DeviceChannel) GetStatus() uint32

func (*DeviceChannel) GetVOD

func (x *DeviceChannel) GetVOD() bool

func (*DeviceChannel) ProtoMessage

func (*DeviceChannel) ProtoMessage()

func (*DeviceChannel) ProtoReflect

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

func (*DeviceChannel) Reset

func (x *DeviceChannel) Reset()

func (*DeviceChannel) String

func (x *DeviceChannel) String() string

type DeviceUniqID

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

func (*DeviceUniqID) Descriptor deprecated

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

Deprecated: Use DeviceUniqID.ProtoReflect.Descriptor instead.

func (*DeviceUniqID) GetDeviceUniqID

func (x *DeviceUniqID) GetDeviceUniqID() string

func (*DeviceUniqID) ProtoMessage

func (*DeviceUniqID) ProtoMessage()

func (*DeviceUniqID) ProtoReflect

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

func (*DeviceUniqID) Reset

func (x *DeviceUniqID) Reset()

func (*DeviceUniqID) String

func (x *DeviceUniqID) String() string

type DeviceUniqIDAbdChannelUniqID

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

func (*DeviceUniqIDAbdChannelUniqID) Descriptor deprecated

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

Deprecated: Use DeviceUniqIDAbdChannelUniqID.ProtoReflect.Descriptor instead.

func (*DeviceUniqIDAbdChannelUniqID) GetChannelUniqID

func (x *DeviceUniqIDAbdChannelUniqID) GetChannelUniqID() string

func (*DeviceUniqIDAbdChannelUniqID) GetDeviceUniqID

func (x *DeviceUniqIDAbdChannelUniqID) GetDeviceUniqID() string

func (*DeviceUniqIDAbdChannelUniqID) ProtoMessage

func (*DeviceUniqIDAbdChannelUniqID) ProtoMessage()

func (*DeviceUniqIDAbdChannelUniqID) ProtoReflect

func (*DeviceUniqIDAbdChannelUniqID) Reset

func (x *DeviceUniqIDAbdChannelUniqID) Reset()

func (*DeviceUniqIDAbdChannelUniqID) String

type DevicesSummaryReply

type DevicesSummaryReply struct {
	Encoders map[string]*ConfigurationsDeviceRequest `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DevicesSummaryReply) Descriptor deprecated

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

Deprecated: Use DevicesSummaryReply.ProtoReflect.Descriptor instead.

func (*DevicesSummaryReply) GetEncoders

func (*DevicesSummaryReply) ProtoMessage

func (*DevicesSummaryReply) ProtoMessage()

func (*DevicesSummaryReply) ProtoReflect

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

func (*DevicesSummaryReply) Reset

func (x *DevicesSummaryReply) Reset()

func (*DevicesSummaryReply) String

func (x *DevicesSummaryReply) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GreeterClient

type GreeterClient interface {
	InformationPlatformPing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CodedReply, error)
	InformationPlatformVersion(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CodedReply, error)
	InformationDevicesSummary(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DevicesSummaryReply, error)
	InformationDeviceStatus(ctx context.Context, in *DeviceUniqID, opts ...grpc.CallOption) (*MapBoolReply, error)
	InformationDeviceChannelStatus(ctx context.Context, in *DeviceUniqIDAbdChannelUniqID, opts ...grpc.CallOption) (*MapBoolReply, error)
	InformationDeviceChannelStatistic(ctx context.Context, in *DeviceUniqIDAbdChannelUniqID, opts ...grpc.CallOption) (*MapBoolReply, error)
	InformationDeviceStatistic(ctx context.Context, in *DeviceUniqID, opts ...grpc.CallOption) (*CodedReply, error)
	InformationDeviceSummary(ctx context.Context, in *DeviceUniqID, opts ...grpc.CallOption) (*ConfigurationsDeviceRequest, error)
	InformationPlatformSummary(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CodedReply, error)
	ConfigurationsDeviceAddition(ctx context.Context, in *ConfigurationsDeviceRequest, opts ...grpc.CallOption) (*CodedReply, error)
	ConfigurationsDeviceEditing(ctx context.Context, in *ConfigurationsDeviceRequest, opts ...grpc.CallOption) (*CodedReply, error)
	ConfigurationsDeviceDeletion(ctx context.Context, in *DeviceUniqID, opts ...grpc.CallOption) (*CodedReply, error)
	ConfigurationsDeviceReconnection(ctx context.Context, in *DeviceUniqID, opts ...grpc.CallOption) (*CodedReply, error)
}

GreeterClient is the client API for Greeter 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 NewGreeterClient

func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient

type GreeterServer

type GreeterServer interface {
	InformationPlatformPing(context.Context, *Empty) (*CodedReply, error)
	InformationPlatformVersion(context.Context, *Empty) (*CodedReply, error)
	InformationDevicesSummary(context.Context, *Empty) (*DevicesSummaryReply, error)
	InformationDeviceStatus(context.Context, *DeviceUniqID) (*MapBoolReply, error)
	InformationDeviceChannelStatus(context.Context, *DeviceUniqIDAbdChannelUniqID) (*MapBoolReply, error)
	InformationDeviceChannelStatistic(context.Context, *DeviceUniqIDAbdChannelUniqID) (*MapBoolReply, error)
	InformationDeviceStatistic(context.Context, *DeviceUniqID) (*CodedReply, error)
	InformationDeviceSummary(context.Context, *DeviceUniqID) (*ConfigurationsDeviceRequest, error)
	InformationPlatformSummary(context.Context, *Empty) (*CodedReply, error)
	ConfigurationsDeviceAddition(context.Context, *ConfigurationsDeviceRequest) (*CodedReply, error)
	ConfigurationsDeviceEditing(context.Context, *ConfigurationsDeviceRequest) (*CodedReply, error)
	ConfigurationsDeviceDeletion(context.Context, *DeviceUniqID) (*CodedReply, error)
	ConfigurationsDeviceReconnection(context.Context, *DeviceUniqID) (*CodedReply, error)
	// contains filtered or unexported methods
}

GreeterServer is the server API for Greeter service. All implementations must embed UnimplementedGreeterServer for forward compatibility

type MapBoolReply

type MapBoolReply struct {
	Channels map[string]uint32 `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MapBoolReply) Descriptor deprecated

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

Deprecated: Use MapBoolReply.ProtoReflect.Descriptor instead.

func (*MapBoolReply) GetChannels

func (x *MapBoolReply) GetChannels() map[string]uint32

func (*MapBoolReply) ProtoMessage

func (*MapBoolReply) ProtoMessage()

func (*MapBoolReply) ProtoReflect

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

func (*MapBoolReply) Reset

func (x *MapBoolReply) Reset()

func (*MapBoolReply) String

func (x *MapBoolReply) String() string

type UnimplementedGreeterServer

type UnimplementedGreeterServer struct {
}

UnimplementedGreeterServer must be embedded to have forward compatible implementations.

func (UnimplementedGreeterServer) ConfigurationsDeviceAddition

func (UnimplementedGreeterServer) ConfigurationsDeviceDeletion

func (UnimplementedGreeterServer) ConfigurationsDeviceDeletion(context.Context, *DeviceUniqID) (*CodedReply, error)

func (UnimplementedGreeterServer) ConfigurationsDeviceEditing

func (UnimplementedGreeterServer) ConfigurationsDeviceReconnection

func (UnimplementedGreeterServer) ConfigurationsDeviceReconnection(context.Context, *DeviceUniqID) (*CodedReply, error)

func (UnimplementedGreeterServer) InformationDeviceChannelStatistic

func (UnimplementedGreeterServer) InformationDeviceChannelStatus

func (UnimplementedGreeterServer) InformationDeviceStatistic

func (UnimplementedGreeterServer) InformationDeviceStatistic(context.Context, *DeviceUniqID) (*CodedReply, error)

func (UnimplementedGreeterServer) InformationDeviceStatus

func (UnimplementedGreeterServer) InformationDeviceSummary

func (UnimplementedGreeterServer) InformationDevicesSummary

func (UnimplementedGreeterServer) InformationDevicesSummary(context.Context, *Empty) (*DevicesSummaryReply, error)

func (UnimplementedGreeterServer) InformationPlatformPing

func (UnimplementedGreeterServer) InformationPlatformPing(context.Context, *Empty) (*CodedReply, error)

func (UnimplementedGreeterServer) InformationPlatformSummary

func (UnimplementedGreeterServer) InformationPlatformSummary(context.Context, *Empty) (*CodedReply, error)

func (UnimplementedGreeterServer) InformationPlatformVersion

func (UnimplementedGreeterServer) InformationPlatformVersion(context.Context, *Empty) (*CodedReply, error)

type UnsafeGreeterServer

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

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

Jump to

Keyboard shortcuts

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