device

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Device_GetDeviceInfo_FullMethodName         = "/api.device.Device/GetDeviceInfo"
	Device_GetDeviceInfoByMac_FullMethodName    = "/api.device.Device/GetDeviceInfoByMac"
	Device_RegisterDevice_FullMethodName        = "/api.device.Device/RegisterDevice"
	Device_SetDevicePassword_FullMethodName     = "/api.device.Device/SetDevicePassword"
	Device_DeleteDevice_FullMethodName          = "/api.device.Device/DeleteDevice"
	Device_ListDeletedDeviceInfo_FullMethodName = "/api.device.Device/ListDeletedDeviceInfo"
	Device_UnDeleteDevice_FullMethodName        = "/api.device.Device/UnDeleteDevice"
	Device_ListDevice_FullMethodName            = "/api.device.Device/ListDevice"
	Device_UpdateDeviceLastSeen_FullMethodName  = "/api.device.Device/UpdateDeviceLastSeen"
	Device_GetDeviceLastSeen_FullMethodName     = "/api.device.Device/GetDeviceLastSeen"
	Device_GetDeviceID_FullMethodName           = "/api.device.Device/GetDeviceID"
)
View Source
const OperationDeviceDeleteDevice = "/api.device.Device/DeleteDevice"
View Source
const OperationDeviceGetDeviceID = "/api.device.Device/GetDeviceID"
View Source
const OperationDeviceGetDeviceInfo = "/api.device.Device/GetDeviceInfo"
View Source
const OperationDeviceGetDeviceInfoByMac = "/api.device.Device/GetDeviceInfoByMac"
View Source
const OperationDeviceGetDeviceLastSeen = "/api.device.Device/GetDeviceLastSeen"
View Source
const OperationDeviceListDeletedDeviceInfo = "/api.device.Device/ListDeletedDeviceInfo"
View Source
const OperationDeviceListDevice = "/api.device.Device/ListDevice"
View Source
const OperationDeviceRegisterDevice = "/api.device.Device/RegisterDevice"
View Source
const OperationDeviceSetDevicePassword = "/api.device.Device/SetDevicePassword"
View Source
const OperationDeviceUnDeleteDevice = "/api.device.Device/UnDeleteDevice"
View Source
const OperationDeviceUpdateDeviceLastSeen = "/api.device.Device/UpdateDeviceLastSeen"

Variables

View Source
var (
	ListDeviceOrder_name = map[int32]string{
		0: "ID",
		1: "MAC",
		2: "CREATED_AT",
		3: "UPDATED_AT",
	}
	ListDeviceOrder_value = map[string]int32{
		"ID":         0,
		"MAC":        1,
		"CREATED_AT": 2,
		"UPDATED_AT": 3,
	}
)

Enum value maps for ListDeviceOrder.

View Source
var (
	Sort_name = map[int32]string{
		0: "DESC",
		1: "ASC",
	}
	Sort_value = map[string]int32{
		"DESC": 0,
		"ASC":  1,
	}
)

Enum value maps for Sort.

View Source
var Device_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.device.Device",
	HandlerType: (*DeviceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetDeviceInfo",
			Handler:    _Device_GetDeviceInfo_Handler,
		},
		{
			MethodName: "GetDeviceInfoByMac",
			Handler:    _Device_GetDeviceInfoByMac_Handler,
		},
		{
			MethodName: "RegisterDevice",
			Handler:    _Device_RegisterDevice_Handler,
		},
		{
			MethodName: "SetDevicePassword",
			Handler:    _Device_SetDevicePassword_Handler,
		},
		{
			MethodName: "DeleteDevice",
			Handler:    _Device_DeleteDevice_Handler,
		},
		{
			MethodName: "ListDeletedDeviceInfo",
			Handler:    _Device_ListDeletedDeviceInfo_Handler,
		},
		{
			MethodName: "UnDeleteDevice",
			Handler:    _Device_UnDeleteDevice_Handler,
		},
		{
			MethodName: "ListDevice",
			Handler:    _Device_ListDevice_Handler,
		},
		{
			MethodName: "UpdateDeviceLastSeen",
			Handler:    _Device_UpdateDeviceLastSeen_Handler,
		},
		{
			MethodName: "GetDeviceLastSeen",
			Handler:    _Device_GetDeviceLastSeen_Handler,
		},
		{
			MethodName: "GetDeviceID",
			Handler:    _Device_GetDeviceID_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "device/device.proto",
}

Device_ServiceDesc is the grpc.ServiceDesc for Device service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_device_device_proto protoreflect.FileDescriptor

Functions

func RegisterDeviceHTTPServer

func RegisterDeviceHTTPServer(s *http.Server, srv DeviceHTTPServer)

func RegisterDeviceServer

func RegisterDeviceServer(s grpc.ServiceRegistrar, srv DeviceServer)

Types

type DeleteDeviceReq added in v0.2.1

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

func (*DeleteDeviceReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use DeleteDeviceReq.ProtoReflect.Descriptor instead.

func (*DeleteDeviceReq) GetId added in v0.2.1

func (x *DeleteDeviceReq) GetId() uint64

func (*DeleteDeviceReq) ProtoMessage added in v0.2.1

func (*DeleteDeviceReq) ProtoMessage()

func (*DeleteDeviceReq) ProtoReflect added in v0.2.1

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

func (*DeleteDeviceReq) Reset added in v0.2.1

func (x *DeleteDeviceReq) Reset()

func (*DeleteDeviceReq) String added in v0.2.1

func (x *DeleteDeviceReq) String() string

type DeviceClient

type DeviceClient interface {
	GetDeviceInfo(ctx context.Context, in *GetDeviceInfoReq, opts ...grpc.CallOption) (*DeviceInfo, error)
	GetDeviceInfoByMac(ctx context.Context, in *GetDeviceInfoByMacReq, opts ...grpc.CallOption) (*DeviceInfo, error)
	RegisterDevice(ctx context.Context, in *RegisterDeviceReq, opts ...grpc.CallOption) (*DeviceInfo, error)
	SetDevicePassword(ctx context.Context, in *SetDevicePasswordReq, opts ...grpc.CallOption) (*Empty, error)
	DeleteDevice(ctx context.Context, in *DeleteDeviceReq, opts ...grpc.CallOption) (*Empty, error)
	ListDeletedDeviceInfo(ctx context.Context, in *ListDeviceReq, opts ...grpc.CallOption) (*ListDeviceResp, error)
	UnDeleteDevice(ctx context.Context, in *UnDeleteDeviceReq, opts ...grpc.CallOption) (*Empty, error)
	ListDevice(ctx context.Context, in *ListDeviceReq, opts ...grpc.CallOption) (*ListDeviceResp, error)
	UpdateDeviceLastSeen(ctx context.Context, in *UpdateDeviceLastSeenReq, opts ...grpc.CallOption) (*Empty, error)
	GetDeviceLastSeen(ctx context.Context, in *GetDeviceLastSeenReq, opts ...grpc.CallOption) (*DeviceLastSeen, error)
	GetDeviceID(ctx context.Context, in *GetDeviceIDReq, opts ...grpc.CallOption) (*DeviceInfo, error)
}

DeviceClient is the client API for Device 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 NewDeviceClient

func NewDeviceClient(cc grpc.ClientConnInterface) DeviceClient

type DeviceHTTPClient

type DeviceHTTPClient interface {
	DeleteDevice(ctx context.Context, req *DeleteDeviceReq, opts ...http.CallOption) (rsp *Empty, err error)
	GetDeviceID(ctx context.Context, req *GetDeviceIDReq, opts ...http.CallOption) (rsp *DeviceInfo, err error)
	GetDeviceInfo(ctx context.Context, req *GetDeviceInfoReq, opts ...http.CallOption) (rsp *DeviceInfo, err error)
	GetDeviceInfoByMac(ctx context.Context, req *GetDeviceInfoByMacReq, opts ...http.CallOption) (rsp *DeviceInfo, err error)
	GetDeviceLastSeen(ctx context.Context, req *GetDeviceLastSeenReq, opts ...http.CallOption) (rsp *DeviceLastSeen, err error)
	ListDeletedDeviceInfo(ctx context.Context, req *ListDeviceReq, opts ...http.CallOption) (rsp *ListDeviceResp, err error)
	ListDevice(ctx context.Context, req *ListDeviceReq, opts ...http.CallOption) (rsp *ListDeviceResp, err error)
	RegisterDevice(ctx context.Context, req *RegisterDeviceReq, opts ...http.CallOption) (rsp *DeviceInfo, err error)
	SetDevicePassword(ctx context.Context, req *SetDevicePasswordReq, opts ...http.CallOption) (rsp *Empty, err error)
	UnDeleteDevice(ctx context.Context, req *UnDeleteDeviceReq, opts ...http.CallOption) (rsp *Empty, err error)
	UpdateDeviceLastSeen(ctx context.Context, req *UpdateDeviceLastSeenReq, opts ...http.CallOption) (rsp *Empty, err error)
}

func NewDeviceHTTPClient

func NewDeviceHTTPClient(client *http.Client) DeviceHTTPClient

type DeviceHTTPClientImpl

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

func (*DeviceHTTPClientImpl) DeleteDevice added in v0.2.1

func (c *DeviceHTTPClientImpl) DeleteDevice(ctx context.Context, in *DeleteDeviceReq, opts ...http.CallOption) (*Empty, error)

func (*DeviceHTTPClientImpl) GetDeviceID added in v0.2.1

func (c *DeviceHTTPClientImpl) GetDeviceID(ctx context.Context, in *GetDeviceIDReq, opts ...http.CallOption) (*DeviceInfo, error)

func (*DeviceHTTPClientImpl) GetDeviceInfo added in v0.2.1

func (c *DeviceHTTPClientImpl) GetDeviceInfo(ctx context.Context, in *GetDeviceInfoReq, opts ...http.CallOption) (*DeviceInfo, error)

func (*DeviceHTTPClientImpl) GetDeviceInfoByMac added in v0.2.1

func (c *DeviceHTTPClientImpl) GetDeviceInfoByMac(ctx context.Context, in *GetDeviceInfoByMacReq, opts ...http.CallOption) (*DeviceInfo, error)

func (*DeviceHTTPClientImpl) GetDeviceLastSeen added in v0.2.1

func (c *DeviceHTTPClientImpl) GetDeviceLastSeen(ctx context.Context, in *GetDeviceLastSeenReq, opts ...http.CallOption) (*DeviceLastSeen, error)

func (*DeviceHTTPClientImpl) ListDeletedDeviceInfo added in v0.2.1

func (c *DeviceHTTPClientImpl) ListDeletedDeviceInfo(ctx context.Context, in *ListDeviceReq, opts ...http.CallOption) (*ListDeviceResp, error)

func (*DeviceHTTPClientImpl) ListDevice added in v0.2.1

func (*DeviceHTTPClientImpl) RegisterDevice added in v0.2.1

func (c *DeviceHTTPClientImpl) RegisterDevice(ctx context.Context, in *RegisterDeviceReq, opts ...http.CallOption) (*DeviceInfo, error)

func (*DeviceHTTPClientImpl) SetDevicePassword added in v0.2.3

func (c *DeviceHTTPClientImpl) SetDevicePassword(ctx context.Context, in *SetDevicePasswordReq, opts ...http.CallOption) (*Empty, error)

func (*DeviceHTTPClientImpl) UnDeleteDevice added in v0.2.1

func (c *DeviceHTTPClientImpl) UnDeleteDevice(ctx context.Context, in *UnDeleteDeviceReq, opts ...http.CallOption) (*Empty, error)

func (*DeviceHTTPClientImpl) UpdateDeviceLastSeen added in v0.2.1

func (c *DeviceHTTPClientImpl) UpdateDeviceLastSeen(ctx context.Context, in *UpdateDeviceLastSeenReq, opts ...http.CallOption) (*Empty, error)

type DeviceHTTPServer

type DeviceHTTPServer interface {
	DeleteDevice(context.Context, *DeleteDeviceReq) (*Empty, error)
	GetDeviceID(context.Context, *GetDeviceIDReq) (*DeviceInfo, error)
	GetDeviceInfo(context.Context, *GetDeviceInfoReq) (*DeviceInfo, error)
	GetDeviceInfoByMac(context.Context, *GetDeviceInfoByMacReq) (*DeviceInfo, error)
	GetDeviceLastSeen(context.Context, *GetDeviceLastSeenReq) (*DeviceLastSeen, error)
	ListDeletedDeviceInfo(context.Context, *ListDeviceReq) (*ListDeviceResp, error)
	ListDevice(context.Context, *ListDeviceReq) (*ListDeviceResp, error)
	RegisterDevice(context.Context, *RegisterDeviceReq) (*DeviceInfo, error)
	SetDevicePassword(context.Context, *SetDevicePasswordReq) (*Empty, error)
	UnDeleteDevice(context.Context, *UnDeleteDeviceReq) (*Empty, error)
	UpdateDeviceLastSeen(context.Context, *UpdateDeviceLastSeenReq) (*Empty, error)
}

type DeviceInfo added in v0.2.1

type DeviceInfo struct {
	Id        uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" redis:"id"`                            // @gotags: redis:"id"
	CreatedAt int64  `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"createdAt" redis:"createdAt"` // @gotags: redis:"createdAt" json:"createdAt"
	UpdatedAt int64  `protobuf:"varint,3,opt,name=updated_at,json=updatedAt,proto3" json:"-" redis:"-"`                 // @gotags: redis:"-" json:"-"
	Mac       string `protobuf:"bytes,4,opt,name=mac,proto3" json:"mac,omitempty" redis:"mac"`                          // @gotags: redis:"mac"
	Comment   string `protobuf:"bytes,5,opt,name=comment,proto3" json:",omitempty" redis:",omitempty"`                  // @gotags: redis:",omitempty" json:",omitempty"
	// contains filtered or unexported fields
}

func (*DeviceInfo) Descriptor deprecated added in v0.2.1

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

Deprecated: Use DeviceInfo.ProtoReflect.Descriptor instead.

func (*DeviceInfo) GetComment added in v0.2.1

func (x *DeviceInfo) GetComment() string

func (*DeviceInfo) GetCreatedAt added in v0.2.1

func (x *DeviceInfo) GetCreatedAt() int64

func (*DeviceInfo) GetId added in v0.2.1

func (x *DeviceInfo) GetId() uint64

func (*DeviceInfo) GetMac added in v0.2.1

func (x *DeviceInfo) GetMac() string

func (*DeviceInfo) GetUpdatedAt added in v0.2.1

func (x *DeviceInfo) GetUpdatedAt() int64

func (*DeviceInfo) ProtoMessage added in v0.2.1

func (*DeviceInfo) ProtoMessage()

func (*DeviceInfo) ProtoReflect added in v0.2.1

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

func (*DeviceInfo) Reset added in v0.2.1

func (x *DeviceInfo) Reset()

func (*DeviceInfo) String added in v0.2.1

func (x *DeviceInfo) String() string

type DeviceLastSeen added in v0.2.2

type DeviceLastSeen struct {
	LastSeenAt int64  `protobuf:"varint,1,opt,name=last_seen_at,json=lastSeenAt,proto3" json:"lastSeenAt" redis:"at"`          // @gotags: redis:"at" json:"lastSeenAt"
	LastSeenIp string `protobuf:"bytes,2,opt,name=last_seen_ip,json=lastSeenIp,proto3" json:"lastSeenIP" redis:"ip,omitempty"` // @gotags: redis:"ip,omitempty" json:"lastSeenIP"
	// contains filtered or unexported fields
}

func (*DeviceLastSeen) Descriptor deprecated added in v0.2.2

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

Deprecated: Use DeviceLastSeen.ProtoReflect.Descriptor instead.

func (*DeviceLastSeen) GetLastSeenAt added in v0.2.2

func (x *DeviceLastSeen) GetLastSeenAt() int64

func (*DeviceLastSeen) GetLastSeenIp added in v0.2.2

func (x *DeviceLastSeen) GetLastSeenIp() string

func (*DeviceLastSeen) ProtoMessage added in v0.2.2

func (*DeviceLastSeen) ProtoMessage()

func (*DeviceLastSeen) ProtoReflect added in v0.2.2

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

func (*DeviceLastSeen) Reset added in v0.2.2

func (x *DeviceLastSeen) Reset()

func (*DeviceLastSeen) String added in v0.2.2

func (x *DeviceLastSeen) String() string

type DeviceServer

type DeviceServer interface {
	GetDeviceInfo(context.Context, *GetDeviceInfoReq) (*DeviceInfo, error)
	GetDeviceInfoByMac(context.Context, *GetDeviceInfoByMacReq) (*DeviceInfo, error)
	RegisterDevice(context.Context, *RegisterDeviceReq) (*DeviceInfo, error)
	SetDevicePassword(context.Context, *SetDevicePasswordReq) (*Empty, error)
	DeleteDevice(context.Context, *DeleteDeviceReq) (*Empty, error)
	ListDeletedDeviceInfo(context.Context, *ListDeviceReq) (*ListDeviceResp, error)
	UnDeleteDevice(context.Context, *UnDeleteDeviceReq) (*Empty, error)
	ListDevice(context.Context, *ListDeviceReq) (*ListDeviceResp, error)
	UpdateDeviceLastSeen(context.Context, *UpdateDeviceLastSeenReq) (*Empty, error)
	GetDeviceLastSeen(context.Context, *GetDeviceLastSeenReq) (*DeviceLastSeen, error)
	GetDeviceID(context.Context, *GetDeviceIDReq) (*DeviceInfo, error)
	// contains filtered or unexported methods
}

DeviceServer is the server API for Device service. All implementations must embed UnimplementedDeviceServer for forward compatibility.

type Empty added in v0.2.1

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

func (*Empty) Descriptor deprecated added in v0.2.1

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage added in v0.2.1

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v0.2.1

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

func (*Empty) Reset added in v0.2.1

func (x *Empty) Reset()

func (*Empty) String added in v0.2.1

func (x *Empty) String() string

type GetDeviceIDReq added in v0.2.1

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

func (*GetDeviceIDReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use GetDeviceIDReq.ProtoReflect.Descriptor instead.

func (*GetDeviceIDReq) GetMac added in v0.2.1

func (x *GetDeviceIDReq) GetMac() string

func (*GetDeviceIDReq) ProtoMessage added in v0.2.1

func (*GetDeviceIDReq) ProtoMessage()

func (*GetDeviceIDReq) ProtoReflect added in v0.2.1

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

func (*GetDeviceIDReq) Reset added in v0.2.1

func (x *GetDeviceIDReq) Reset()

func (*GetDeviceIDReq) String added in v0.2.1

func (x *GetDeviceIDReq) String() string

type GetDeviceInfoByMacReq added in v0.2.1

type GetDeviceInfoByMacReq struct {
	Mac    string   `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"`
	Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDeviceInfoByMacReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use GetDeviceInfoByMacReq.ProtoReflect.Descriptor instead.

func (*GetDeviceInfoByMacReq) GetFields added in v0.2.1

func (x *GetDeviceInfoByMacReq) GetFields() []string

func (*GetDeviceInfoByMacReq) GetMac added in v0.2.1

func (x *GetDeviceInfoByMacReq) GetMac() string

func (*GetDeviceInfoByMacReq) ProtoMessage added in v0.2.1

func (*GetDeviceInfoByMacReq) ProtoMessage()

func (*GetDeviceInfoByMacReq) ProtoReflect added in v0.2.1

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

func (*GetDeviceInfoByMacReq) Reset added in v0.2.1

func (x *GetDeviceInfoByMacReq) Reset()

func (*GetDeviceInfoByMacReq) String added in v0.2.1

func (x *GetDeviceInfoByMacReq) String() string

type GetDeviceInfoReq added in v0.2.1

type GetDeviceInfoReq struct {
	Id     uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
	// contains filtered or unexported fields
}

func (*GetDeviceInfoReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use GetDeviceInfoReq.ProtoReflect.Descriptor instead.

func (*GetDeviceInfoReq) GetFields added in v0.2.1

func (x *GetDeviceInfoReq) GetFields() []string

func (*GetDeviceInfoReq) GetId added in v0.2.1

func (x *GetDeviceInfoReq) GetId() uint64

func (*GetDeviceInfoReq) ProtoMessage added in v0.2.1

func (*GetDeviceInfoReq) ProtoMessage()

func (*GetDeviceInfoReq) ProtoReflect added in v0.2.1

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

func (*GetDeviceInfoReq) Reset added in v0.2.1

func (x *GetDeviceInfoReq) Reset()

func (*GetDeviceInfoReq) String added in v0.2.1

func (x *GetDeviceInfoReq) String() string

type GetDeviceLastSeenReq added in v0.2.1

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

func (*GetDeviceLastSeenReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use GetDeviceLastSeenReq.ProtoReflect.Descriptor instead.

func (*GetDeviceLastSeenReq) GetId added in v0.2.1

func (x *GetDeviceLastSeenReq) GetId() uint64

func (*GetDeviceLastSeenReq) ProtoMessage added in v0.2.1

func (*GetDeviceLastSeenReq) ProtoMessage()

func (*GetDeviceLastSeenReq) ProtoReflect added in v0.2.1

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

func (*GetDeviceLastSeenReq) Reset added in v0.2.1

func (x *GetDeviceLastSeenReq) Reset()

func (*GetDeviceLastSeenReq) String added in v0.2.1

func (x *GetDeviceLastSeenReq) String() string

type ListDeviceOrder added in v0.2.1

type ListDeviceOrder int32
const (
	ListDeviceOrder_ID         ListDeviceOrder = 0
	ListDeviceOrder_MAC        ListDeviceOrder = 1
	ListDeviceOrder_CREATED_AT ListDeviceOrder = 2
	ListDeviceOrder_UPDATED_AT ListDeviceOrder = 3
)

func (ListDeviceOrder) Descriptor added in v0.2.1

func (ListDeviceOrder) Enum added in v0.2.1

func (x ListDeviceOrder) Enum() *ListDeviceOrder

func (ListDeviceOrder) EnumDescriptor deprecated added in v0.2.1

func (ListDeviceOrder) EnumDescriptor() ([]byte, []int)

Deprecated: Use ListDeviceOrder.Descriptor instead.

func (ListDeviceOrder) Number added in v0.2.1

func (ListDeviceOrder) String added in v0.2.1

func (x ListDeviceOrder) String() string

func (ListDeviceOrder) Type added in v0.2.1

type ListDeviceReq added in v0.2.1

type ListDeviceReq struct {
	Id     uint64          `protobuf:"varint,6,opt,name=id,proto3" json:"id" form:"id"`                                                    // @gotags: form:"id" json:"id"
	Page   int32           `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty" form:"page"`                                    // @gotags: form:"page"
	Size   int32           `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty" form:"size"`                                    // @gotags: form:"size"
	Order  ListDeviceOrder `protobuf:"varint,3,opt,name=order,proto3,enum=api.device.ListDeviceOrder" json:"order,omitempty" form:"order"` // @gotags: form:"order"
	Sort   Sort            `protobuf:"varint,4,opt,name=sort,proto3,enum=api.device.Sort" json:"sort,omitempty" form:"sort"`               // @gotags: form:"sort"
	Fields []string        `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty" form:"fields"`                               // @gotags: form:"fields"
	Mac    string          `protobuf:"bytes,8,opt,name=mac,proto3" json:"mac,omitempty" form:"mac"`                                        // @gotags: form:"mac"
	// contains filtered or unexported fields
}

func (*ListDeviceReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use ListDeviceReq.ProtoReflect.Descriptor instead.

func (*ListDeviceReq) GetFields added in v0.2.1

func (x *ListDeviceReq) GetFields() []string

func (*ListDeviceReq) GetId added in v0.2.1

func (x *ListDeviceReq) GetId() uint64

func (*ListDeviceReq) GetMac added in v0.2.1

func (x *ListDeviceReq) GetMac() string

func (*ListDeviceReq) GetOrder added in v0.2.1

func (x *ListDeviceReq) GetOrder() ListDeviceOrder

func (*ListDeviceReq) GetPage added in v0.2.1

func (x *ListDeviceReq) GetPage() int32

func (*ListDeviceReq) GetSize added in v0.2.1

func (x *ListDeviceReq) GetSize() int32

func (*ListDeviceReq) GetSort added in v0.2.1

func (x *ListDeviceReq) GetSort() Sort

func (*ListDeviceReq) ProtoMessage added in v0.2.1

func (*ListDeviceReq) ProtoMessage()

func (*ListDeviceReq) ProtoReflect added in v0.2.1

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

func (*ListDeviceReq) Reset added in v0.2.1

func (x *ListDeviceReq) Reset()

func (*ListDeviceReq) String added in v0.2.1

func (x *ListDeviceReq) String() string

type ListDeviceResp added in v0.2.1

type ListDeviceResp struct {
	Devices []*DeviceInfo `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
	Total   int32         `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*ListDeviceResp) Descriptor deprecated added in v0.2.1

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

Deprecated: Use ListDeviceResp.ProtoReflect.Descriptor instead.

func (*ListDeviceResp) GetDevices added in v0.2.1

func (x *ListDeviceResp) GetDevices() []*DeviceInfo

func (*ListDeviceResp) GetTotal added in v0.2.1

func (x *ListDeviceResp) GetTotal() int32

func (*ListDeviceResp) ProtoMessage added in v0.2.1

func (*ListDeviceResp) ProtoMessage()

func (*ListDeviceResp) ProtoReflect added in v0.2.1

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

func (*ListDeviceResp) Reset added in v0.2.1

func (x *ListDeviceResp) Reset()

func (*ListDeviceResp) String added in v0.2.1

func (x *ListDeviceResp) String() string

type RegisterDeviceReq added in v0.2.1

type RegisterDeviceReq struct {
	Mac      string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac" binding:"required"`           // @gotags: json:"mac" binding:"required"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password" binding:"required"` // @gotags: json:"password" binding:"required"`
	// contains filtered or unexported fields
}

func (*RegisterDeviceReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use RegisterDeviceReq.ProtoReflect.Descriptor instead.

func (*RegisterDeviceReq) GetMac added in v0.2.1

func (x *RegisterDeviceReq) GetMac() string

func (*RegisterDeviceReq) GetPassword added in v0.2.3

func (x *RegisterDeviceReq) GetPassword() string

func (*RegisterDeviceReq) ProtoMessage added in v0.2.1

func (*RegisterDeviceReq) ProtoMessage()

func (*RegisterDeviceReq) ProtoReflect added in v0.2.1

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

func (*RegisterDeviceReq) Reset added in v0.2.1

func (x *RegisterDeviceReq) Reset()

func (*RegisterDeviceReq) String added in v0.2.1

func (x *RegisterDeviceReq) String() string

type SetDevicePasswordReq added in v0.2.3

type SetDevicePasswordReq struct {
	Id       uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*SetDevicePasswordReq) Descriptor deprecated added in v0.2.3

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

Deprecated: Use SetDevicePasswordReq.ProtoReflect.Descriptor instead.

func (*SetDevicePasswordReq) GetId added in v0.2.3

func (x *SetDevicePasswordReq) GetId() uint64

func (*SetDevicePasswordReq) GetPassword added in v0.2.3

func (x *SetDevicePasswordReq) GetPassword() string

func (*SetDevicePasswordReq) ProtoMessage added in v0.2.3

func (*SetDevicePasswordReq) ProtoMessage()

func (*SetDevicePasswordReq) ProtoReflect added in v0.2.3

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

func (*SetDevicePasswordReq) Reset added in v0.2.3

func (x *SetDevicePasswordReq) Reset()

func (*SetDevicePasswordReq) String added in v0.2.3

func (x *SetDevicePasswordReq) String() string

type Sort added in v0.2.1

type Sort int32
const (
	Sort_DESC Sort = 0
	Sort_ASC  Sort = 1
)

func (Sort) Descriptor added in v0.2.1

func (Sort) Descriptor() protoreflect.EnumDescriptor

func (Sort) Enum added in v0.2.1

func (x Sort) Enum() *Sort

func (Sort) EnumDescriptor deprecated added in v0.2.1

func (Sort) EnumDescriptor() ([]byte, []int)

Deprecated: Use Sort.Descriptor instead.

func (Sort) Number added in v0.2.1

func (x Sort) Number() protoreflect.EnumNumber

func (Sort) String added in v0.2.1

func (x Sort) String() string

func (Sort) Type added in v0.2.1

func (Sort) Type() protoreflect.EnumType

type UnDeleteDeviceReq added in v0.2.1

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

func (*UnDeleteDeviceReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use UnDeleteDeviceReq.ProtoReflect.Descriptor instead.

func (*UnDeleteDeviceReq) GetId added in v0.2.1

func (x *UnDeleteDeviceReq) GetId() uint64

func (*UnDeleteDeviceReq) ProtoMessage added in v0.2.1

func (*UnDeleteDeviceReq) ProtoMessage()

func (*UnDeleteDeviceReq) ProtoReflect added in v0.2.1

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

func (*UnDeleteDeviceReq) Reset added in v0.2.1

func (x *UnDeleteDeviceReq) Reset()

func (*UnDeleteDeviceReq) String added in v0.2.1

func (x *UnDeleteDeviceReq) String() string

type UnimplementedDeviceServer

type UnimplementedDeviceServer struct{}

UnimplementedDeviceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedDeviceServer) DeleteDevice added in v0.2.1

func (UnimplementedDeviceServer) GetDeviceID added in v0.2.1

func (UnimplementedDeviceServer) GetDeviceInfo added in v0.2.1

func (UnimplementedDeviceServer) GetDeviceInfoByMac added in v0.2.1

func (UnimplementedDeviceServer) GetDeviceLastSeen added in v0.2.1

func (UnimplementedDeviceServer) ListDeletedDeviceInfo added in v0.2.1

func (UnimplementedDeviceServer) ListDevice added in v0.2.1

func (UnimplementedDeviceServer) RegisterDevice added in v0.2.1

func (UnimplementedDeviceServer) SetDevicePassword added in v0.2.3

func (UnimplementedDeviceServer) UnDeleteDevice added in v0.2.1

func (UnimplementedDeviceServer) UpdateDeviceLastSeen added in v0.2.1

type UnsafeDeviceServer

type UnsafeDeviceServer interface {
	// contains filtered or unexported methods
}

UnsafeDeviceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DeviceServer will result in compilation errors.

type UpdateDeviceLastSeenReq added in v0.2.1

type UpdateDeviceLastSeenReq struct {
	Id       uint64          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	LastSeen *DeviceLastSeen `protobuf:"bytes,2,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateDeviceLastSeenReq) Descriptor deprecated added in v0.2.1

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

Deprecated: Use UpdateDeviceLastSeenReq.ProtoReflect.Descriptor instead.

func (*UpdateDeviceLastSeenReq) GetId added in v0.2.1

func (x *UpdateDeviceLastSeenReq) GetId() uint64

func (*UpdateDeviceLastSeenReq) GetLastSeen added in v0.2.1

func (x *UpdateDeviceLastSeenReq) GetLastSeen() *DeviceLastSeen

func (*UpdateDeviceLastSeenReq) ProtoMessage added in v0.2.1

func (*UpdateDeviceLastSeenReq) ProtoMessage()

func (*UpdateDeviceLastSeenReq) ProtoReflect added in v0.2.1

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

func (*UpdateDeviceLastSeenReq) Reset added in v0.2.1

func (x *UpdateDeviceLastSeenReq) Reset()

func (*UpdateDeviceLastSeenReq) String added in v0.2.1

func (x *UpdateDeviceLastSeenReq) String() string

Jump to

Keyboard shortcuts

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