notify

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

Documentation

Index

Constants

View Source
const (
	Notify_NotifyTestEmail_FullMethodName     = "/api.notify.Notify/NotifyTestEmail"
	Notify_NotifyDeviceOnline_FullMethodName  = "/api.notify.Notify/NotifyDeviceOnline"
	Notify_NotifyDeviceOffline_FullMethodName = "/api.notify.Notify/NotifyDeviceOffline"
)
View Source
const OperationNotifyNotifyDeviceOffline = "/api.notify.Notify/NotifyDeviceOffline"
View Source
const OperationNotifyNotifyDeviceOnline = "/api.notify.Notify/NotifyDeviceOnline"
View Source
const OperationNotifyNotifyTestEmail = "/api.notify.Notify/NotifyTestEmail"

Variables

View Source
var File_notify_notify_proto protoreflect.FileDescriptor
View Source
var Notify_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.notify.Notify",
	HandlerType: (*NotifyServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NotifyTestEmail",
			Handler:    _Notify_NotifyTestEmail_Handler,
		},
		{
			MethodName: "NotifyDeviceOnline",
			Handler:    _Notify_NotifyDeviceOnline_Handler,
		},
		{
			MethodName: "NotifyDeviceOffline",
			Handler:    _Notify_NotifyDeviceOffline_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "notify/notify.proto",
}

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

Functions

func RegisterNotifyHTTPServer

func RegisterNotifyHTTPServer(s *http.Server, srv NotifyHTTPServer)

func RegisterNotifyServer

func RegisterNotifyServer(s grpc.ServiceRegistrar, srv NotifyServer)

Types

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type NotifyClient

type NotifyClient interface {
	NotifyTestEmail(ctx context.Context, in *NotifyTestEmailReq, opts ...grpc.CallOption) (*Empty, error)
	NotifyDeviceOnline(ctx context.Context, in *NotifyDeviceOnlineReq, opts ...grpc.CallOption) (*Empty, error)
	NotifyDeviceOffline(ctx context.Context, in *NotifyDeviceOfflineReq, opts ...grpc.CallOption) (*Empty, error)
}

NotifyClient is the client API for Notify 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 NewNotifyClient

func NewNotifyClient(cc grpc.ClientConnInterface) NotifyClient

type NotifyDeviceOfflineReq

type NotifyDeviceOfflineReq struct {
	Async      bool                         `protobuf:"varint,1,opt,name=async,proto3" json:"async,omitempty"`
	DeviceId   uint64                       `protobuf:"varint,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	LastSeen   *device.DeviceLastSeen       `protobuf:"bytes,3,opt,name=last_seen,json=lastSeen,proto3" json:"last_seen,omitempty"`
	LastReport *collection.CollectionRecord `protobuf:"bytes,4,opt,name=last_report,json=lastReport,proto3" json:"last_report,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyDeviceOfflineReq) Descriptor deprecated

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

Deprecated: Use NotifyDeviceOfflineReq.ProtoReflect.Descriptor instead.

func (*NotifyDeviceOfflineReq) GetAsync

func (x *NotifyDeviceOfflineReq) GetAsync() bool

func (*NotifyDeviceOfflineReq) GetDeviceId

func (x *NotifyDeviceOfflineReq) GetDeviceId() uint64

func (*NotifyDeviceOfflineReq) GetLastReport added in v0.3.3

func (*NotifyDeviceOfflineReq) GetLastSeen added in v0.3.3

func (x *NotifyDeviceOfflineReq) GetLastSeen() *device.DeviceLastSeen

func (*NotifyDeviceOfflineReq) ProtoMessage

func (*NotifyDeviceOfflineReq) ProtoMessage()

func (*NotifyDeviceOfflineReq) ProtoReflect

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

func (*NotifyDeviceOfflineReq) Reset

func (x *NotifyDeviceOfflineReq) Reset()

func (*NotifyDeviceOfflineReq) String

func (x *NotifyDeviceOfflineReq) String() string

type NotifyDeviceOnlineReq

type NotifyDeviceOnlineReq struct {
	Async    bool                         `protobuf:"varint,1,opt,name=async,proto3" json:"async,omitempty"`
	DeviceId uint64                       `protobuf:"varint,2,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	Seen     *device.DeviceLastSeen       `protobuf:"bytes,3,opt,name=seen,proto3" json:"seen,omitempty"`
	Report   *collection.CollectionRecord `protobuf:"bytes,4,opt,name=report,proto3" json:"report,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyDeviceOnlineReq) Descriptor deprecated

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

Deprecated: Use NotifyDeviceOnlineReq.ProtoReflect.Descriptor instead.

func (*NotifyDeviceOnlineReq) GetAsync

func (x *NotifyDeviceOnlineReq) GetAsync() bool

func (*NotifyDeviceOnlineReq) GetDeviceId

func (x *NotifyDeviceOnlineReq) GetDeviceId() uint64

func (*NotifyDeviceOnlineReq) GetReport added in v0.3.3

func (*NotifyDeviceOnlineReq) GetSeen added in v0.3.3

func (*NotifyDeviceOnlineReq) ProtoMessage

func (*NotifyDeviceOnlineReq) ProtoMessage()

func (*NotifyDeviceOnlineReq) ProtoReflect

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

func (*NotifyDeviceOnlineReq) Reset

func (x *NotifyDeviceOnlineReq) Reset()

func (*NotifyDeviceOnlineReq) String

func (x *NotifyDeviceOnlineReq) String() string

type NotifyHTTPClient

type NotifyHTTPClient interface {
	NotifyDeviceOffline(ctx context.Context, req *NotifyDeviceOfflineReq, opts ...http.CallOption) (rsp *Empty, err error)
	NotifyDeviceOnline(ctx context.Context, req *NotifyDeviceOnlineReq, opts ...http.CallOption) (rsp *Empty, err error)
	NotifyTestEmail(ctx context.Context, req *NotifyTestEmailReq, opts ...http.CallOption) (rsp *Empty, err error)
}

func NewNotifyHTTPClient

func NewNotifyHTTPClient(client *http.Client) NotifyHTTPClient

type NotifyHTTPClientImpl

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

func (*NotifyHTTPClientImpl) NotifyDeviceOffline

func (c *NotifyHTTPClientImpl) NotifyDeviceOffline(ctx context.Context, in *NotifyDeviceOfflineReq, opts ...http.CallOption) (*Empty, error)

func (*NotifyHTTPClientImpl) NotifyDeviceOnline

func (c *NotifyHTTPClientImpl) NotifyDeviceOnline(ctx context.Context, in *NotifyDeviceOnlineReq, opts ...http.CallOption) (*Empty, error)

func (*NotifyHTTPClientImpl) NotifyTestEmail added in v0.4.0

func (c *NotifyHTTPClientImpl) NotifyTestEmail(ctx context.Context, in *NotifyTestEmailReq, opts ...http.CallOption) (*Empty, error)

type NotifyHTTPServer

type NotifyHTTPServer interface {
	NotifyDeviceOffline(context.Context, *NotifyDeviceOfflineReq) (*Empty, error)
	NotifyDeviceOnline(context.Context, *NotifyDeviceOnlineReq) (*Empty, error)
	NotifyTestEmail(context.Context, *NotifyTestEmailReq) (*Empty, error)
}

type NotifyServer

type NotifyServer interface {
	NotifyTestEmail(context.Context, *NotifyTestEmailReq) (*Empty, error)
	NotifyDeviceOnline(context.Context, *NotifyDeviceOnlineReq) (*Empty, error)
	NotifyDeviceOffline(context.Context, *NotifyDeviceOfflineReq) (*Empty, error)
	// contains filtered or unexported methods
}

NotifyServer is the server API for Notify service. All implementations must embed UnimplementedNotifyServer for forward compatibility.

type NotifyTestEmailReq added in v0.4.0

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

func (*NotifyTestEmailReq) Descriptor deprecated added in v0.4.0

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

Deprecated: Use NotifyTestEmailReq.ProtoReflect.Descriptor instead.

func (*NotifyTestEmailReq) GetUserId added in v0.4.0

func (x *NotifyTestEmailReq) GetUserId() string

func (*NotifyTestEmailReq) ProtoMessage added in v0.4.0

func (*NotifyTestEmailReq) ProtoMessage()

func (*NotifyTestEmailReq) ProtoReflect added in v0.4.0

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

func (*NotifyTestEmailReq) Reset added in v0.4.0

func (x *NotifyTestEmailReq) Reset()

func (*NotifyTestEmailReq) String added in v0.4.0

func (x *NotifyTestEmailReq) String() string

type UnimplementedNotifyServer

type UnimplementedNotifyServer struct{}

UnimplementedNotifyServer 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 (UnimplementedNotifyServer) NotifyDeviceOffline

func (UnimplementedNotifyServer) NotifyDeviceOnline

func (UnimplementedNotifyServer) NotifyTestEmail added in v0.4.0

type UnsafeNotifyServer

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

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

Jump to

Keyboard shortcuts

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