go_micro_srv_camera

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_camera_camera_proto protoreflect.FileDescriptor

Functions

func NewCameraServiceEndpoints

func NewCameraServiceEndpoints() []*api.Endpoint

func RegisterCameraServiceHandler

func RegisterCameraServiceHandler(s server.Server, hdlr CameraServiceHandler, opts ...server.HandlerOption) error

Types

type Camera

type Camera 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"`
	Ip          string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	Port        uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	Channel     uint32 `protobuf:"varint,5,opt,name=channel,proto3" json:"channel,omitempty"`
	Connected   bool   `protobuf:"varint,6,opt,name=connected,proto3" json:"connected,omitempty"`
	Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*Camera) Descriptor deprecated

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

Deprecated: Use Camera.ProtoReflect.Descriptor instead.

func (*Camera) GetChannel

func (x *Camera) GetChannel() uint32

func (*Camera) GetConnected

func (x *Camera) GetConnected() bool

func (*Camera) GetDescription

func (x *Camera) GetDescription() string

func (*Camera) GetId

func (x *Camera) GetId() uint32

func (*Camera) GetIp

func (x *Camera) GetIp() string

func (*Camera) GetName

func (x *Camera) GetName() string

func (*Camera) GetPort

func (x *Camera) GetPort() uint32

func (*Camera) ProtoMessage

func (*Camera) ProtoMessage()

func (*Camera) ProtoReflect

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

func (*Camera) Reset

func (x *Camera) Reset()

func (*Camera) String

func (x *Camera) String() string

type CameraFilter

type CameraFilter struct {
	And       []*CameraFilter       `protobuf:"bytes,1,rep,name=and,proto3" json:"and,omitempty"`
	Or        []*CameraFilter       `protobuf:"bytes,2,rep,name=or,proto3" json:"or,omitempty"`
	IdIn      []uint32              `protobuf:"varint,3,rep,packed,name=idIn,proto3" json:"idIn,omitempty"`
	Name      *wrappers.StringValue `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	NameIn    []string              `protobuf:"bytes,5,rep,name=nameIn,proto3" json:"nameIn,omitempty"`
	IpIn      []string              `protobuf:"bytes,6,rep,name=ipIn,proto3" json:"ipIn,omitempty"`
	PortIn    []uint32              `protobuf:"varint,7,rep,packed,name=portIn,proto3" json:"portIn,omitempty"`
	ChannelIn []uint32              `protobuf:"varint,8,rep,packed,name=channelIn,proto3" json:"channelIn,omitempty"`
	// contains filtered or unexported fields
}

func (*CameraFilter) Descriptor deprecated

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

Deprecated: Use CameraFilter.ProtoReflect.Descriptor instead.

func (*CameraFilter) GetAnd

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

func (*CameraFilter) GetChannelIn

func (x *CameraFilter) GetChannelIn() []uint32

func (*CameraFilter) GetIdIn

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

func (*CameraFilter) GetIpIn

func (x *CameraFilter) GetIpIn() []string

func (*CameraFilter) GetName

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

func (*CameraFilter) GetNameIn

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

func (*CameraFilter) GetOr

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

func (*CameraFilter) GetPortIn

func (x *CameraFilter) GetPortIn() []uint32

func (*CameraFilter) ProtoMessage

func (*CameraFilter) ProtoMessage()

func (*CameraFilter) ProtoReflect

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

func (*CameraFilter) Reset

func (x *CameraFilter) Reset()

func (*CameraFilter) String

func (x *CameraFilter) String() string

type CameraReq

type CameraReq 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"`
	Ip   string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	Port uint32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	// 摄像头通道
	Channel uint32 `protobuf:"varint,5,opt,name=channel,proto3" json:"channel,omitempty"`
	// 相机登陆用户名
	Username string `protobuf:"bytes,6,opt,name=username,proto3" json:"username,omitempty"`
	// 相机登陆密码
	Password    string `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"`
	Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*CameraReq) Descriptor deprecated

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

Deprecated: Use CameraReq.ProtoReflect.Descriptor instead.

func (*CameraReq) GetChannel

func (x *CameraReq) GetChannel() uint32

func (*CameraReq) GetDescription

func (x *CameraReq) GetDescription() string

func (*CameraReq) GetId

func (x *CameraReq) GetId() uint32

func (*CameraReq) GetIp

func (x *CameraReq) GetIp() string

func (*CameraReq) GetName

func (x *CameraReq) GetName() string

func (*CameraReq) GetPassword

func (x *CameraReq) GetPassword() string

func (*CameraReq) GetPort

func (x *CameraReq) GetPort() uint32

func (*CameraReq) GetUsername

func (x *CameraReq) GetUsername() string

func (*CameraReq) ProtoMessage

func (*CameraReq) ProtoMessage()

func (*CameraReq) ProtoReflect

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

func (*CameraReq) Reset

func (x *CameraReq) Reset()

func (*CameraReq) String

func (x *CameraReq) String() string

type CameraService

type CameraService interface {
	// 拍照
	SnapPicture(ctx context.Context, in *SnapPictureReq, opts ...client.CallOption) (*Response, error)
	AddCamera(ctx context.Context, in *CameraReq, opts ...client.CallOption) (*Response, error)
	DeleteCamera(ctx context.Context, in *IDReq, opts ...client.CallOption) (*Response, error)
	ConfigCamera(ctx context.Context, in *ConfigCameraReq, opts ...client.CallOption) (*Response, error)
	// 获取出入口的摄像头信息
	GetCamera(ctx context.Context, in *IDReq, opts ...client.CallOption) (*Camera, error)
	GetCameras(ctx context.Context, in *Query, opts ...client.CallOption) (*Cameras, error)
}

func NewCameraService

func NewCameraService(name string, c client.Client) CameraService

type CameraServiceHandler

type CameraServiceHandler interface {
	// 拍照
	SnapPicture(context.Context, *SnapPictureReq, *Response) error
	AddCamera(context.Context, *CameraReq, *Response) error
	DeleteCamera(context.Context, *IDReq, *Response) error
	ConfigCamera(context.Context, *ConfigCameraReq, *Response) error
	// 获取出入口的摄像头信息
	GetCamera(context.Context, *IDReq, *Camera) error
	GetCameras(context.Context, *Query, *Cameras) error
}

type Cameras

type Cameras struct {
	Cameras    []*Camera `protobuf:"bytes,1,rep,name=cameras,proto3" json:"cameras,omitempty"`
	Totalpages uint32    `protobuf:"varint,2,opt,name=totalpages,proto3" json:"totalpages,omitempty"`
	Totals     uint32    `protobuf:"varint,3,opt,name=totals,proto3" json:"totals,omitempty"`
	// contains filtered or unexported fields
}

func (*Cameras) Descriptor deprecated

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

Deprecated: Use Cameras.ProtoReflect.Descriptor instead.

func (*Cameras) GetCameras

func (x *Cameras) GetCameras() []*Camera

func (*Cameras) GetTotalpages

func (x *Cameras) GetTotalpages() uint32

func (*Cameras) GetTotals

func (x *Cameras) GetTotals() uint32

func (*Cameras) ProtoMessage

func (*Cameras) ProtoMessage()

func (*Cameras) ProtoReflect

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

func (*Cameras) Reset

func (x *Cameras) Reset()

func (*Cameras) String

func (x *Cameras) String() string

type ConfigCameraReq

type ConfigCameraReq struct {

	// 摄像头编号
	Id          uint32                `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        *wrappers.StringValue `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Ip          *wrappers.StringValue `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
	Port        *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`
	Channel     *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=channel,proto3" json:"channel,omitempty"`
	Description *wrappers.StringValue `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigCameraReq) Descriptor deprecated

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

Deprecated: Use ConfigCameraReq.ProtoReflect.Descriptor instead.

func (*ConfigCameraReq) GetChannel

func (x *ConfigCameraReq) GetChannel() *wrappers.UInt32Value

func (*ConfigCameraReq) GetDescription

func (x *ConfigCameraReq) GetDescription() *wrappers.StringValue

func (*ConfigCameraReq) GetId

func (x *ConfigCameraReq) GetId() uint32

func (*ConfigCameraReq) GetIp

func (x *ConfigCameraReq) GetIp() *wrappers.StringValue

func (*ConfigCameraReq) GetName

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

func (*ConfigCameraReq) GetPort

func (x *ConfigCameraReq) GetPort() *wrappers.UInt32Value

func (*ConfigCameraReq) ProtoMessage

func (*ConfigCameraReq) ProtoMessage()

func (*ConfigCameraReq) ProtoReflect

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

func (*ConfigCameraReq) Reset

func (x *ConfigCameraReq) Reset()

func (*ConfigCameraReq) String

func (x *ConfigCameraReq) String() string

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 Query

type Query struct {
	Limit   uint32        `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
	Offset  uint32        `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	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  *CameraFilter `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"`
	// contains filtered or unexported fields
}

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetFilter

func (x *Query) GetFilter() *CameraFilter

func (*Query) GetLimit

func (x *Query) GetLimit() uint32

func (*Query) GetOffset

func (x *Query) GetOffset() uint32

func (*Query) GetPage

func (x *Query) GetPage() uint32

func (*Query) GetPerPage

func (x *Query) GetPerPage() uint32

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

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

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) 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 SnapPictureReq

type SnapPictureReq struct {
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 标签名称,用于保存照片时附加到照片名称上,可以不传该参数
	TagName *wrappers.StringValue `protobuf:"bytes,2,opt,name=tagName,proto3" json:"tagName,omitempty"`
	// 指定相机通道,后续通过配置绑定到相机后,可以不用该字段
	Channel *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel,omitempty"`
	// contains filtered or unexported fields
}

func (*SnapPictureReq) Descriptor deprecated

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

Deprecated: Use SnapPictureReq.ProtoReflect.Descriptor instead.

func (*SnapPictureReq) GetChannel

func (x *SnapPictureReq) GetChannel() *wrappers.UInt32Value

func (*SnapPictureReq) GetId

func (x *SnapPictureReq) GetId() uint32

func (*SnapPictureReq) GetTagName

func (x *SnapPictureReq) GetTagName() *wrappers.StringValue

func (*SnapPictureReq) ProtoMessage

func (*SnapPictureReq) ProtoMessage()

func (*SnapPictureReq) ProtoReflect

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

func (*SnapPictureReq) Reset

func (x *SnapPictureReq) Reset()

func (*SnapPictureReq) String

func (x *SnapPictureReq) String() string

Jump to

Keyboard shortcuts

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