Documentation ¶
Index ¶
- Variables
- func NewNotificationServiceEndpoints() []*api.Endpoint
- func RegisterNotificationServiceHandler(s server.Server, hdlr NotificationServiceHandler, opts ...server.HandlerOption) error
- type IDReq
- type IDsReq
- type Notification
- func (*Notification) Descriptor() ([]byte, []int)deprecated
- func (x *Notification) GetContent() string
- func (x *Notification) GetCreateAt() string
- func (x *Notification) GetDeleteAt() string
- func (x *Notification) GetId() uint32
- func (x *Notification) GetIsReaded() bool
- func (x *Notification) GetService() string
- func (*Notification) ProtoMessage()
- func (x *Notification) ProtoReflect() protoreflect.Message
- func (x *Notification) Reset()
- func (x *Notification) String() string
- type NotificationFilter
- func (*NotificationFilter) Descriptor() ([]byte, []int)deprecated
- func (x *NotificationFilter) GetAnd() []*NotificationFilter
- func (x *NotificationFilter) GetContent() *wrappers.StringValue
- func (x *NotificationFilter) GetCreateAtGE() *wrappers.StringValue
- func (x *NotificationFilter) GetCreateAtGT() *wrappers.StringValue
- func (x *NotificationFilter) GetCreateAtLE() *wrappers.StringValue
- func (x *NotificationFilter) GetCreateAtLT() *wrappers.StringValue
- func (x *NotificationFilter) GetIdIn() []uint32
- func (x *NotificationFilter) GetIsReaded() *wrappers.BoolValue
- func (x *NotificationFilter) GetOr() []*NotificationFilter
- func (x *NotificationFilter) GetServiceIn() []string
- func (*NotificationFilter) ProtoMessage()
- func (x *NotificationFilter) ProtoReflect() protoreflect.Message
- func (x *NotificationFilter) Reset()
- func (x *NotificationFilter) String() string
- type NotificationQuery
- func (*NotificationQuery) Descriptor() ([]byte, []int)deprecated
- func (x *NotificationQuery) GetFilter() *NotificationFilter
- func (x *NotificationQuery) GetLimit() uint32
- func (x *NotificationQuery) GetOffset() uint32
- func (x *NotificationQuery) GetPage() uint32
- func (x *NotificationQuery) GetPerPage() uint32
- func (*NotificationQuery) ProtoMessage()
- func (x *NotificationQuery) ProtoReflect() protoreflect.Message
- func (x *NotificationQuery) Reset()
- func (x *NotificationQuery) String() string
- type NotificationReq
- func (*NotificationReq) Descriptor() ([]byte, []int)deprecated
- func (x *NotificationReq) GetContent() string
- func (x *NotificationReq) GetService() string
- func (*NotificationReq) ProtoMessage()
- func (x *NotificationReq) ProtoReflect() protoreflect.Message
- func (x *NotificationReq) Reset()
- func (x *NotificationReq) String() string
- type NotificationService
- type NotificationServiceHandler
- type Notifications
- func (*Notifications) Descriptor() ([]byte, []int)deprecated
- func (x *Notifications) GetCurrpages() uint32
- func (x *Notifications) GetNotifications() []*Notification
- func (x *Notifications) GetTotalpages() uint32
- func (x *Notifications) GetTotals() uint32
- func (*Notifications) ProtoMessage()
- func (x *Notifications) ProtoReflect() protoreflect.Message
- func (x *Notifications) Reset()
- func (x *Notifications) String() string
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_notification_notification_proto protoreflect.FileDescriptor
Functions ¶
func RegisterNotificationServiceHandler ¶
func RegisterNotificationServiceHandler(s server.Server, hdlr NotificationServiceHandler, opts ...server.HandlerOption) error
Types ¶
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) ProtoMessage ¶
func (*IDReq) ProtoMessage()
func (*IDReq) ProtoReflect ¶
func (x *IDReq) ProtoReflect() protoreflect.Message
type IDsReq ¶
type IDsReq struct { Ids []uint32 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*IDsReq) Descriptor
deprecated
func (*IDsReq) ProtoMessage ¶
func (*IDsReq) ProtoMessage()
func (*IDsReq) ProtoReflect ¶
func (x *IDsReq) ProtoReflect() protoreflect.Message
type Notification ¶
type Notification struct { // 通知ID Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 哪个服务触发的通知 Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` IsReaded bool `protobuf:"varint,4,opt,name=isReaded,proto3" json:"isReaded,omitempty"` // 通知创建时间 CreateAt string `protobuf:"bytes,5,opt,name=createAt,proto3" json:"createAt,omitempty"` // 通知删除时间 DeleteAt string `protobuf:"bytes,6,opt,name=deleteAt,proto3" json:"deleteAt,omitempty"` // contains filtered or unexported fields }
func (*Notification) Descriptor
deprecated
func (*Notification) Descriptor() ([]byte, []int)
Deprecated: Use Notification.ProtoReflect.Descriptor instead.
func (*Notification) GetContent ¶
func (x *Notification) GetContent() string
func (*Notification) GetCreateAt ¶
func (x *Notification) GetCreateAt() string
func (*Notification) GetDeleteAt ¶
func (x *Notification) GetDeleteAt() string
func (*Notification) GetId ¶
func (x *Notification) GetId() uint32
func (*Notification) GetIsReaded ¶
func (x *Notification) GetIsReaded() bool
func (*Notification) GetService ¶
func (x *Notification) GetService() string
func (*Notification) ProtoMessage ¶
func (*Notification) ProtoMessage()
func (*Notification) ProtoReflect ¶
func (x *Notification) ProtoReflect() protoreflect.Message
func (*Notification) Reset ¶
func (x *Notification) Reset()
func (*Notification) String ¶
func (x *Notification) String() string
type NotificationFilter ¶
type NotificationFilter struct { And []*NotificationFilter `protobuf:"bytes,1,rep,name=and,proto3" json:"and,omitempty"` Or []*NotificationFilter `protobuf:"bytes,2,rep,name=or,proto3" json:"or,omitempty"` IdIn []uint32 `protobuf:"varint,3,rep,packed,name=idIn,proto3" json:"idIn,omitempty"` ServiceIn []string `protobuf:"bytes,4,rep,name=serviceIn,proto3" json:"serviceIn,omitempty"` Content *wrappers.StringValue `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"` IsReaded *wrappers.BoolValue `protobuf:"bytes,6,opt,name=isReaded,proto3" json:"isReaded,omitempty"` CreateAtLT *wrappers.StringValue `protobuf:"bytes,7,opt,name=createAtLT,proto3" json:"createAtLT,omitempty"` CreateAtGT *wrappers.StringValue `protobuf:"bytes,8,opt,name=createAtGT,proto3" json:"createAtGT,omitempty"` CreateAtLE *wrappers.StringValue `protobuf:"bytes,9,opt,name=createAtLE,proto3" json:"createAtLE,omitempty"` CreateAtGE *wrappers.StringValue `protobuf:"bytes,10,opt,name=createAtGE,proto3" json:"createAtGE,omitempty"` // contains filtered or unexported fields }
func (*NotificationFilter) Descriptor
deprecated
func (*NotificationFilter) Descriptor() ([]byte, []int)
Deprecated: Use NotificationFilter.ProtoReflect.Descriptor instead.
func (*NotificationFilter) GetAnd ¶
func (x *NotificationFilter) GetAnd() []*NotificationFilter
func (*NotificationFilter) GetContent ¶
func (x *NotificationFilter) GetContent() *wrappers.StringValue
func (*NotificationFilter) GetCreateAtGE ¶
func (x *NotificationFilter) GetCreateAtGE() *wrappers.StringValue
func (*NotificationFilter) GetCreateAtGT ¶
func (x *NotificationFilter) GetCreateAtGT() *wrappers.StringValue
func (*NotificationFilter) GetCreateAtLE ¶
func (x *NotificationFilter) GetCreateAtLE() *wrappers.StringValue
func (*NotificationFilter) GetCreateAtLT ¶
func (x *NotificationFilter) GetCreateAtLT() *wrappers.StringValue
func (*NotificationFilter) GetIdIn ¶
func (x *NotificationFilter) GetIdIn() []uint32
func (*NotificationFilter) GetIsReaded ¶
func (x *NotificationFilter) GetIsReaded() *wrappers.BoolValue
func (*NotificationFilter) GetOr ¶
func (x *NotificationFilter) GetOr() []*NotificationFilter
func (*NotificationFilter) GetServiceIn ¶
func (x *NotificationFilter) GetServiceIn() []string
func (*NotificationFilter) ProtoMessage ¶
func (*NotificationFilter) ProtoMessage()
func (*NotificationFilter) ProtoReflect ¶
func (x *NotificationFilter) ProtoReflect() protoreflect.Message
func (*NotificationFilter) Reset ¶
func (x *NotificationFilter) Reset()
func (*NotificationFilter) String ¶
func (x *NotificationFilter) String() string
type NotificationQuery ¶
type NotificationQuery 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 *NotificationFilter `protobuf:"bytes,7,opt,name=filter,proto3" json:"filter,omitempty"` // contains filtered or unexported fields }
func (*NotificationQuery) Descriptor
deprecated
func (*NotificationQuery) Descriptor() ([]byte, []int)
Deprecated: Use NotificationQuery.ProtoReflect.Descriptor instead.
func (*NotificationQuery) GetFilter ¶
func (x *NotificationQuery) GetFilter() *NotificationFilter
func (*NotificationQuery) GetLimit ¶
func (x *NotificationQuery) GetLimit() uint32
func (*NotificationQuery) GetOffset ¶
func (x *NotificationQuery) GetOffset() uint32
func (*NotificationQuery) GetPage ¶
func (x *NotificationQuery) GetPage() uint32
func (*NotificationQuery) GetPerPage ¶
func (x *NotificationQuery) GetPerPage() uint32
func (*NotificationQuery) ProtoMessage ¶
func (*NotificationQuery) ProtoMessage()
func (*NotificationQuery) ProtoReflect ¶
func (x *NotificationQuery) ProtoReflect() protoreflect.Message
func (*NotificationQuery) Reset ¶
func (x *NotificationQuery) Reset()
func (*NotificationQuery) String ¶
func (x *NotificationQuery) String() string
type NotificationReq ¶
type NotificationReq struct { // 哪个服务触发的通知 Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` // contains filtered or unexported fields }
func (*NotificationReq) Descriptor
deprecated
func (*NotificationReq) Descriptor() ([]byte, []int)
Deprecated: Use NotificationReq.ProtoReflect.Descriptor instead.
func (*NotificationReq) GetContent ¶
func (x *NotificationReq) GetContent() string
func (*NotificationReq) GetService ¶
func (x *NotificationReq) GetService() string
func (*NotificationReq) ProtoMessage ¶
func (*NotificationReq) ProtoMessage()
func (*NotificationReq) ProtoReflect ¶
func (x *NotificationReq) ProtoReflect() protoreflect.Message
func (*NotificationReq) Reset ¶
func (x *NotificationReq) Reset()
func (*NotificationReq) String ¶
func (x *NotificationReq) String() string
type NotificationService ¶
type NotificationService interface { AddNotification(ctx context.Context, in *NotificationReq, opts ...client.CallOption) (*Response, error) GetNotification(ctx context.Context, in *IDReq, opts ...client.CallOption) (*Notification, error) GetNotifications(ctx context.Context, in *NotificationQuery, opts ...client.CallOption) (*Notifications, error) DeleteNotifications(ctx context.Context, in *NotificationFilter, opts ...client.CallOption) (*Response, error) // 标记通知为已读 MarkAsRead(ctx context.Context, in *IDsReq, opts ...client.CallOption) (*Response, error) }
func NewNotificationService ¶
func NewNotificationService(name string, c client.Client) NotificationService
type NotificationServiceHandler ¶
type NotificationServiceHandler interface { AddNotification(context.Context, *NotificationReq, *Response) error GetNotification(context.Context, *IDReq, *Notification) error GetNotifications(context.Context, *NotificationQuery, *Notifications) error DeleteNotifications(context.Context, *NotificationFilter, *Response) error // 标记通知为已读 MarkAsRead(context.Context, *IDsReq, *Response) error }
type Notifications ¶
type Notifications struct { Notifications []*Notification `protobuf:"bytes,1,rep,name=notifications,proto3" json:"notifications,omitempty"` Totals uint32 `protobuf:"varint,4,opt,name=totals,proto3" json:"totals,omitempty"` Totalpages uint32 `protobuf:"varint,2,opt,name=totalpages,proto3" json:"totalpages,omitempty"` Currpages uint32 `protobuf:"varint,3,opt,name=currpages,proto3" json:"currpages,omitempty"` // contains filtered or unexported fields }
func (*Notifications) Descriptor
deprecated
func (*Notifications) Descriptor() ([]byte, []int)
Deprecated: Use Notifications.ProtoReflect.Descriptor instead.
func (*Notifications) GetCurrpages ¶
func (x *Notifications) GetCurrpages() uint32
func (*Notifications) GetNotifications ¶
func (x *Notifications) GetNotifications() []*Notification
func (*Notifications) GetTotalpages ¶
func (x *Notifications) GetTotalpages() uint32
func (*Notifications) GetTotals ¶
func (x *Notifications) GetTotals() uint32
func (*Notifications) ProtoMessage ¶
func (*Notifications) ProtoMessage()
func (*Notifications) ProtoReflect ¶
func (x *Notifications) ProtoReflect() protoreflect.Message
func (*Notifications) Reset ¶
func (x *Notifications) Reset()
func (*Notifications) String ¶
func (x *Notifications) String() string
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) Descriptor
deprecated
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) ProtoReflect ¶
func (x *Response) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.