Documentation ¶
Index ¶
- Variables
- func RegisterOpenWRTServer(s grpc.ServiceRegistrar, srv OpenWRTServer)
- type Empty
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (x *Event) GetEventId() string
- func (x *Event) GetHost() *Host
- func (x *Event) GetNetwork() *Network
- func (x *Event) GetPortForward() *PortForward
- func (x *Event) GetPublicIp() *PublicIP
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type Host
- func (*Host) Descriptor() ([]byte, []int)deprecated
- func (x *Host) GetInstance() string
- func (x *Host) GetIp() string
- func (x *Host) GetMac() string
- func (x *Host) GetNetworkId() string
- func (x *Host) GetState() State
- func (x *Host) GetUserData() []byte
- func (*Host) ProtoMessage()
- func (x *Host) ProtoReflect() protoreflect.Message
- func (x *Host) Reset()
- func (x *Host) String() string
- type Instance
- type Network
- func (*Network) Descriptor() ([]byte, []int)deprecated
- func (x *Network) GetResourceId() string
- func (x *Network) GetState() State
- func (x *Network) GetSubnet() string
- func (x *Network) GetVlanId() int32
- func (*Network) ProtoMessage()
- func (x *Network) ProtoReflect() protoreflect.Message
- func (x *Network) Reset()
- func (x *Network) String() string
- type OpenWRTClient
- type OpenWRTServer
- type OpenWRT_EventStreamClient
- type OpenWRT_EventStreamServer
- type PortForward
- func (*PortForward) Descriptor() ([]byte, []int)deprecated
- func (x *PortForward) GetId() string
- func (x *PortForward) GetInternalHost() string
- func (x *PortForward) GetInternalNetwork() string
- func (x *PortForward) GetInternalPort() int32
- func (x *PortForward) GetPublicIP() string
- func (x *PortForward) GetPublicNetwork() string
- func (x *PortForward) GetPublicPort() int32
- func (*PortForward) ProtoMessage()
- func (x *PortForward) ProtoReflect() protoreflect.Message
- func (x *PortForward) Reset()
- func (x *PortForward) String() string
- type PublicIP
- func (*PublicIP) Descriptor() ([]byte, []int)deprecated
- func (x *PublicIP) GetAddress() string
- func (x *PublicIP) GetId() string
- func (x *PublicIP) GetNetmask() string
- func (*PublicIP) ProtoMessage()
- func (x *PublicIP) ProtoReflect() protoreflect.Message
- func (x *PublicIP) Reset()
- func (x *PublicIP) String() string
- type State
- type Token
- type UnimplementedOpenWRTServer
- type UnsafeOpenWRTServer
Constants ¶
This section is empty.
Variables ¶
var ( State_name = map[int32]string{ 0: "ACTIVE", 1: "DELETED", } State_value = map[string]int32{ "ACTIVE": 0, "DELETED": 1, } )
Enum value maps for State.
var File_protos_openwrt_proto protoreflect.FileDescriptor
var OpenWRT_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protos.OpenWRT", HandlerType: (*OpenWRTServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetToken", Handler: _OpenWRT_GetToken_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "EventStream", Handler: _OpenWRT_EventStream_Handler, ServerStreams: true, }, }, Metadata: "protos/openwrt.proto", }
OpenWRT_ServiceDesc is the grpc.ServiceDesc for OpenWRT service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOpenWRTServer ¶
func RegisterOpenWRTServer(s grpc.ServiceRegistrar, srv OpenWRTServer)
Types ¶
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Event ¶
type Event struct { EventId string `protobuf:"bytes,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` Network *Network `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` Host *Host `protobuf:"bytes,3,opt,name=host,proto3" json:"host,omitempty"` PublicIp *PublicIP `protobuf:"bytes,4,opt,name=public_ip,json=publicIp,proto3" json:"public_ip,omitempty"` PortForward *PortForward `protobuf:"bytes,5,opt,name=port_forward,json=portForward,proto3" json:"port_forward,omitempty"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetEventId ¶
func (*Event) GetNetwork ¶
func (*Event) GetPortForward ¶
func (x *Event) GetPortForward() *PortForward
func (*Event) GetPublicIp ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type Host ¶
type Host struct { NetworkId string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"` State State `protobuf:"varint,2,opt,name=state,proto3,enum=protos.State" json:"state,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"` Instance string `protobuf:"bytes,5,opt,name=instance,proto3" json:"instance,omitempty"` UserData []byte `protobuf:"bytes,6,opt,name=user_data,json=userData,proto3" json:"user_data,omitempty"` // contains filtered or unexported fields }
func (*Host) Descriptor
deprecated
func (*Host) GetInstance ¶
func (*Host) GetNetworkId ¶
func (*Host) GetUserData ¶
func (*Host) ProtoMessage ¶
func (*Host) ProtoMessage()
func (*Host) ProtoReflect ¶
func (x *Host) ProtoReflect() protoreflect.Message
type Instance ¶
type Instance struct { Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` // contains filtered or unexported fields }
func (*Instance) Descriptor
deprecated
func (*Instance) GetHostname ¶
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
func (*Instance) ProtoReflect ¶
func (x *Instance) ProtoReflect() protoreflect.Message
type Network ¶
type Network struct { ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` State State `protobuf:"varint,2,opt,name=state,proto3,enum=protos.State" json:"state,omitempty"` VlanId int32 `protobuf:"varint,3,opt,name=vlan_id,json=vlanId,proto3" json:"vlan_id,omitempty"` Subnet string `protobuf:"bytes,4,opt,name=subnet,proto3" json:"subnet,omitempty"` // contains filtered or unexported fields }
func (*Network) Descriptor
deprecated
func (*Network) GetResourceId ¶
func (*Network) ProtoMessage ¶
func (*Network) ProtoMessage()
func (*Network) ProtoReflect ¶
func (x *Network) ProtoReflect() protoreflect.Message
type OpenWRTClient ¶
type OpenWRTClient interface { EventStream(ctx context.Context, in *Empty, opts ...grpc.CallOption) (OpenWRT_EventStreamClient, error) GetToken(ctx context.Context, in *Instance, opts ...grpc.CallOption) (*Token, error) }
OpenWRTClient is the client API for OpenWRT 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 NewOpenWRTClient ¶
func NewOpenWRTClient(cc grpc.ClientConnInterface) OpenWRTClient
type OpenWRTServer ¶
type OpenWRTServer interface { EventStream(*Empty, OpenWRT_EventStreamServer) error GetToken(context.Context, *Instance) (*Token, error) // contains filtered or unexported methods }
OpenWRTServer is the server API for OpenWRT service. All implementations must embed UnimplementedOpenWRTServer for forward compatibility
type OpenWRT_EventStreamClient ¶
type OpenWRT_EventStreamClient interface { Recv() (*Event, error) grpc.ClientStream }
type OpenWRT_EventStreamServer ¶
type OpenWRT_EventStreamServer interface { Send(*Event) error grpc.ServerStream }
type PortForward ¶
type PortForward struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` PublicIP string `protobuf:"bytes,2,opt,name=publicIP,proto3" json:"publicIP,omitempty"` PublicNetwork string `protobuf:"bytes,3,opt,name=publicNetwork,proto3" json:"publicNetwork,omitempty"` PublicPort int32 `protobuf:"varint,4,opt,name=publicPort,proto3" json:"publicPort,omitempty"` InternalNetwork string `protobuf:"bytes,5,opt,name=internalNetwork,proto3" json:"internalNetwork,omitempty"` InternalHost string `protobuf:"bytes,6,opt,name=internalHost,proto3" json:"internalHost,omitempty"` InternalPort int32 `protobuf:"varint,7,opt,name=internalPort,proto3" json:"internalPort,omitempty"` // contains filtered or unexported fields }
func (*PortForward) Descriptor
deprecated
func (*PortForward) Descriptor() ([]byte, []int)
Deprecated: Use PortForward.ProtoReflect.Descriptor instead.
func (*PortForward) GetId ¶
func (x *PortForward) GetId() string
func (*PortForward) GetInternalHost ¶
func (x *PortForward) GetInternalHost() string
func (*PortForward) GetInternalNetwork ¶
func (x *PortForward) GetInternalNetwork() string
func (*PortForward) GetInternalPort ¶
func (x *PortForward) GetInternalPort() int32
func (*PortForward) GetPublicIP ¶
func (x *PortForward) GetPublicIP() string
func (*PortForward) GetPublicNetwork ¶
func (x *PortForward) GetPublicNetwork() string
func (*PortForward) GetPublicPort ¶
func (x *PortForward) GetPublicPort() int32
func (*PortForward) ProtoMessage ¶
func (*PortForward) ProtoMessage()
func (*PortForward) ProtoReflect ¶
func (x *PortForward) ProtoReflect() protoreflect.Message
func (*PortForward) Reset ¶
func (x *PortForward) Reset()
func (*PortForward) String ¶
func (x *PortForward) String() string
type PublicIP ¶
type PublicIP struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` Netmask string `protobuf:"bytes,3,opt,name=netmask,proto3" json:"netmask,omitempty"` // contains filtered or unexported fields }
func (*PublicIP) Descriptor
deprecated
func (*PublicIP) GetAddress ¶
func (*PublicIP) GetNetmask ¶
func (*PublicIP) ProtoMessage ¶
func (*PublicIP) ProtoMessage()
func (*PublicIP) ProtoReflect ¶
func (x *PublicIP) ProtoReflect() protoreflect.Message
type State ¶
type State int32
func (State) Descriptor ¶
func (State) Descriptor() protoreflect.EnumDescriptor
func (State) EnumDescriptor
deprecated
func (State) Number ¶
func (x State) Number() protoreflect.EnumNumber
func (State) Type ¶
func (State) Type() protoreflect.EnumType
type Token ¶
type Token struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type UnimplementedOpenWRTServer ¶
type UnimplementedOpenWRTServer struct { }
UnimplementedOpenWRTServer must be embedded to have forward compatible implementations.
func (UnimplementedOpenWRTServer) EventStream ¶
func (UnimplementedOpenWRTServer) EventStream(*Empty, OpenWRT_EventStreamServer) error
type UnsafeOpenWRTServer ¶
type UnsafeOpenWRTServer interface {
// contains filtered or unexported methods
}
UnsafeOpenWRTServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OpenWRTServer will result in compilation errors.