Documentation
¶
Index ¶
- Variables
- func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
- type Condition
- func (*Condition) Descriptor() ([]byte, []int)deprecated
- func (m *Condition) GetCond() isCondition_Cond
- func (x *Condition) GetGc() *GroupCondition
- func (x *Condition) GetNc() *NumberCondition
- func (x *Condition) GetNot() bool
- func (x *Condition) GetTc() *TextCondition
- func (*Condition) ProtoMessage()
- func (x *Condition) ProtoReflect() protoreflect.Message
- func (x *Condition) Reset()
- func (x *Condition) String() string
- type Condition_Gc
- type Condition_Nc
- type Condition_Tc
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetCond() *Condition
- func (x *CreateRequest) GetDescription() string
- func (x *CreateRequest) GetEnabled() bool
- func (x *CreateRequest) GetExpires() *timestamppb.Timestamp
- func (x *CreateRequest) GetPublic() bool
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type Cursor
- type DeleteRequest
- type DeleteResponse
- type GroupCondition
- func (*GroupCondition) Descriptor() ([]byte, []int)deprecated
- func (x *GroupCondition) GetGroup() []*Condition
- func (x *GroupCondition) GetLogic() GroupLogic
- func (*GroupCondition) ProtoMessage()
- func (x *GroupCondition) ProtoReflect() protoreflect.Message
- func (x *GroupCondition) Reset()
- func (x *GroupCondition) String() string
- type GroupLogic
- type NumberCondition
- func (*NumberCondition) Descriptor() ([]byte, []int)deprecated
- func (x *NumberCondition) GetId() string
- func (x *NumberCondition) GetKey() string
- func (x *NumberCondition) GetOp() Operation
- func (x *NumberCondition) GetVal() float64
- func (*NumberCondition) ProtoMessage()
- func (x *NumberCondition) ProtoReflect() protoreflect.Message
- func (x *NumberCondition) Reset()
- func (x *NumberCondition) String() string
- type Operation
- type Order
- type ReadRequest
- type ReadResponse
- func (*ReadResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadResponse) GetCond() *Condition
- func (x *ReadResponse) GetCreated() *timestamppb.Timestamp
- func (x *ReadResponse) GetDescription() string
- func (x *ReadResponse) GetEnabled() bool
- func (x *ReadResponse) GetExpires() *timestamppb.Timestamp
- func (x *ReadResponse) GetFollowers() int64
- func (x *ReadResponse) GetPublic() bool
- func (x *ReadResponse) GetUpdated() *timestamppb.Timestamp
- func (*ReadResponse) ProtoMessage()
- func (x *ReadResponse) ProtoReflect() protoreflect.Message
- func (x *ReadResponse) Reset()
- func (x *ReadResponse) String() string
- type SearchOwnRequest
- func (*SearchOwnRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchOwnRequest) GetCursor() string
- func (x *SearchOwnRequest) GetLimit() uint32
- func (x *SearchOwnRequest) GetOrder() Order
- func (x *SearchOwnRequest) GetPattern() string
- func (*SearchOwnRequest) ProtoMessage()
- func (x *SearchOwnRequest) ProtoReflect() protoreflect.Message
- func (x *SearchOwnRequest) Reset()
- func (x *SearchOwnRequest) String() string
- type SearchOwnResponse
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetCursor() *Cursor
- func (x *SearchRequest) GetLimit() uint32
- func (x *SearchRequest) GetOrder() Order
- func (x *SearchRequest) GetPattern() string
- func (x *SearchRequest) GetSort() Sort
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (x *SearchRequest) String() string
- type SearchResponse
- type Service
- type ServiceClient
- type ServiceServer
- type Sort
- type TextCondition
- func (*TextCondition) Descriptor() ([]byte, []int)deprecated
- func (x *TextCondition) GetExact() bool
- func (x *TextCondition) GetId() string
- func (x *TextCondition) GetKey() string
- func (x *TextCondition) GetTerm() string
- func (*TextCondition) ProtoMessage()
- func (x *TextCondition) ProtoReflect() protoreflect.Message
- func (x *TextCondition) Reset()
- func (x *TextCondition) String() string
- type UnimplementedServiceServer
- func (*UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (*UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (*UnimplementedServiceServer) Read(context.Context, *ReadRequest) (*ReadResponse, error)
- func (*UnimplementedServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error)
- func (*UnimplementedServiceServer) SearchOwn(context.Context, *SearchOwnRequest) (*SearchOwnResponse, error)
- func (*UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetCond() *Condition
- func (x *UpdateRequest) GetDescription() string
- func (x *UpdateRequest) GetEnabled() bool
- func (x *UpdateRequest) GetExpires() *timestamppb.Timestamp
- func (x *UpdateRequest) GetId() string
- func (x *UpdateRequest) GetPublic() bool
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
var ( GroupLogic_name = map[int32]string{ 0: "And", 1: "Or", 2: "Xor", } GroupLogic_value = map[string]int32{ "And": 0, "Or": 1, "Xor": 2, } )
Enum value maps for GroupLogic.
var ( Operation_name = map[int32]string{ 0: "Undefined", 1: "Gt", 2: "Gte", 3: "Eq", 4: "Lte", 5: "Lt", } Operation_value = map[string]int32{ "Undefined": 0, "Gt": 1, "Gte": 2, "Eq": 3, "Lte": 4, "Lt": 5, } )
Enum value maps for Operation.
var ( Order_name = map[int32]string{ 0: "ASC", 1: "DESC", } Order_value = map[string]int32{ "ASC": 0, "DESC": 1, } )
Enum value maps for Order.
var ( Sort_name = map[int32]string{ 0: "ID", 1: "FOLLOWERS", } Sort_value = map[string]int32{ "ID": 0, "FOLLOWERS": 1, } )
Enum value maps for Sort.
var ErrInternal = errors.New("internal failure")
ErrInternal indicates some unexpected internal failure.
var ErrInvalid = errors.New("invalid subscription")
ErrInvalid indicates the invalid subscription.
var ErrNotFound = errors.New("subscription was not found")
ErrNotFound indicates the subscription is missing in the storage and can not be read/updated/deleted.
var File_api_grpc_subscriptions_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterServiceServer ¶ added in v0.0.2
func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
Types ¶
type Condition ¶ added in v1.0.1
type Condition struct {
Not bool `protobuf:"varint,1,opt,name=not,proto3" json:"not,omitempty"`
// Types that are assignable to Cond:
//
// *Condition_Gc
// *Condition_Tc
// *Condition_Nc
Cond isCondition_Cond `protobuf_oneof:"cond"`
// contains filtered or unexported fields
}
Condition represents the Subscription routing Condition data that is immutable once Subscription is created.
func (*Condition) Descriptor
deprecated
added in
v1.0.1
func (*Condition) GetGc ¶ added in v1.0.1
func (x *Condition) GetGc() *GroupCondition
func (*Condition) GetNc ¶ added in v1.0.4
func (x *Condition) GetNc() *NumberCondition
func (*Condition) GetTc ¶ added in v1.0.1
func (x *Condition) GetTc() *TextCondition
func (*Condition) ProtoMessage ¶ added in v1.0.1
func (*Condition) ProtoMessage()
func (*Condition) ProtoReflect ¶ added in v1.0.1
func (x *Condition) ProtoReflect() protoreflect.Message
type Condition_Gc ¶ added in v1.0.1
type Condition_Gc struct {
Gc *GroupCondition `protobuf:"bytes,2,opt,name=gc,proto3,oneof"`
}
type Condition_Nc ¶ added in v1.0.4
type Condition_Nc struct {
Nc *NumberCondition `protobuf:"bytes,4,opt,name=nc,proto3,oneof"`
}
type Condition_Tc ¶ added in v1.0.1
type Condition_Tc struct {
Tc *TextCondition `protobuf:"bytes,3,opt,name=tc,proto3,oneof"`
}
type CreateRequest ¶ added in v0.0.2
type CreateRequest struct {
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
Cond *Condition `protobuf:"bytes,3,opt,name=cond,proto3" json:"cond,omitempty"`
Expires *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"`
Public bool `protobuf:"varint,5,opt,name=public,proto3" json:"public,omitempty"`
// contains filtered or unexported fields
}
func (*CreateRequest) Descriptor
deprecated
added in
v0.0.2
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetCond ¶ added in v0.0.2
func (x *CreateRequest) GetCond() *Condition
func (*CreateRequest) GetDescription ¶ added in v0.0.5
func (x *CreateRequest) GetDescription() string
func (*CreateRequest) GetEnabled ¶ added in v0.0.5
func (x *CreateRequest) GetEnabled() bool
func (*CreateRequest) GetExpires ¶ added in v1.0.6
func (x *CreateRequest) GetExpires() *timestamppb.Timestamp
func (*CreateRequest) GetPublic ¶ added in v1.1.0
func (x *CreateRequest) GetPublic() bool
func (*CreateRequest) ProtoMessage ¶ added in v0.0.2
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶ added in v0.0.2
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶ added in v0.0.2
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶ added in v0.0.2
func (x *CreateRequest) String() string
type CreateResponse ¶ added in v0.0.2
type CreateResponse struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*CreateResponse) Descriptor
deprecated
added in
v0.0.2
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetId ¶ added in v0.0.2
func (x *CreateResponse) GetId() string
func (*CreateResponse) ProtoMessage ¶ added in v0.0.2
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶ added in v0.0.2
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶ added in v0.0.2
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶ added in v0.0.2
func (x *CreateResponse) String() string
type Cursor ¶ added in v1.1.0
type Cursor struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Followers int64 `protobuf:"varint,2,opt,name=followers,proto3" json:"followers,omitempty"`
// contains filtered or unexported fields
}
func (*Cursor) Descriptor
deprecated
added in
v1.1.0
func (*Cursor) GetFollowers ¶ added in v1.1.0
func (*Cursor) ProtoMessage ¶ added in v1.1.0
func (*Cursor) ProtoMessage()
func (*Cursor) ProtoReflect ¶ added in v1.1.0
func (x *Cursor) ProtoReflect() protoreflect.Message
type DeleteRequest ¶ added in v0.0.2
type DeleteRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteRequest) Descriptor
deprecated
added in
v0.0.2
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶ added in v0.0.2
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶ added in v0.0.2
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶ added in v0.0.2
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶ added in v0.0.2
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶ added in v0.0.2
func (x *DeleteRequest) String() string
type DeleteResponse ¶ added in v0.0.5
type DeleteResponse struct {
// contains filtered or unexported fields
}
func (*DeleteResponse) Descriptor
deprecated
added in
v0.0.5
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) ProtoMessage ¶ added in v0.0.5
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶ added in v0.0.5
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶ added in v0.0.5
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶ added in v0.0.5
func (x *DeleteResponse) String() string
type GroupCondition ¶ added in v1.0.1
type GroupCondition struct {
Logic GroupLogic `protobuf:"varint,1,opt,name=logic,proto3,enum=awakari.interests.api.GroupLogic" json:"logic,omitempty"`
Group []*Condition `protobuf:"bytes,2,rep,name=group,proto3" json:"group,omitempty"`
// contains filtered or unexported fields
}
func (*GroupCondition) Descriptor
deprecated
added in
v1.0.1
func (*GroupCondition) Descriptor() ([]byte, []int)
Deprecated: Use GroupCondition.ProtoReflect.Descriptor instead.
func (*GroupCondition) GetGroup ¶ added in v1.0.1
func (x *GroupCondition) GetGroup() []*Condition
func (*GroupCondition) GetLogic ¶ added in v1.0.1
func (x *GroupCondition) GetLogic() GroupLogic
func (*GroupCondition) ProtoMessage ¶ added in v1.0.1
func (*GroupCondition) ProtoMessage()
func (*GroupCondition) ProtoReflect ¶ added in v1.0.1
func (x *GroupCondition) ProtoReflect() protoreflect.Message
func (*GroupCondition) Reset ¶ added in v1.0.1
func (x *GroupCondition) Reset()
func (*GroupCondition) String ¶ added in v1.0.1
func (x *GroupCondition) String() string
type GroupLogic ¶ added in v0.0.2
type GroupLogic int32
const ( GroupLogic_And GroupLogic = 0 GroupLogic_Or GroupLogic = 1 GroupLogic_Xor GroupLogic = 2 )
func (GroupLogic) Descriptor ¶ added in v0.0.2
func (GroupLogic) Descriptor() protoreflect.EnumDescriptor
func (GroupLogic) Enum ¶ added in v0.0.2
func (x GroupLogic) Enum() *GroupLogic
func (GroupLogic) EnumDescriptor
deprecated
added in
v0.0.2
func (GroupLogic) EnumDescriptor() ([]byte, []int)
Deprecated: Use GroupLogic.Descriptor instead.
func (GroupLogic) Number ¶ added in v0.0.2
func (x GroupLogic) Number() protoreflect.EnumNumber
func (GroupLogic) String ¶ added in v0.0.2
func (x GroupLogic) String() string
func (GroupLogic) Type ¶ added in v0.0.2
func (GroupLogic) Type() protoreflect.EnumType
type NumberCondition ¶ added in v1.0.4
type NumberCondition struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // skip when create
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
Op Operation `protobuf:"varint,3,opt,name=op,proto3,enum=awakari.interests.api.Operation" json:"op,omitempty"`
Val float64 `protobuf:"fixed64,4,opt,name=val,proto3" json:"val,omitempty"`
// contains filtered or unexported fields
}
func (*NumberCondition) Descriptor
deprecated
added in
v1.0.4
func (*NumberCondition) Descriptor() ([]byte, []int)
Deprecated: Use NumberCondition.ProtoReflect.Descriptor instead.
func (*NumberCondition) GetId ¶ added in v1.0.4
func (x *NumberCondition) GetId() string
func (*NumberCondition) GetKey ¶ added in v1.0.4
func (x *NumberCondition) GetKey() string
func (*NumberCondition) GetOp ¶ added in v1.0.4
func (x *NumberCondition) GetOp() Operation
func (*NumberCondition) GetVal ¶ added in v1.0.4
func (x *NumberCondition) GetVal() float64
func (*NumberCondition) ProtoMessage ¶ added in v1.0.4
func (*NumberCondition) ProtoMessage()
func (*NumberCondition) ProtoReflect ¶ added in v1.0.4
func (x *NumberCondition) ProtoReflect() protoreflect.Message
func (*NumberCondition) Reset ¶ added in v1.0.4
func (x *NumberCondition) Reset()
func (*NumberCondition) String ¶ added in v1.0.4
func (x *NumberCondition) String() string
type Operation ¶ added in v1.0.4
type Operation int32
func (Operation) Descriptor ¶ added in v1.0.4
func (Operation) Descriptor() protoreflect.EnumDescriptor
func (Operation) EnumDescriptor
deprecated
added in
v1.0.4
func (Operation) Number ¶ added in v1.0.4
func (x Operation) Number() protoreflect.EnumNumber
func (Operation) Type ¶ added in v1.0.4
func (Operation) Type() protoreflect.EnumType
type Order ¶ added in v1.1.0
type Order int32
func (Order) Descriptor ¶ added in v1.1.0
func (Order) Descriptor() protoreflect.EnumDescriptor
func (Order) EnumDescriptor
deprecated
added in
v1.1.0
func (Order) Number ¶ added in v1.1.0
func (x Order) Number() protoreflect.EnumNumber
func (Order) Type ¶ added in v1.1.0
func (Order) Type() protoreflect.EnumType
type ReadRequest ¶ added in v0.0.2
type ReadRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
func (*ReadRequest) Descriptor
deprecated
added in
v0.0.2
func (*ReadRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) GetId ¶ added in v0.0.2
func (x *ReadRequest) GetId() string
func (*ReadRequest) ProtoMessage ¶ added in v0.0.2
func (*ReadRequest) ProtoMessage()
func (*ReadRequest) ProtoReflect ¶ added in v0.0.2
func (x *ReadRequest) ProtoReflect() protoreflect.Message
func (*ReadRequest) Reset ¶ added in v0.0.2
func (x *ReadRequest) Reset()
func (*ReadRequest) String ¶ added in v0.0.2
func (x *ReadRequest) String() string
type ReadResponse ¶ added in v0.0.2
type ReadResponse struct {
Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"`
Cond *Condition `protobuf:"bytes,3,opt,name=cond,proto3" json:"cond,omitempty"`
Expires *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"`
Created *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"`
Updated *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated,omitempty"`
Public bool `protobuf:"varint,7,opt,name=public,proto3" json:"public,omitempty"`
Followers int64 `protobuf:"varint,8,opt,name=followers,proto3" json:"followers,omitempty"`
// contains filtered or unexported fields
}
func (*ReadResponse) Descriptor
deprecated
added in
v0.0.2
func (*ReadResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) GetCond ¶ added in v0.0.2
func (x *ReadResponse) GetCond() *Condition
func (*ReadResponse) GetCreated ¶ added in v1.1.0
func (x *ReadResponse) GetCreated() *timestamppb.Timestamp
func (*ReadResponse) GetDescription ¶ added in v0.0.5
func (x *ReadResponse) GetDescription() string
func (*ReadResponse) GetEnabled ¶ added in v0.0.5
func (x *ReadResponse) GetEnabled() bool
func (*ReadResponse) GetExpires ¶ added in v1.0.6
func (x *ReadResponse) GetExpires() *timestamppb.Timestamp
func (*ReadResponse) GetFollowers ¶ added in v1.1.0
func (x *ReadResponse) GetFollowers() int64
func (*ReadResponse) GetPublic ¶ added in v1.1.0
func (x *ReadResponse) GetPublic() bool
func (*ReadResponse) GetUpdated ¶ added in v1.1.0
func (x *ReadResponse) GetUpdated() *timestamppb.Timestamp
func (*ReadResponse) ProtoMessage ¶ added in v0.0.2
func (*ReadResponse) ProtoMessage()
func (*ReadResponse) ProtoReflect ¶ added in v0.0.2
func (x *ReadResponse) ProtoReflect() protoreflect.Message
func (*ReadResponse) Reset ¶ added in v0.0.2
func (x *ReadResponse) Reset()
func (*ReadResponse) String ¶ added in v0.0.2
func (x *ReadResponse) String() string
type SearchOwnRequest ¶ added in v0.0.2
type SearchOwnRequest struct {
Cursor string `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
Order Order `protobuf:"varint,3,opt,name=order,proto3,enum=awakari.interests.api.Order" json:"order,omitempty"`
Pattern string `protobuf:"bytes,4,opt,name=pattern,proto3" json:"pattern,omitempty"`
// contains filtered or unexported fields
}
func (*SearchOwnRequest) Descriptor
deprecated
added in
v0.0.2
func (*SearchOwnRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchOwnRequest.ProtoReflect.Descriptor instead.
func (*SearchOwnRequest) GetCursor ¶ added in v0.0.2
func (x *SearchOwnRequest) GetCursor() string
func (*SearchOwnRequest) GetLimit ¶ added in v0.0.2
func (x *SearchOwnRequest) GetLimit() uint32
func (*SearchOwnRequest) GetOrder ¶ added in v1.1.0
func (x *SearchOwnRequest) GetOrder() Order
func (*SearchOwnRequest) GetPattern ¶ added in v1.1.0
func (x *SearchOwnRequest) GetPattern() string
func (*SearchOwnRequest) ProtoMessage ¶ added in v0.0.2
func (*SearchOwnRequest) ProtoMessage()
func (*SearchOwnRequest) ProtoReflect ¶ added in v0.0.2
func (x *SearchOwnRequest) ProtoReflect() protoreflect.Message
func (*SearchOwnRequest) Reset ¶ added in v0.0.2
func (x *SearchOwnRequest) Reset()
func (*SearchOwnRequest) String ¶ added in v0.0.2
func (x *SearchOwnRequest) String() string
type SearchOwnResponse ¶ added in v0.0.2
type SearchOwnResponse struct {
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
// contains filtered or unexported fields
}
func (*SearchOwnResponse) Descriptor
deprecated
added in
v0.0.2
func (*SearchOwnResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchOwnResponse.ProtoReflect.Descriptor instead.
func (*SearchOwnResponse) GetIds ¶ added in v0.0.2
func (x *SearchOwnResponse) GetIds() []string
func (*SearchOwnResponse) ProtoMessage ¶ added in v0.0.2
func (*SearchOwnResponse) ProtoMessage()
func (*SearchOwnResponse) ProtoReflect ¶ added in v0.0.2
func (x *SearchOwnResponse) ProtoReflect() protoreflect.Message
func (*SearchOwnResponse) Reset ¶ added in v0.0.2
func (x *SearchOwnResponse) Reset()
func (*SearchOwnResponse) String ¶ added in v0.0.2
func (x *SearchOwnResponse) String() string
type SearchRequest ¶ added in v1.1.0
type SearchRequest struct {
Cursor *Cursor `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
Order Order `protobuf:"varint,3,opt,name=order,proto3,enum=awakari.interests.api.Order" json:"order,omitempty"`
Pattern string `protobuf:"bytes,4,opt,name=Pattern,proto3" json:"Pattern,omitempty"`
Sort Sort `protobuf:"varint,5,opt,name=sort,proto3,enum=awakari.interests.api.Sort" json:"sort,omitempty"`
// contains filtered or unexported fields
}
func (*SearchRequest) Descriptor
deprecated
added in
v1.1.0
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetCursor ¶ added in v1.1.0
func (x *SearchRequest) GetCursor() *Cursor
func (*SearchRequest) GetLimit ¶ added in v1.1.0
func (x *SearchRequest) GetLimit() uint32
func (*SearchRequest) GetOrder ¶ added in v1.1.0
func (x *SearchRequest) GetOrder() Order
func (*SearchRequest) GetPattern ¶ added in v1.1.0
func (x *SearchRequest) GetPattern() string
func (*SearchRequest) GetSort ¶ added in v1.1.0
func (x *SearchRequest) GetSort() Sort
func (*SearchRequest) ProtoMessage ¶ added in v1.1.0
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶ added in v1.1.0
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶ added in v1.1.0
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶ added in v1.1.0
func (x *SearchRequest) String() string
type SearchResponse ¶ added in v1.1.0
type SearchResponse struct {
Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
// contains filtered or unexported fields
}
func (*SearchResponse) Descriptor
deprecated
added in
v1.1.0
func (*SearchResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.
func (*SearchResponse) GetIds ¶ added in v1.1.0
func (x *SearchResponse) GetIds() []string
func (*SearchResponse) ProtoMessage ¶ added in v1.1.0
func (*SearchResponse) ProtoMessage()
func (*SearchResponse) ProtoReflect ¶ added in v1.1.0
func (x *SearchResponse) ProtoReflect() protoreflect.Message
func (*SearchResponse) Reset ¶ added in v1.1.0
func (x *SearchResponse) Reset()
func (*SearchResponse) String ¶ added in v1.1.0
func (x *SearchResponse) String() string
type Service ¶
type Service interface {
// Create a subscription with the specified fields.
Create(ctx context.Context, userId string, subData subscription.Data) (id string, err error)
// Read returns the subscription specified by the id. Returns ErrNotFound if subscription is missing.
Read(ctx context.Context, userId, subId string) (subData subscription.Data, err error)
// Update the subscription.Data
Update(ctx context.Context, userId, subId string, subData subscription.Data) (err error)
// Delete the specified subscription all associated conditions those not in use by any other subscription.
// Returns ErrNotFound if a subscription with the specified id is missing.
Delete(ctx context.Context, userId, subId string) (err error)
// Search returns all subscription ids matching the query.
Search(ctx context.Context, userId string, q subscription.Query, cursor subscription.Cursor) (ids []string, err error)
}
func NewService ¶
func NewService(client ServiceClient) Service
func NewServiceMock ¶
func NewServiceMock() Service
type ServiceClient ¶ added in v0.0.2
type ServiceClient interface {
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
SearchOwn(ctx context.Context, in *SearchOwnRequest, opts ...grpc.CallOption) (*SearchOwnResponse, error)
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
}
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewClientConnPool ¶ added in v1.2.0
func NewClientConnPool(connPool *grpcpool.Pool) ServiceClient
func NewServiceClient ¶ added in v0.0.2
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶ added in v0.0.2
type ServiceServer interface {
Create(context.Context, *CreateRequest) (*CreateResponse, error)
Read(context.Context, *ReadRequest) (*ReadResponse, error)
Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
SearchOwn(context.Context, *SearchOwnRequest) (*SearchOwnResponse, error)
Search(context.Context, *SearchRequest) (*SearchResponse, error)
}
ServiceServer is the server API for Service service.
type Sort ¶ added in v1.1.0
type Sort int32
func (Sort) Descriptor ¶ added in v1.1.0
func (Sort) Descriptor() protoreflect.EnumDescriptor
func (Sort) EnumDescriptor
deprecated
added in
v1.1.0
func (Sort) Number ¶ added in v1.1.0
func (x Sort) Number() protoreflect.EnumNumber
func (Sort) Type ¶ added in v1.1.0
func (Sort) Type() protoreflect.EnumType
type TextCondition ¶ added in v1.0.1
type TextCondition struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // leave it unset when create
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
Term string `protobuf:"bytes,3,opt,name=term,proto3" json:"term,omitempty"`
Exact bool `protobuf:"varint,4,opt,name=exact,proto3" json:"exact,omitempty"`
// contains filtered or unexported fields
}
func (*TextCondition) Descriptor
deprecated
added in
v1.0.1
func (*TextCondition) Descriptor() ([]byte, []int)
Deprecated: Use TextCondition.ProtoReflect.Descriptor instead.
func (*TextCondition) GetExact ¶ added in v1.0.1
func (x *TextCondition) GetExact() bool
func (*TextCondition) GetId ¶ added in v1.0.1
func (x *TextCondition) GetId() string
func (*TextCondition) GetKey ¶ added in v1.0.1
func (x *TextCondition) GetKey() string
func (*TextCondition) GetTerm ¶ added in v1.0.1
func (x *TextCondition) GetTerm() string
func (*TextCondition) ProtoMessage ¶ added in v1.0.1
func (*TextCondition) ProtoMessage()
func (*TextCondition) ProtoReflect ¶ added in v1.0.1
func (x *TextCondition) ProtoReflect() protoreflect.Message
func (*TextCondition) Reset ¶ added in v1.0.1
func (x *TextCondition) Reset()
func (*TextCondition) String ¶ added in v1.0.1
func (x *TextCondition) String() string
type UnimplementedServiceServer ¶ added in v0.0.2
type UnimplementedServiceServer struct {
}
UnimplementedServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceServer) Create ¶ added in v0.0.2
func (*UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (*UnimplementedServiceServer) Delete ¶ added in v0.0.2
func (*UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (*UnimplementedServiceServer) Read ¶ added in v0.0.2
func (*UnimplementedServiceServer) Read(context.Context, *ReadRequest) (*ReadResponse, error)
func (*UnimplementedServiceServer) Search ¶ added in v1.1.0
func (*UnimplementedServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error)
func (*UnimplementedServiceServer) SearchOwn ¶ added in v0.0.2
func (*UnimplementedServiceServer) SearchOwn(context.Context, *SearchOwnRequest) (*SearchOwnResponse, error)
func (*UnimplementedServiceServer) Update ¶ added in v0.0.5
func (*UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UpdateRequest ¶ added in v0.0.5
type UpdateRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"`
Expires *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=expires,proto3" json:"expires,omitempty"`
Cond *Condition `protobuf:"bytes,5,opt,name=cond,proto3" json:"cond,omitempty"`
Public bool `protobuf:"varint,6,opt,name=public,proto3" json:"public,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateRequest) Descriptor
deprecated
added in
v0.0.5
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetCond ¶ added in v1.0.8
func (x *UpdateRequest) GetCond() *Condition
func (*UpdateRequest) GetDescription ¶ added in v0.0.5
func (x *UpdateRequest) GetDescription() string
func (*UpdateRequest) GetEnabled ¶ added in v0.0.5
func (x *UpdateRequest) GetEnabled() bool
func (*UpdateRequest) GetExpires ¶ added in v1.0.6
func (x *UpdateRequest) GetExpires() *timestamppb.Timestamp
func (*UpdateRequest) GetId ¶ added in v0.0.5
func (x *UpdateRequest) GetId() string
func (*UpdateRequest) GetPublic ¶ added in v1.1.0
func (x *UpdateRequest) GetPublic() bool
func (*UpdateRequest) ProtoMessage ¶ added in v0.0.5
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶ added in v0.0.5
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶ added in v0.0.5
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶ added in v0.0.5
func (x *UpdateRequest) String() string
type UpdateResponse ¶ added in v0.0.5
type UpdateResponse struct {
// contains filtered or unexported fields
}
func (*UpdateResponse) Descriptor
deprecated
added in
v0.0.5
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) ProtoMessage ¶ added in v0.0.5
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶ added in v0.0.5
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶ added in v0.0.5
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶ added in v0.0.5
func (x *UpdateResponse) String() string