Documentation
¶
Overview ¶
Package grpc_from0 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterMakeInterfaceDumpHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMakeInterfaceDumpHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MakeInterfaceDumpClient) error
- func RegisterMakeInterfaceDumpHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMakeInterfaceDumpHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MakeInterfaceDumpServer) error
- func RegisterMakeInterfaceDumpServer(s *grpc.Server, srv MakeInterfaceDumpServer)
- type Dump
- type MakeInterfaceDumpClient
- type MakeInterfaceDumpRequest
- func (*MakeInterfaceDumpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MakeInterfaceDumpRequest) GetDns() string
- func (x *MakeInterfaceDumpRequest) GetGateway() string
- func (x *MakeInterfaceDumpRequest) GetId() string
- func (x *MakeInterfaceDumpRequest) GetIp() string
- func (x *MakeInterfaceDumpRequest) GetMac() string
- func (x *MakeInterfaceDumpRequest) GetName() string
- func (*MakeInterfaceDumpRequest) ProtoMessage()
- func (x *MakeInterfaceDumpRequest) ProtoReflect() protoreflect.Message
- func (x *MakeInterfaceDumpRequest) Reset()
- func (x *MakeInterfaceDumpRequest) String() string
- type MakeInterfaceDumpServer
- type UnimplementedMakeInterfaceDumpServer
Constants ¶
This section is empty.
Variables ¶
var File_make_interface_dump_proto protoreflect.FileDescriptor
Functions ¶
func RegisterMakeInterfaceDumpHandler ¶
func RegisterMakeInterfaceDumpHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterMakeInterfaceDumpHandler registers the http handlers for service MakeInterfaceDump to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMakeInterfaceDumpHandlerClient ¶
func RegisterMakeInterfaceDumpHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MakeInterfaceDumpClient) error
RegisterMakeInterfaceDumpHandlerClient registers the http handlers for service MakeInterfaceDump to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MakeInterfaceDumpClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MakeInterfaceDumpClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MakeInterfaceDumpClient" to call the correct interceptors.
func RegisterMakeInterfaceDumpHandlerFromEndpoint ¶
func RegisterMakeInterfaceDumpHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMakeInterfaceDumpHandlerFromEndpoint is same as RegisterMakeInterfaceDumpHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMakeInterfaceDumpHandlerServer ¶
func RegisterMakeInterfaceDumpHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MakeInterfaceDumpServer) error
RegisterMakeInterfaceDumpHandlerServer registers the http handlers for service MakeInterfaceDump to "mux". UnaryRPC :call MakeInterfaceDumpServer 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 RegisterMakeInterfaceDumpHandlerFromEndpoint instead.
func RegisterMakeInterfaceDumpServer ¶
func RegisterMakeInterfaceDumpServer(s *grpc.Server, srv MakeInterfaceDumpServer)
Types ¶
type Dump ¶
type Dump struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Dump) Descriptor
deprecated
func (*Dump) ProtoMessage ¶
func (*Dump) ProtoMessage()
func (*Dump) ProtoReflect ¶
func (x *Dump) ProtoReflect() protoreflect.Message
type MakeInterfaceDumpClient ¶
type MakeInterfaceDumpClient interface {
MakeInterfaceDump(ctx context.Context, in *MakeInterfaceDumpRequest, opts ...grpc.CallOption) (*Dump, error)
}
MakeInterfaceDumpClient is the client API for MakeInterfaceDump service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMakeInterfaceDumpClient ¶
func NewMakeInterfaceDumpClient(cc grpc.ClientConnInterface) MakeInterfaceDumpClient
type MakeInterfaceDumpRequest ¶
type MakeInterfaceDumpRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Mac string `protobuf:"bytes,3,opt,name=mac,proto3" json:"mac,omitempty"` Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"` Dns string `protobuf:"bytes,5,opt,name=dns,proto3" json:"dns,omitempty"` Gateway string `protobuf:"bytes,6,opt,name=gateway,proto3" json:"gateway,omitempty"` // contains filtered or unexported fields }
func (*MakeInterfaceDumpRequest) Descriptor
deprecated
func (*MakeInterfaceDumpRequest) Descriptor() ([]byte, []int)
Deprecated: Use MakeInterfaceDumpRequest.ProtoReflect.Descriptor instead.
func (*MakeInterfaceDumpRequest) GetDns ¶
func (x *MakeInterfaceDumpRequest) GetDns() string
func (*MakeInterfaceDumpRequest) GetGateway ¶
func (x *MakeInterfaceDumpRequest) GetGateway() string
func (*MakeInterfaceDumpRequest) GetId ¶
func (x *MakeInterfaceDumpRequest) GetId() string
func (*MakeInterfaceDumpRequest) GetIp ¶
func (x *MakeInterfaceDumpRequest) GetIp() string
func (*MakeInterfaceDumpRequest) GetMac ¶
func (x *MakeInterfaceDumpRequest) GetMac() string
func (*MakeInterfaceDumpRequest) GetName ¶
func (x *MakeInterfaceDumpRequest) GetName() string
func (*MakeInterfaceDumpRequest) ProtoMessage ¶
func (*MakeInterfaceDumpRequest) ProtoMessage()
func (*MakeInterfaceDumpRequest) ProtoReflect ¶
func (x *MakeInterfaceDumpRequest) ProtoReflect() protoreflect.Message
func (*MakeInterfaceDumpRequest) Reset ¶
func (x *MakeInterfaceDumpRequest) Reset()
func (*MakeInterfaceDumpRequest) String ¶
func (x *MakeInterfaceDumpRequest) String() string
type MakeInterfaceDumpServer ¶
type MakeInterfaceDumpServer interface {
MakeInterfaceDump(context.Context, *MakeInterfaceDumpRequest) (*Dump, error)
}
MakeInterfaceDumpServer is the server API for MakeInterfaceDump service.
type UnimplementedMakeInterfaceDumpServer ¶
type UnimplementedMakeInterfaceDumpServer struct { }
UnimplementedMakeInterfaceDumpServer can be embedded to have forward compatible implementations.
func (*UnimplementedMakeInterfaceDumpServer) MakeInterfaceDump ¶
func (*UnimplementedMakeInterfaceDumpServer) MakeInterfaceDump(context.Context, *MakeInterfaceDumpRequest) (*Dump, error)