go_micro_srv_opc

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_opc_opc_proto protoreflect.FileDescriptor

Functions

func NewOpcServiceEndpoints

func NewOpcServiceEndpoints() []*api.Endpoint

func RegisterOpcServiceHandler

func RegisterOpcServiceHandler(s server.Server, hdlr OpcServiceHandler, opts ...server.HandlerOption) error

Types

type FileReq

type FileReq struct {
	GroupID   uint32 `protobuf:"varint,1,opt,name=groupID,proto3" json:"groupID,omitempty"`
	Filebytes []byte `protobuf:"bytes,2,opt,name=filebytes,proto3" json:"filebytes,omitempty"`
	// contains filtered or unexported fields
}

func (*FileReq) Descriptor deprecated

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

Deprecated: Use FileReq.ProtoReflect.Descriptor instead.

func (*FileReq) GetFilebytes

func (x *FileReq) GetFilebytes() []byte

func (*FileReq) GetGroupID

func (x *FileReq) GetGroupID() uint32

func (*FileReq) ProtoMessage

func (*FileReq) ProtoMessage()

func (*FileReq) ProtoReflect

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

func (*FileReq) Reset

func (x *FileReq) Reset()

func (*FileReq) String

func (x *FileReq) String() string

type Group

type Group struct {
	GroupID uint32 `protobuf:"varint,1,opt,name=groupID,proto3" json:"groupID,omitempty"`
	Name    string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Tag     string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*Group) Descriptor deprecated

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

Deprecated: Use Group.ProtoReflect.Descriptor instead.

func (*Group) GetGroupID

func (x *Group) GetGroupID() uint32

func (*Group) GetName

func (x *Group) GetName() string

func (*Group) GetTag

func (x *Group) GetTag() string

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) ProtoReflect

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

func (*Group) Reset

func (x *Group) Reset()

func (*Group) String

func (x *Group) String() string

type Groups

type Groups struct {
	Group      []*Group `protobuf:"bytes,1,rep,name=group,proto3" json:"group,omitempty"`
	TotalCount uint32   `protobuf:"varint,2,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
	// contains filtered or unexported fields
}

func (*Groups) Descriptor deprecated

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

Deprecated: Use Groups.ProtoReflect.Descriptor instead.

func (*Groups) GetGroup

func (x *Groups) GetGroup() []*Group

func (*Groups) GetTotalCount

func (x *Groups) GetTotalCount() uint32

func (*Groups) ProtoMessage

func (*Groups) ProtoMessage()

func (*Groups) ProtoReflect

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

func (*Groups) Reset

func (x *Groups) Reset()

func (*Groups) String

func (x *Groups) String() string

type GrpQuery

type GrpQuery struct {
	Page    uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	PerPage uint32 `protobuf:"varint,2,opt,name=perPage,proto3" json:"perPage,omitempty"`
	// contains filtered or unexported fields
}

func (*GrpQuery) Descriptor deprecated

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

Deprecated: Use GrpQuery.ProtoReflect.Descriptor instead.

func (*GrpQuery) GetPage

func (x *GrpQuery) GetPage() uint32

func (*GrpQuery) GetPerPage

func (x *GrpQuery) GetPerPage() uint32

func (*GrpQuery) ProtoMessage

func (*GrpQuery) ProtoMessage()

func (*GrpQuery) ProtoReflect

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

func (*GrpQuery) Reset

func (x *GrpQuery) Reset()

func (*GrpQuery) String

func (x *GrpQuery) String() string

type GrpReq

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

func (*GrpReq) Descriptor deprecated

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

Deprecated: Use GrpReq.ProtoReflect.Descriptor instead.

func (*GrpReq) GetGroupID

func (x *GrpReq) GetGroupID() uint32

func (*GrpReq) ProtoMessage

func (*GrpReq) ProtoMessage()

func (*GrpReq) ProtoReflect

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

func (*GrpReq) Reset

func (x *GrpReq) Reset()

func (*GrpReq) String

func (x *GrpReq) String() string

type Item

type Item struct {
	GroupID         uint32 `protobuf:"varint,1,opt,name=groupID,proto3" json:"groupID,omitempty"`
	ItemID          uint32 `protobuf:"varint,2,opt,name=itemID,proto3" json:"itemID,omitempty"`
	Name            string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Address         string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"`
	Datatype        string `protobuf:"bytes,5,opt,name=datatype,proto3" json:"datatype,omitempty"`
	RespectDataType uint32 `protobuf:"varint,6,opt,name=respectDataType,proto3" json:"respectDataType,omitempty"`
	ClientAccess    string `protobuf:"bytes,7,opt,name=clientAccess,proto3" json:"clientAccess,omitempty"`
	ScanRate        uint32 `protobuf:"varint,8,opt,name=scanRate,proto3" json:"scanRate,omitempty"`
	// contains filtered or unexported fields
}

func (*Item) Descriptor deprecated

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

Deprecated: Use Item.ProtoReflect.Descriptor instead.

func (*Item) GetAddress

func (x *Item) GetAddress() string

func (*Item) GetClientAccess

func (x *Item) GetClientAccess() string

func (*Item) GetDatatype

func (x *Item) GetDatatype() string

func (*Item) GetGroupID

func (x *Item) GetGroupID() uint32

func (*Item) GetItemID

func (x *Item) GetItemID() uint32

func (*Item) GetName

func (x *Item) GetName() string

func (*Item) GetRespectDataType

func (x *Item) GetRespectDataType() uint32

func (*Item) GetScanRate

func (x *Item) GetScanRate() uint32

func (*Item) ProtoMessage

func (*Item) ProtoMessage()

func (*Item) ProtoReflect

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

func (*Item) Reset

func (x *Item) Reset()

func (*Item) String

func (x *Item) String() string

type ItemFilter

type ItemFilter struct {
	And         []*ItemFilter `protobuf:"bytes,1,rep,name=and,proto3" json:"and,omitempty"`
	Or          []*ItemFilter `protobuf:"bytes,2,rep,name=or,proto3" json:"or,omitempty"`
	GroupIn     []uint32      `protobuf:"varint,3,rep,packed,name=groupIn,proto3" json:"groupIn,omitempty"`
	ItemIn      []uint32      `protobuf:"varint,4,rep,packed,name=itemIn,proto3" json:"itemIn,omitempty"`
	NameLike    []string      `protobuf:"bytes,5,rep,name=nameLike,proto3" json:"nameLike,omitempty"`
	AddressLike []string      `protobuf:"bytes,6,rep,name=addressLike,proto3" json:"addressLike,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemFilter) Descriptor deprecated

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

Deprecated: Use ItemFilter.ProtoReflect.Descriptor instead.

func (*ItemFilter) GetAddressLike

func (x *ItemFilter) GetAddressLike() []string

func (*ItemFilter) GetAnd

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

func (*ItemFilter) GetGroupIn

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

func (*ItemFilter) GetItemIn

func (x *ItemFilter) GetItemIn() []uint32

func (*ItemFilter) GetNameLike

func (x *ItemFilter) GetNameLike() []string

func (*ItemFilter) GetOr

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

func (*ItemFilter) ProtoMessage

func (*ItemFilter) ProtoMessage()

func (*ItemFilter) ProtoReflect

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

func (*ItemFilter) Reset

func (x *ItemFilter) Reset()

func (*ItemFilter) String

func (x *ItemFilter) String() string

type ItemQuery

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

func (*ItemQuery) Descriptor deprecated

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

Deprecated: Use ItemQuery.ProtoReflect.Descriptor instead.

func (*ItemQuery) GetFilter

func (x *ItemQuery) GetFilter() *ItemFilter

func (*ItemQuery) GetPage

func (x *ItemQuery) GetPage() uint32

func (*ItemQuery) GetPerPage

func (x *ItemQuery) GetPerPage() uint32

func (*ItemQuery) ProtoMessage

func (*ItemQuery) ProtoMessage()

func (*ItemQuery) ProtoReflect

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

func (*ItemQuery) Reset

func (x *ItemQuery) Reset()

func (*ItemQuery) String

func (x *ItemQuery) String() string

type ItemReq

type ItemReq struct {
	GroupID uint32 `protobuf:"varint,1,opt,name=groupID,proto3" json:"groupID,omitempty"`
	ItemID  uint32 `protobuf:"varint,2,opt,name=itemID,proto3" json:"itemID,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemReq) Descriptor deprecated

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

Deprecated: Use ItemReq.ProtoReflect.Descriptor instead.

func (*ItemReq) GetGroupID

func (x *ItemReq) GetGroupID() uint32

func (*ItemReq) GetItemID

func (x *ItemReq) GetItemID() uint32

func (*ItemReq) ProtoMessage

func (*ItemReq) ProtoMessage()

func (*ItemReq) ProtoReflect

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

func (*ItemReq) Reset

func (x *ItemReq) Reset()

func (*ItemReq) String

func (x *ItemReq) String() string

type ItemValueReq

type ItemValueReq struct {
	GroupID uint32 `protobuf:"varint,1,opt,name=groupID,proto3" json:"groupID,omitempty"`
	ItemID  uint32 `protobuf:"varint,2,opt,name=itemID,proto3" json:"itemID,omitempty"`
	Value   int32  `protobuf:"varint,3,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemValueReq) Descriptor deprecated

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

Deprecated: Use ItemValueReq.ProtoReflect.Descriptor instead.

func (*ItemValueReq) GetGroupID

func (x *ItemValueReq) GetGroupID() uint32

func (*ItemValueReq) GetItemID

func (x *ItemValueReq) GetItemID() uint32

func (*ItemValueReq) GetValue

func (x *ItemValueReq) GetValue() int32

func (*ItemValueReq) ProtoMessage

func (*ItemValueReq) ProtoMessage()

func (*ItemValueReq) ProtoReflect

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

func (*ItemValueReq) Reset

func (x *ItemValueReq) Reset()

func (*ItemValueReq) String

func (x *ItemValueReq) String() string

type ItemValueResp

type ItemValueResp struct {
	Value   int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	Quality bool  `protobuf:"varint,2,opt,name=quality,proto3" json:"quality,omitempty"`
	// contains filtered or unexported fields
}

func (*ItemValueResp) Descriptor deprecated

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

Deprecated: Use ItemValueResp.ProtoReflect.Descriptor instead.

func (*ItemValueResp) GetQuality

func (x *ItemValueResp) GetQuality() bool

func (*ItemValueResp) GetValue

func (x *ItemValueResp) GetValue() int32

func (*ItemValueResp) ProtoMessage

func (*ItemValueResp) ProtoMessage()

func (*ItemValueResp) ProtoReflect

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

func (*ItemValueResp) Reset

func (x *ItemValueResp) Reset()

func (*ItemValueResp) String

func (x *ItemValueResp) String() string

type Items

type Items struct {
	Item       []*Item `protobuf:"bytes,1,rep,name=item,proto3" json:"item,omitempty"`
	TotalCount uint32  `protobuf:"varint,2,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
	// contains filtered or unexported fields
}

func (*Items) Descriptor deprecated

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

Deprecated: Use Items.ProtoReflect.Descriptor instead.

func (*Items) GetItem

func (x *Items) GetItem() []*Item

func (*Items) GetTotalCount

func (x *Items) GetTotalCount() uint32

func (*Items) ProtoMessage

func (*Items) ProtoMessage()

func (*Items) ProtoReflect

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

func (*Items) Reset

func (x *Items) Reset()

func (*Items) String

func (x *Items) String() string

type LogLevelRequest

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

func (*LogLevelRequest) Descriptor deprecated

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

Deprecated: Use LogLevelRequest.ProtoReflect.Descriptor instead.

func (*LogLevelRequest) ProtoMessage

func (*LogLevelRequest) ProtoMessage()

func (*LogLevelRequest) ProtoReflect

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

func (*LogLevelRequest) Reset

func (x *LogLevelRequest) Reset()

func (*LogLevelRequest) String

func (x *LogLevelRequest) String() string

type LogResponse

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

func (*LogResponse) Descriptor deprecated

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

Deprecated: Use LogResponse.ProtoReflect.Descriptor instead.

func (*LogResponse) GetName

func (x *LogResponse) GetName() string

func (*LogResponse) ProtoMessage

func (*LogResponse) ProtoMessage()

func (*LogResponse) ProtoReflect

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

func (*LogResponse) Reset

func (x *LogResponse) Reset()

func (*LogResponse) String

func (x *LogResponse) String() string

type Loglevel

type Loglevel struct {
	Name  string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Level uint32 `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*Loglevel) Descriptor deprecated

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

Deprecated: Use Loglevel.ProtoReflect.Descriptor instead.

func (*Loglevel) GetLevel

func (x *Loglevel) GetLevel() uint32

func (*Loglevel) GetName

func (x *Loglevel) GetName() string

func (*Loglevel) ProtoMessage

func (*Loglevel) ProtoMessage()

func (*Loglevel) ProtoReflect

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

func (*Loglevel) Reset

func (x *Loglevel) Reset()

func (*Loglevel) String

func (x *Loglevel) String() string

type OpcService

type OpcService interface {
	UpdateServer(ctx context.Context, in *Server, opts ...client.CallOption) (*Response, error)
	GetServer(ctx context.Context, in *SrvReq, opts ...client.CallOption) (*Server, error)
	GetGroup(ctx context.Context, in *GrpReq, opts ...client.CallOption) (*Group, error)
	GetGroups(ctx context.Context, in *GrpQuery, opts ...client.CallOption) (*Groups, error)
	AddGroup(ctx context.Context, in *Group, opts ...client.CallOption) (*Response, error)
	UpdateGroup(ctx context.Context, in *Group, opts ...client.CallOption) (*Response, error)
	DeleteGroup(ctx context.Context, in *Group, opts ...client.CallOption) (*Response, error)
	GetItem(ctx context.Context, in *ItemReq, opts ...client.CallOption) (*Item, error)
	GetItems(ctx context.Context, in *ItemQuery, opts ...client.CallOption) (*Items, error)
	AddItem(ctx context.Context, in *Item, opts ...client.CallOption) (*Response, error)
	UpdateItem(ctx context.Context, in *Item, opts ...client.CallOption) (*Response, error)
	DeleteItem(ctx context.Context, in *Item, opts ...client.CallOption) (*Response, error)
	WriteItem(ctx context.Context, in *ItemValueReq, opts ...client.CallOption) (*Response, error)
	ReadItem(ctx context.Context, in *ItemReq, opts ...client.CallOption) (*ItemValueResp, error)
	UpdateFile(ctx context.Context, in *FileReq, opts ...client.CallOption) (*Response, error)
	//获取服务日志等级
	GetLogLevel(ctx context.Context, in *LogLevelRequest, opts ...client.CallOption) (*Loglevel, error)
	//设置服务日志等级
	SetLogLevel(ctx context.Context, in *Loglevel, opts ...client.CallOption) (*LogResponse, error)
}

func NewOpcService

func NewOpcService(name string, c client.Client) OpcService

type OpcServiceHandler

type OpcServiceHandler interface {
	UpdateServer(context.Context, *Server, *Response) error
	GetServer(context.Context, *SrvReq, *Server) error
	GetGroup(context.Context, *GrpReq, *Group) error
	GetGroups(context.Context, *GrpQuery, *Groups) error
	AddGroup(context.Context, *Group, *Response) error
	UpdateGroup(context.Context, *Group, *Response) error
	DeleteGroup(context.Context, *Group, *Response) error
	GetItem(context.Context, *ItemReq, *Item) error
	GetItems(context.Context, *ItemQuery, *Items) error
	AddItem(context.Context, *Item, *Response) error
	UpdateItem(context.Context, *Item, *Response) error
	DeleteItem(context.Context, *Item, *Response) error
	WriteItem(context.Context, *ItemValueReq, *Response) error
	ReadItem(context.Context, *ItemReq, *ItemValueResp) error
	UpdateFile(context.Context, *FileReq, *Response) error
	//获取服务日志等级
	GetLogLevel(context.Context, *LogLevelRequest, *Loglevel) error
	//设置服务日志等级
	SetLogLevel(context.Context, *Loglevel, *LogResponse) error
}

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 Server

type Server 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"`
	Tag  string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
	// contains filtered or unexported fields
}

func (*Server) Descriptor deprecated

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

Deprecated: Use Server.ProtoReflect.Descriptor instead.

func (*Server) GetIp

func (x *Server) GetIp() string

func (*Server) GetName

func (x *Server) GetName() string

func (*Server) GetTag

func (x *Server) GetTag() string

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) ProtoReflect

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

func (*Server) Reset

func (x *Server) Reset()

func (*Server) String

func (x *Server) String() string

type Servers

type Servers struct {
	Server     []*Server `protobuf:"bytes,1,rep,name=server,proto3" json:"server,omitempty"`
	TotalCount uint32    `protobuf:"varint,2,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
	// contains filtered or unexported fields
}

func (*Servers) Descriptor deprecated

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

Deprecated: Use Servers.ProtoReflect.Descriptor instead.

func (*Servers) GetServer

func (x *Servers) GetServer() []*Server

func (*Servers) GetTotalCount

func (x *Servers) GetTotalCount() uint32

func (*Servers) ProtoMessage

func (*Servers) ProtoMessage()

func (*Servers) ProtoReflect

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

func (*Servers) Reset

func (x *Servers) Reset()

func (*Servers) String

func (x *Servers) String() string

type SrvQuery

type SrvQuery struct {
	Page    uint32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	PerPage uint32 `protobuf:"varint,2,opt,name=perPage,proto3" json:"perPage,omitempty"`
	// contains filtered or unexported fields
}

func (*SrvQuery) Descriptor deprecated

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

Deprecated: Use SrvQuery.ProtoReflect.Descriptor instead.

func (*SrvQuery) GetPage

func (x *SrvQuery) GetPage() uint32

func (*SrvQuery) GetPerPage

func (x *SrvQuery) GetPerPage() uint32

func (*SrvQuery) ProtoMessage

func (*SrvQuery) ProtoMessage()

func (*SrvQuery) ProtoReflect

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

func (*SrvQuery) Reset

func (x *SrvQuery) Reset()

func (*SrvQuery) String

func (x *SrvQuery) String() string

type SrvReq

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

func (*SrvReq) Descriptor deprecated

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

Deprecated: Use SrvReq.ProtoReflect.Descriptor instead.

func (*SrvReq) ProtoMessage

func (*SrvReq) ProtoMessage()

func (*SrvReq) ProtoReflect

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

func (*SrvReq) Reset

func (x *SrvReq) Reset()

func (*SrvReq) String

func (x *SrvReq) String() string

Jump to

Keyboard shortcuts

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