go_micro_srv_devices

package
v2.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_devices_devices_proto protoreflect.FileDescriptor

Functions

func NewDevicesServiceEndpoints

func NewDevicesServiceEndpoints() []*api.Endpoint

func RegisterDevicesServiceHandler

func RegisterDevicesServiceHandler(s server.Server, hdlr DevicesServiceHandler, opts ...server.HandlerOption) error

Types

type Device

type Device struct {
	Id            uint32      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name          string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Type          *DeviceType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Group         int32       `protobuf:"varint,4,opt,name=group,proto3" json:"group,omitempty"`
	Spcript       uint32      `protobuf:"varint,5,opt,name=spcript,proto3" json:"spcript,omitempty"`
	ConfigJSON    string      `protobuf:"bytes,6,opt,name=configJSON,proto3" json:"configJSON,omitempty"`
	Provider      string      `protobuf:"bytes,7,opt,name=provider,proto3" json:"provider,omitempty"`
	ConnectStatus int32       `protobuf:"varint,8,opt,name=connectStatus,proto3" json:"connectStatus,omitempty"`
	Description   string      `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Device) Descriptor deprecated

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

Deprecated: Use Device.ProtoReflect.Descriptor instead.

func (*Device) GetConfigJSON

func (x *Device) GetConfigJSON() string

func (*Device) GetConnectStatus

func (x *Device) GetConnectStatus() int32

func (*Device) GetDescription

func (x *Device) GetDescription() string

func (*Device) GetGroup

func (x *Device) GetGroup() int32

func (*Device) GetId

func (x *Device) GetId() uint32

func (*Device) GetName

func (x *Device) GetName() string

func (*Device) GetProvider

func (x *Device) GetProvider() string

func (*Device) GetSpcript

func (x *Device) GetSpcript() uint32

func (*Device) GetType

func (x *Device) GetType() *DeviceType

func (*Device) ProtoMessage

func (*Device) ProtoMessage()

func (*Device) ProtoReflect

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

func (*Device) Reset

func (x *Device) Reset()

func (*Device) String

func (x *Device) String() string

type DeviceFilter

type DeviceFilter struct {
	And           []*DeviceFilter       `protobuf:"bytes,1,rep,name=and,proto3" json:"and,omitempty"`
	Or            []*DeviceFilter       `protobuf:"bytes,2,rep,name=or,proto3" json:"or,omitempty"`
	Id            *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	IdIn          []uint32              `protobuf:"varint,4,rep,packed,name=idIn,proto3" json:"idIn,omitempty"`
	Name          *wrappers.StringValue `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"`
	NameIn        []string              `protobuf:"bytes,6,rep,name=nameIn,proto3" json:"nameIn,omitempty"`
	Type          *DeviceTypeFilter     `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
	Group         *wrappers.UInt32Value `protobuf:"bytes,7,opt,name=group,proto3" json:"group,omitempty"`
	GroupIn       []uint32              `protobuf:"varint,8,rep,packed,name=groupIn,proto3" json:"groupIn,omitempty"`
	ConnectStatus *wrappers.Int32Value  `protobuf:"bytes,9,opt,name=connectStatus,proto3" json:"connectStatus,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceFilter) Descriptor deprecated

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

Deprecated: Use DeviceFilter.ProtoReflect.Descriptor instead.

func (*DeviceFilter) GetAnd

func (x *DeviceFilter) GetAnd() []*DeviceFilter

func (*DeviceFilter) GetConnectStatus

func (x *DeviceFilter) GetConnectStatus() *wrappers.Int32Value

func (*DeviceFilter) GetGroup

func (x *DeviceFilter) GetGroup() *wrappers.UInt32Value

func (*DeviceFilter) GetGroupIn

func (x *DeviceFilter) GetGroupIn() []uint32

func (*DeviceFilter) GetId

func (x *DeviceFilter) GetId() *wrappers.UInt32Value

func (*DeviceFilter) GetIdIn

func (x *DeviceFilter) GetIdIn() []uint32

func (*DeviceFilter) GetName

func (x *DeviceFilter) GetName() *wrappers.StringValue

func (*DeviceFilter) GetNameIn

func (x *DeviceFilter) GetNameIn() []string

func (*DeviceFilter) GetOr

func (x *DeviceFilter) GetOr() []*DeviceFilter

func (*DeviceFilter) GetType

func (x *DeviceFilter) GetType() *DeviceTypeFilter

func (*DeviceFilter) ProtoMessage

func (*DeviceFilter) ProtoMessage()

func (*DeviceFilter) ProtoReflect

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

func (*DeviceFilter) Reset

func (x *DeviceFilter) Reset()

func (*DeviceFilter) String

func (x *DeviceFilter) String() string

type DeviceQuery

type DeviceQuery struct {
	Page    uint32        `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
	PerPage uint32        `protobuf:"varint,4,opt,name=perPage,proto3" json:"perPage,omitempty"`
	Filter  *DeviceFilter `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceQuery) Descriptor deprecated

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

Deprecated: Use DeviceQuery.ProtoReflect.Descriptor instead.

func (*DeviceQuery) GetFilter

func (x *DeviceQuery) GetFilter() *DeviceFilter

func (*DeviceQuery) GetPage

func (x *DeviceQuery) GetPage() uint32

func (*DeviceQuery) GetPerPage

func (x *DeviceQuery) GetPerPage() uint32

func (*DeviceQuery) ProtoMessage

func (*DeviceQuery) ProtoMessage()

func (*DeviceQuery) ProtoReflect

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

func (*DeviceQuery) Reset

func (x *DeviceQuery) Reset()

func (*DeviceQuery) String

func (x *DeviceQuery) String() string

type DeviceRequest

type DeviceRequest struct {
	Id          uint32      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string      `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Type        *DeviceType `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Group       int32       `protobuf:"varint,4,opt,name=group,proto3" json:"group,omitempty"`
	Spcript     uint32      `protobuf:"varint,5,opt,name=spcript,proto3" json:"spcript,omitempty"`
	ConfigJSON  string      `protobuf:"bytes,6,opt,name=configJSON,proto3" json:"configJSON,omitempty"`
	Provider    string      `protobuf:"bytes,7,opt,name=provider,proto3" json:"provider,omitempty"`
	Description string      `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceRequest) Descriptor deprecated

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

Deprecated: Use DeviceRequest.ProtoReflect.Descriptor instead.

func (*DeviceRequest) GetConfigJSON

func (x *DeviceRequest) GetConfigJSON() string

func (*DeviceRequest) GetDescription

func (x *DeviceRequest) GetDescription() string

func (*DeviceRequest) GetGroup

func (x *DeviceRequest) GetGroup() int32

func (*DeviceRequest) GetId

func (x *DeviceRequest) GetId() uint32

func (*DeviceRequest) GetName

func (x *DeviceRequest) GetName() string

func (*DeviceRequest) GetProvider

func (x *DeviceRequest) GetProvider() string

func (*DeviceRequest) GetSpcript

func (x *DeviceRequest) GetSpcript() uint32

func (*DeviceRequest) GetType

func (x *DeviceRequest) GetType() *DeviceType

func (*DeviceRequest) ProtoMessage

func (*DeviceRequest) ProtoMessage()

func (*DeviceRequest) ProtoReflect

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

func (*DeviceRequest) Reset

func (x *DeviceRequest) Reset()

func (*DeviceRequest) String

func (x *DeviceRequest) String() string

type DeviceType

type DeviceType struct {
	Id          uint32        `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string        `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Protocol    *ProtocolType `protobuf:"bytes,3,opt,name=protocol,proto3" json:"protocol,omitempty"`
	Description string        `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceType) Descriptor deprecated

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

Deprecated: Use DeviceType.ProtoReflect.Descriptor instead.

func (*DeviceType) GetDescription

func (x *DeviceType) GetDescription() string

func (*DeviceType) GetId

func (x *DeviceType) GetId() uint32

func (*DeviceType) GetName

func (x *DeviceType) GetName() string

func (*DeviceType) GetProtocol

func (x *DeviceType) GetProtocol() *ProtocolType

func (*DeviceType) ProtoMessage

func (*DeviceType) ProtoMessage()

func (*DeviceType) ProtoReflect

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

func (*DeviceType) Reset

func (x *DeviceType) Reset()

func (*DeviceType) String

func (x *DeviceType) String() string

type DeviceTypeFilter

type DeviceTypeFilter struct {
	And  []*DeviceTypeFilter   `protobuf:"bytes,1,rep,name=and,proto3" json:"and,omitempty"`
	Or   []*DeviceTypeFilter   `protobuf:"bytes,2,rep,name=or,proto3" json:"or,omitempty"`
	Name *wrappers.StringValue `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceTypeFilter) Descriptor deprecated

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

Deprecated: Use DeviceTypeFilter.ProtoReflect.Descriptor instead.

func (*DeviceTypeFilter) GetAnd

func (x *DeviceTypeFilter) GetAnd() []*DeviceTypeFilter

func (*DeviceTypeFilter) GetName

func (x *DeviceTypeFilter) GetName() *wrappers.StringValue

func (*DeviceTypeFilter) GetOr

func (x *DeviceTypeFilter) GetOr() []*DeviceTypeFilter

func (*DeviceTypeFilter) ProtoMessage

func (*DeviceTypeFilter) ProtoMessage()

func (*DeviceTypeFilter) ProtoReflect

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

func (*DeviceTypeFilter) Reset

func (x *DeviceTypeFilter) Reset()

func (*DeviceTypeFilter) String

func (x *DeviceTypeFilter) String() string

type Devices

type Devices struct {
	Devices []*Device `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
	// contains filtered or unexported fields
}

func (*Devices) Descriptor deprecated

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

Deprecated: Use Devices.ProtoReflect.Descriptor instead.

func (*Devices) GetDevices

func (x *Devices) GetDevices() []*Device

func (*Devices) ProtoMessage

func (*Devices) ProtoMessage()

func (*Devices) ProtoReflect

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

func (*Devices) Reset

func (x *Devices) Reset()

func (*Devices) String

func (x *Devices) String() string

type DevicesService

type DevicesService interface {
	GetDevice(ctx context.Context, in *IDReq, opts ...client.CallOption) (*Device, error)
	GetDevices(ctx context.Context, in *DeviceQuery, opts ...client.CallOption) (*Devices, error)
	AddDevice(ctx context.Context, in *DeviceRequest, opts ...client.CallOption) (*Response, error)
	DeleteDevice(ctx context.Context, in *IDReq, opts ...client.CallOption) (*Response, error)
	ConfigDevice(ctx context.Context, in *DeviceRequest, opts ...client.CallOption) (*Response, error)
	StartDevice(ctx context.Context, in *IDReq, opts ...client.CallOption) (*Response, error)
	StopDevice(ctx context.Context, in *IDReq, opts ...client.CallOption) (*Response, error)
}

func NewDevicesService

func NewDevicesService(name string, c client.Client) DevicesService

type DevicesServiceHandler

type DevicesServiceHandler interface {
	GetDevice(context.Context, *IDReq, *Device) error
	GetDevices(context.Context, *DeviceQuery, *Devices) error
	AddDevice(context.Context, *DeviceRequest, *Response) error
	DeleteDevice(context.Context, *IDReq, *Response) error
	ConfigDevice(context.Context, *DeviceRequest, *Response) error
	StartDevice(context.Context, *IDReq, *Response) error
	StopDevice(context.Context, *IDReq, *Response) error
}

type IDReq

type IDReq struct {
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*IDReq) Descriptor deprecated

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

Deprecated: Use IDReq.ProtoReflect.Descriptor instead.

func (*IDReq) GetId

func (x *IDReq) GetId() uint32

func (*IDReq) ProtoMessage

func (*IDReq) ProtoMessage()

func (*IDReq) ProtoReflect

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

func (*IDReq) Reset

func (x *IDReq) Reset()

func (*IDReq) String

func (x *IDReq) String() string

type ProtocolType

type ProtocolType struct {
	Id   uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Tcp  *Tcp   `protobuf:"bytes,3,opt,name=tcp,proto3" json:"tcp,omitempty"`
	// contains filtered or unexported fields
}

func (*ProtocolType) Descriptor deprecated

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

Deprecated: Use ProtocolType.ProtoReflect.Descriptor instead.

func (*ProtocolType) GetId

func (x *ProtocolType) GetId() uint32

func (*ProtocolType) GetName

func (x *ProtocolType) GetName() string

func (*ProtocolType) GetTcp

func (x *ProtocolType) GetTcp() *Tcp

func (*ProtocolType) ProtoMessage

func (*ProtocolType) ProtoMessage()

func (*ProtocolType) ProtoReflect

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

func (*ProtocolType) Reset

func (x *ProtocolType) Reset()

func (*ProtocolType) String

func (x *ProtocolType) String() string

type Response

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

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type Tcp

type Tcp struct {
	Type       string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` //server或者client
	Ip         string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	Port       int32  `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	ClientIp   string `protobuf:"bytes,4,opt,name=clientIp,proto3" json:"clientIp,omitempty"`
	ClientPort int32  `protobuf:"varint,5,opt,name=clientPort,proto3" json:"clientPort,omitempty"`
	// contains filtered or unexported fields
}

func (*Tcp) Descriptor deprecated

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

Deprecated: Use Tcp.ProtoReflect.Descriptor instead.

func (*Tcp) GetClientIp

func (x *Tcp) GetClientIp() string

func (*Tcp) GetClientPort

func (x *Tcp) GetClientPort() int32

func (*Tcp) GetIp

func (x *Tcp) GetIp() string

func (*Tcp) GetPort

func (x *Tcp) GetPort() int32

func (*Tcp) GetType

func (x *Tcp) GetType() string

func (*Tcp) ProtoMessage

func (*Tcp) ProtoMessage()

func (*Tcp) ProtoReflect

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

func (*Tcp) Reset

func (x *Tcp) Reset()

func (*Tcp) String

func (x *Tcp) String() string

Jump to

Keyboard shortcuts

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