Documentation ¶
Index ¶
- func AuthInternalProtocol(i AuthInternalInterface) rpc.Protocol
- func AuthProtocol(i AuthInterface) rpc.Protocol
- func AuthUpdateProtocol(i AuthUpdateInterface) rpc.Protocol
- func CommonProtocol(i CommonInterface) rpc.Protocol
- func FormatTime(t Time) string
- func FromTime(t Time) time.Time
- func IncomingProtocol(i IncomingInterface) rpc.Protocol
- func OutgoingProtocol(i OutgoingInterface) rpc.Protocol
- func RemindProtocol(i RemindInterface) rpc.Protocol
- func UIDListContains(list []UID, x UID) bool
- func UIDPtrEq(x, y *UID) bool
- type AuthClient
- type AuthInterface
- type AuthInternalClient
- type AuthInternalInterface
- type AuthResult
- type AuthUpdateClient
- type AuthUpdateInterface
- type AuthenticateSessionTokenArg
- type Body
- type BroadcastMessageArg
- type Category
- type CommonClient
- type CommonInterface
- type ConnectedDevice
- type ConnectedUser
- type ConsumeMessageArg
- type ConsumeMessageMultiArg
- type ConsumePublishMessageArg
- type CreateGregorSuperUserSessionTokenArg
- type DeleteRemindersArg
- type DescribeConnectedUsersArg
- type DescribeConnectedUsersInternalArg
- type DeviceID
- type Dismissal
- type DurationMsec
- type DurationSec
- type GetRemindersArg
- type InBandMessage
- func (o InBandMessage) DeepCopy() InBandMessage
- func (i InBandMessage) Merge(i2 gregor.InBandMessage) (res gregor.InBandMessage, err error)
- func (i InBandMessage) Metadata() gregor.Metadata
- func (i InBandMessage) ToStateSyncMessage() gregor.StateSyncMessage
- func (i InBandMessage) ToStateUpdateMessage() gregor.StateUpdateMessage
- type IncomingClient
- func (c IncomingClient) ConsumeMessage(ctx context.Context, m Message) (err error)
- func (c IncomingClient) ConsumeMessageMulti(ctx context.Context, __arg ConsumeMessageMultiArg) (err error)
- func (c IncomingClient) ConsumePublishMessage(ctx context.Context, m Message) (err error)
- func (c IncomingClient) DescribeConnectedUsers(ctx context.Context, uids []UID) (res []ConnectedUser, err error)
- func (c IncomingClient) DescribeConnectedUsersInternal(ctx context.Context, uids []UID) (res []ConnectedUser, err error)
- func (c IncomingClient) Ping(ctx context.Context) (res string, err error)
- func (c IncomingClient) State(ctx context.Context, __arg StateArg) (res State, err error)
- func (c IncomingClient) StateByCategoryPrefix(ctx context.Context, __arg StateByCategoryPrefixArg) (res State, err error)
- func (c IncomingClient) Sync(ctx context.Context, __arg SyncArg) (res SyncResult, err error)
- func (c IncomingClient) Version(ctx context.Context, uid UID) (res string, err error)
- type IncomingInterface
- type Item
- type ItemAndMetadata
- func (i ItemAndMetadata) Body() gregor.Body
- func (i ItemAndMetadata) Category() gregor.Category
- func (i ItemAndMetadata) DTime() gregor.TimeOrOffset
- func (o ItemAndMetadata) DeepCopy() ItemAndMetadata
- func (i ItemAndMetadata) HasCategoryPrefix(c Category) bool
- func (i ItemAndMetadata) InCategory(c Category) bool
- func (i ItemAndMetadata) Metadata() gregor.Metadata
- func (i ItemAndMetadata) RemindTimes() []gregor.TimeOrOffset
- func (i ItemAndMetadata) String() string
- type Message
- type Metadata
- type MsgID
- type MsgRange
- type ObjFactory
- func (o ObjFactory) ExportTimeOrOffset(t gregor.TimeOrOffset) TimeOrOffset
- func (o ObjFactory) ExportTimeOrOffsets(ts []gregor.TimeOrOffset) (res []TimeOrOffset)
- func (o ObjFactory) MakeBody(b []byte) (gregor.Body, error)
- func (o ObjFactory) MakeCategory(s string) (gregor.Category, error)
- func (o ObjFactory) MakeDeviceID(b []byte) (gregor.DeviceID, error)
- func (o ObjFactory) MakeDismissalByIDs(uid gregor.UID, msgid gregor.MsgID, devid gregor.DeviceID, ctime time.Time, ...) (gregor.InBandMessage, error)
- func (o ObjFactory) MakeDismissalByRange(uid gregor.UID, msgid gregor.MsgID, devid gregor.DeviceID, ctime time.Time, ...) (gregor.InBandMessage, error)
- func (o ObjFactory) MakeInBandMessageFromItem(i gregor.Item) (gregor.InBandMessage, error)
- func (o ObjFactory) MakeItem(u gregor.UID, msgid gregor.MsgID, deviceid gregor.DeviceID, ctime time.Time, ...) (gregor.Item, error)
- func (o ObjFactory) MakeMessageFromInBandMessage(i gregor.InBandMessage) (gregor.Message, error)
- func (o ObjFactory) MakeMetadata(uid gregor.UID, msgid gregor.MsgID, devid gregor.DeviceID, ctime time.Time, ...) (gregor.Metadata, error)
- func (o ObjFactory) MakeMsgID(b []byte) (gregor.MsgID, error)
- func (o ObjFactory) MakeOutOfBandMessage(uid gregor.UID, system gregor.System, body gregor.Body) gregor.Message
- func (o ObjFactory) MakeReminder(i gregor.Item, seqno int, t time.Time) (gregor.Reminder, error)
- func (o ObjFactory) MakeReminderID(u gregor.UID, msgid gregor.MsgID, seqno int) (gregor.ReminderID, error)
- func (o ObjFactory) MakeReminderSetFromReminders(reminders []gregor.Reminder, moreRemindersReady bool) (gregor.ReminderSet, error)
- func (o ObjFactory) MakeState(items []gregor.Item) (gregor.State, error)
- func (o ObjFactory) MakeStateSyncMessage(uid gregor.UID, msgid gregor.MsgID, devid gregor.DeviceID, ctime time.Time) (gregor.InBandMessage, error)
- func (o ObjFactory) MakeStateWithLookupTable(items []gregor.Item, table map[string]gregor.Item) (gregor.State, error)
- func (o ObjFactory) MakeSystem(s string) (gregor.System, error)
- func (o ObjFactory) MakeTimeOrOffsetFromOffset(d time.Duration) (gregor.TimeOrOffset, error)
- func (o ObjFactory) MakeTimeOrOffsetFromTime(t time.Time) (gregor.TimeOrOffset, error)
- func (o ObjFactory) MakeUID(b []byte) (gregor.UID, error)
- func (o ObjFactory) UnmarshalMessage(b []byte) (gregor.Message, error)
- func (o ObjFactory) UnmarshalState(b []byte) (gregor.State, error)
- type OutOfBandMessage
- type OutgoingClient
- type OutgoingInterface
- type PingArg
- type RemindClient
- type RemindInterface
- type Reminder
- type ReminderID
- type ReminderSet
- type RevokeSessionIDsArg
- type SessionID
- type SessionToken
- type State
- func (o State) DeepCopy() State
- func (s State) Export() (gregor.ProtocolState, error)
- func (s State) GetItem(msgID gregor.MsgID) (gregor.Item, bool)
- func (s State) Hash() ([]byte, error)
- func (s State) Items() ([]gregor.Item, error)
- func (s State) ItemsInCategory(gc gregor.Category) ([]gregor.Item, error)
- func (s State) ItemsWithCategoryPrefix(gc gregor.Category) ([]gregor.Item, error)
- func (s State) Marshal() ([]byte, error)
- func (s State) ProtocolName() string
- func (s State) Size() int
- type StateArg
- type StateByCategoryPrefixArg
- type StateSyncMessage
- type StateUpdateMessage
- func (s StateUpdateMessage) Creation() gregor.Item
- func (o StateUpdateMessage) DeepCopy() StateUpdateMessage
- func (s StateUpdateMessage) Dismissal() gregor.Dismissal
- func (s StateUpdateMessage) Merge(s2 *StateUpdateMessage) (res StateUpdateMessage, err error)
- func (s StateUpdateMessage) Metadata() gregor.Metadata
- type SyncArg
- type SyncResult
- type System
- type Time
- type TimeOrOffset
- type UID
- type VersionArg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthInternalProtocol ¶
func AuthInternalProtocol(i AuthInternalInterface) rpc.Protocol
func AuthProtocol ¶
func AuthProtocol(i AuthInterface) rpc.Protocol
func AuthUpdateProtocol ¶
func AuthUpdateProtocol(i AuthUpdateInterface) rpc.Protocol
func CommonProtocol ¶
func CommonProtocol(i CommonInterface) rpc.Protocol
func FormatTime ¶
func IncomingProtocol ¶
func IncomingProtocol(i IncomingInterface) rpc.Protocol
func OutgoingProtocol ¶
func OutgoingProtocol(i OutgoingInterface) rpc.Protocol
func RemindProtocol ¶
func RemindProtocol(i RemindInterface) rpc.Protocol
func UIDListContains ¶ added in v1.0.19
Types ¶
type AuthClient ¶
type AuthClient struct {
Cli rpc.GenericClient
}
func (AuthClient) AuthenticateSessionToken ¶
func (c AuthClient) AuthenticateSessionToken(ctx context.Context, session SessionToken) (res AuthResult, err error)
type AuthInterface ¶
type AuthInterface interface {
AuthenticateSessionToken(context.Context, SessionToken) (AuthResult, error)
}
type AuthInternalClient ¶
type AuthInternalClient struct {
Cli rpc.GenericClient
}
func (AuthInternalClient) CreateGregorSuperUserSessionToken ¶
func (c AuthInternalClient) CreateGregorSuperUserSessionToken(ctx context.Context) (res SessionToken, err error)
type AuthInternalInterface ¶
type AuthInternalInterface interface {
CreateGregorSuperUserSessionToken(context.Context) (SessionToken, error)
}
type AuthResult ¶
type AuthResult struct { Uid UID `codec:"uid" json:"uid"` Username string `codec:"username" json:"username"` Sid SessionID `codec:"sid" json:"sid"` IsAdmin bool `codec:"isAdmin" json:"isAdmin"` }
func (AuthResult) DeepCopy ¶ added in v1.0.27
func (o AuthResult) DeepCopy() AuthResult
type AuthUpdateClient ¶
type AuthUpdateClient struct {
Cli rpc.GenericClient
}
func (AuthUpdateClient) RevokeSessionIDs ¶
func (c AuthUpdateClient) RevokeSessionIDs(ctx context.Context, sessionIDs []SessionID) (err error)
type AuthUpdateInterface ¶
type AuthenticateSessionTokenArg ¶
type AuthenticateSessionTokenArg struct {
Session SessionToken `codec:"session" json:"session"`
}
type BroadcastMessageArg ¶
type BroadcastMessageArg struct {
M Message `codec:"m" json:"m"`
}
type CommonClient ¶
type CommonClient struct {
Cli rpc.GenericClient
}
type CommonInterface ¶
type CommonInterface interface { }
type ConnectedDevice ¶ added in v1.0.27
type ConnectedDevice struct { DeviceID DeviceID `codec:"deviceID" json:"deviceID"` DeviceType string `codec:"deviceType" json:"deviceType"` DevicePlatform string `codec:"devicePlatform" json:"devicePlatform"` UserAgent string `codec:"userAgent" json:"userAgent"` }
DescribeConnectedUsers will take a list of users, and return the list of users which are connected to any Gregor in the cluster, and what devices (and device type) those users are connected with.
func (ConnectedDevice) DeepCopy ¶ added in v1.0.27
func (o ConnectedDevice) DeepCopy() ConnectedDevice
type ConnectedUser ¶ added in v1.0.27
type ConnectedUser struct { Uid UID `codec:"uid" json:"uid"` Devices []ConnectedDevice `codec:"devices" json:"devices"` }
func (ConnectedUser) DeepCopy ¶ added in v1.0.27
func (o ConnectedUser) DeepCopy() ConnectedUser
type ConsumeMessageArg ¶
type ConsumeMessageArg struct {
M Message `codec:"m" json:"m"`
}
type ConsumeMessageMultiArg ¶ added in v1.0.33
type ConsumePublishMessageArg ¶
type ConsumePublishMessageArg struct {
M Message `codec:"m" json:"m"`
}
type CreateGregorSuperUserSessionTokenArg ¶
type CreateGregorSuperUserSessionTokenArg struct { }
type DeleteRemindersArg ¶
type DeleteRemindersArg struct {
ReminderIDs []ReminderID `codec:"reminderIDs" json:"reminderIDs"`
}
type DescribeConnectedUsersArg ¶ added in v1.0.27
type DescribeConnectedUsersArg struct {
Uids []UID `codec:"uids" json:"uids"`
}
type DescribeConnectedUsersInternalArg ¶ added in v1.0.27
type DescribeConnectedUsersInternalArg struct {
Uids []UID `codec:"uids" json:"uids"`
}
type Dismissal ¶
type Dismissal struct { MsgIDs_ []MsgID `codec:"msgIDs" json:"msgIDs"` Ranges_ []MsgRange `codec:"ranges" json:"ranges"` }
func (Dismissal) MsgIDsToDismiss ¶
func (Dismissal) RangesToDismiss ¶
type DurationMsec ¶
type DurationMsec int64
func ToDurationMsec ¶
func ToDurationMsec(d time.Duration) DurationMsec
func (DurationMsec) DeepCopy ¶ added in v1.0.27
func (o DurationMsec) DeepCopy() DurationMsec
func (DurationMsec) ToDuration ¶
func (d DurationMsec) ToDuration() time.Duration
type DurationSec ¶ added in v1.0.40
type DurationSec int64
func ToDurationSec ¶
func ToDurationSec(d time.Duration) DurationSec
func (DurationSec) DeepCopy ¶ added in v1.0.40
func (o DurationSec) DeepCopy() DurationSec
func (DurationSec) ToDuration ¶
func (d DurationSec) ToDuration() time.Duration
type GetRemindersArg ¶
type GetRemindersArg struct {
MaxReminders int `codec:"maxReminders" json:"maxReminders"`
}
type InBandMessage ¶
type InBandMessage struct { StateUpdate_ *StateUpdateMessage `codec:"stateUpdate,omitempty" json:"stateUpdate,omitempty"` StateSync_ *StateSyncMessage `codec:"stateSync,omitempty" json:"stateSync,omitempty"` }
func (InBandMessage) DeepCopy ¶ added in v1.0.27
func (o InBandMessage) DeepCopy() InBandMessage
func (InBandMessage) Merge ¶
func (i InBandMessage) Merge(i2 gregor.InBandMessage) (res gregor.InBandMessage, err error)
func (InBandMessage) Metadata ¶
func (i InBandMessage) Metadata() gregor.Metadata
func (InBandMessage) ToStateSyncMessage ¶
func (i InBandMessage) ToStateSyncMessage() gregor.StateSyncMessage
func (InBandMessage) ToStateUpdateMessage ¶
func (i InBandMessage) ToStateUpdateMessage() gregor.StateUpdateMessage
type IncomingClient ¶
type IncomingClient struct {
Cli rpc.GenericClient
}
func (IncomingClient) ConsumeMessage ¶
func (c IncomingClient) ConsumeMessage(ctx context.Context, m Message) (err error)
func (IncomingClient) ConsumeMessageMulti ¶ added in v1.0.33
func (c IncomingClient) ConsumeMessageMulti(ctx context.Context, __arg ConsumeMessageMultiArg) (err error)
consumeMessageMulti will take msg and consume it for all the users listed in uids. This is so a gregor client can send the same message to many UIDs with one call, as opposed to calling consumeMessage for each UID.
func (IncomingClient) ConsumePublishMessage ¶
func (c IncomingClient) ConsumePublishMessage(ctx context.Context, m Message) (err error)
func (IncomingClient) DescribeConnectedUsers ¶ added in v1.0.27
func (c IncomingClient) DescribeConnectedUsers(ctx context.Context, uids []UID) (res []ConnectedUser, err error)
func (IncomingClient) DescribeConnectedUsersInternal ¶ added in v1.0.27
func (c IncomingClient) DescribeConnectedUsersInternal(ctx context.Context, uids []UID) (res []ConnectedUser, err error)
func (IncomingClient) Ping ¶
func (c IncomingClient) Ping(ctx context.Context) (res string, err error)
func (IncomingClient) StateByCategoryPrefix ¶
func (c IncomingClient) StateByCategoryPrefix(ctx context.Context, __arg StateByCategoryPrefixArg) (res State, err error)
StateByCategoryPrefix loads the messages of the user's state whose categories are prefixed by the given prefix
func (IncomingClient) Sync ¶
func (c IncomingClient) Sync(ctx context.Context, __arg SyncArg) (res SyncResult, err error)
type IncomingInterface ¶
type IncomingInterface interface { Sync(context.Context, SyncArg) (SyncResult, error) ConsumeMessage(context.Context, Message) error ConsumePublishMessage(context.Context, Message) error // consumeMessageMulti will take msg and consume it for all the users listed // in uids. This is so a gregor client can send the same message to many UIDs // with one call, as opposed to calling consumeMessage for each UID. ConsumeMessageMulti(context.Context, ConsumeMessageMultiArg) error Ping(context.Context) (string, error) Version(context.Context, UID) (string, error) State(context.Context, StateArg) (State, error) // StateByCategoryPrefix loads the messages of the user's state whose // categories are prefixed by the given prefix StateByCategoryPrefix(context.Context, StateByCategoryPrefixArg) (State, error) DescribeConnectedUsers(context.Context, []UID) ([]ConnectedUser, error) DescribeConnectedUsersInternal(context.Context, []UID) ([]ConnectedUser, error) }
type Item ¶
type Item struct { Category_ Category `codec:"category" json:"category"` Dtime_ TimeOrOffset `codec:"dtime" json:"dtime"` RemindTimes_ []TimeOrOffset `codec:"remindTimes" json:"remindTimes"` Body_ Body `codec:"body" json:"body"` }
type ItemAndMetadata ¶
type ItemAndMetadata struct { Md_ *Metadata `codec:"md,omitempty" json:"md,omitempty"` Item_ *Item `codec:"item,omitempty" json:"item,omitempty"` }
func (ItemAndMetadata) Body ¶
func (i ItemAndMetadata) Body() gregor.Body
func (ItemAndMetadata) Category ¶
func (i ItemAndMetadata) Category() gregor.Category
func (ItemAndMetadata) DTime ¶
func (i ItemAndMetadata) DTime() gregor.TimeOrOffset
func (ItemAndMetadata) DeepCopy ¶ added in v1.0.27
func (o ItemAndMetadata) DeepCopy() ItemAndMetadata
func (ItemAndMetadata) HasCategoryPrefix ¶
func (i ItemAndMetadata) HasCategoryPrefix(c Category) bool
func (ItemAndMetadata) InCategory ¶
func (i ItemAndMetadata) InCategory(c Category) bool
func (ItemAndMetadata) Metadata ¶
func (i ItemAndMetadata) Metadata() gregor.Metadata
func (ItemAndMetadata) RemindTimes ¶
func (i ItemAndMetadata) RemindTimes() []gregor.TimeOrOffset
func (ItemAndMetadata) String ¶
func (i ItemAndMetadata) String() string
type Message ¶
type Message struct { Oobm_ *OutOfBandMessage `codec:"oobm,omitempty" json:"oobm,omitempty"` Ibm_ *InBandMessage `codec:"ibm,omitempty" json:"ibm,omitempty"` }
func (Message) ToInBandMessage ¶
func (m Message) ToInBandMessage() gregor.InBandMessage
func (Message) ToOutOfBandMessage ¶
func (m Message) ToOutOfBandMessage() gregor.OutOfBandMessage
type Metadata ¶
type Metadata struct { Uid_ UID `codec:"uid" json:"uid"` MsgID_ MsgID `codec:"msgID" json:"msgID"` Ctime_ Time `codec:"ctime" json:"ctime"` DeviceID_ DeviceID `codec:"deviceID" json:"deviceID"` InBandMsgType_ int `codec:"inBandMsgType" json:"inBandMsgType"` }
func (Metadata) InBandMsgType ¶
func (m Metadata) InBandMsgType() gregor.InBandMsgType
type MsgRange ¶
type MsgRange struct { EndTime_ TimeOrOffset `codec:"endTime" json:"endTime"` Category_ Category `codec:"category" json:"category"` SkipMsgIDs_ []MsgID `codec:"skipMsgIDs" json:"skipMsgIDs"` }
func (MsgRange) EndTime ¶
func (m MsgRange) EndTime() gregor.TimeOrOffset
func (MsgRange) SkipMsgIDs ¶
type ObjFactory ¶
type ObjFactory struct{}
func (ObjFactory) ExportTimeOrOffset ¶
func (o ObjFactory) ExportTimeOrOffset(t gregor.TimeOrOffset) TimeOrOffset
func (ObjFactory) ExportTimeOrOffsets ¶
func (o ObjFactory) ExportTimeOrOffsets(ts []gregor.TimeOrOffset) (res []TimeOrOffset)
func (ObjFactory) MakeCategory ¶
func (o ObjFactory) MakeCategory(s string) (gregor.Category, error)
func (ObjFactory) MakeDeviceID ¶
func (o ObjFactory) MakeDeviceID(b []byte) (gregor.DeviceID, error)
func (ObjFactory) MakeDismissalByIDs ¶
func (ObjFactory) MakeDismissalByRange ¶
func (ObjFactory) MakeInBandMessageFromItem ¶
func (o ObjFactory) MakeInBandMessageFromItem(i gregor.Item) (gregor.InBandMessage, error)
func (ObjFactory) MakeMessageFromInBandMessage ¶
func (o ObjFactory) MakeMessageFromInBandMessage(i gregor.InBandMessage) (gregor.Message, error)
func (ObjFactory) MakeMetadata ¶
func (ObjFactory) MakeOutOfBandMessage ¶
func (ObjFactory) MakeReminder ¶
func (ObjFactory) MakeReminderID ¶
func (o ObjFactory) MakeReminderID(u gregor.UID, msgid gregor.MsgID, seqno int) (gregor.ReminderID, error)
func (ObjFactory) MakeReminderSetFromReminders ¶
func (o ObjFactory) MakeReminderSetFromReminders(reminders []gregor.Reminder, moreRemindersReady bool) (gregor.ReminderSet, error)
func (ObjFactory) MakeStateSyncMessage ¶
func (ObjFactory) MakeStateWithLookupTable ¶
func (ObjFactory) MakeSystem ¶
func (o ObjFactory) MakeSystem(s string) (gregor.System, error)
func (ObjFactory) MakeTimeOrOffsetFromOffset ¶
func (o ObjFactory) MakeTimeOrOffsetFromOffset(d time.Duration) (gregor.TimeOrOffset, error)
func (ObjFactory) MakeTimeOrOffsetFromTime ¶
func (o ObjFactory) MakeTimeOrOffsetFromTime(t time.Time) (gregor.TimeOrOffset, error)
func (ObjFactory) UnmarshalMessage ¶
func (o ObjFactory) UnmarshalMessage(b []byte) (gregor.Message, error)
func (ObjFactory) UnmarshalState ¶
func (o ObjFactory) UnmarshalState(b []byte) (gregor.State, error)
type OutOfBandMessage ¶
type OutOfBandMessage struct { Uid_ UID `codec:"uid" json:"uid"` System_ System `codec:"system" json:"system"` Body_ Body `codec:"body" json:"body"` }
func (OutOfBandMessage) Body ¶
func (o OutOfBandMessage) Body() gregor.Body
func (OutOfBandMessage) DeepCopy ¶ added in v1.0.27
func (o OutOfBandMessage) DeepCopy() OutOfBandMessage
func (OutOfBandMessage) System ¶
func (o OutOfBandMessage) System() gregor.System
func (OutOfBandMessage) UID ¶
func (o OutOfBandMessage) UID() gregor.UID
type OutgoingClient ¶
type OutgoingClient struct {
Cli rpc.GenericClient
}
func (OutgoingClient) BroadcastMessage ¶
func (c OutgoingClient) BroadcastMessage(ctx context.Context, m Message) (err error)
type OutgoingInterface ¶
type RemindClient ¶
type RemindClient struct {
Cli rpc.GenericClient
}
func (RemindClient) DeleteReminders ¶
func (c RemindClient) DeleteReminders(ctx context.Context, reminderIDs []ReminderID) (err error)
deleteReminders deletes all of the reminders by ReminderID
func (RemindClient) GetReminders ¶
func (c RemindClient) GetReminders(ctx context.Context, maxReminders int) (res ReminderSet, err error)
getReminders gets the reminders waiting to be sent out as a batch. Get at most maxReminders back.
type RemindInterface ¶
type RemindInterface interface { // getReminders gets the reminders waiting to be sent out as a batch. Get at most // maxReminders back. GetReminders(context.Context, int) (ReminderSet, error) // deleteReminders deletes all of the reminders by ReminderID DeleteReminders(context.Context, []ReminderID) error }
type Reminder ¶
type Reminder struct { Item_ ItemAndMetadata `codec:"item" json:"item"` Seqno_ int `codec:"seqno" json:"seqno"` RemindTime_ Time `codec:"remindTime" json:"remindTime"` }
func (Reminder) RemindTime ¶
type ReminderID ¶
type ReminderID struct { Uid_ UID `codec:"uid" json:"uid"` MsgID_ MsgID `codec:"msgID" json:"msgID"` Seqno_ int `codec:"seqno" json:"seqno"` }
func (ReminderID) DeepCopy ¶ added in v1.0.27
func (o ReminderID) DeepCopy() ReminderID
func (ReminderID) MsgID ¶
func (r ReminderID) MsgID() gregor.MsgID
func (ReminderID) Seqno ¶
func (r ReminderID) Seqno() int
func (ReminderID) UID ¶
func (r ReminderID) UID() gregor.UID
type ReminderSet ¶
type ReminderSet struct { Reminders_ []Reminder `codec:"reminders" json:"reminders"` MoreRemindersReady_ bool `codec:"moreRemindersReady" json:"moreRemindersReady"` }
func (ReminderSet) DeepCopy ¶ added in v1.0.27
func (o ReminderSet) DeepCopy() ReminderSet
func (ReminderSet) MoreRemindersReady ¶
func (r ReminderSet) MoreRemindersReady() bool
func (ReminderSet) Reminders ¶
func (r ReminderSet) Reminders() []gregor.Reminder
type RevokeSessionIDsArg ¶
type RevokeSessionIDsArg struct {
SessionIDs []SessionID `codec:"sessionIDs" json:"sessionIDs"`
}
type SessionToken ¶
type SessionToken string
func (SessionToken) DeepCopy ¶ added in v1.0.27
func (o SessionToken) DeepCopy() SessionToken
type State ¶
type State struct {
Items_ []ItemAndMetadata `codec:"items" json:"items"`
}
func (State) ItemsInCategory ¶
func (State) ItemsWithCategoryPrefix ¶
func (State) ProtocolName ¶
type StateArg ¶
type StateArg struct { Uid UID `codec:"uid" json:"uid"` Deviceid DeviceID `codec:"deviceid" json:"deviceid"` TimeOrOffset TimeOrOffset `codec:"timeOrOffset" json:"timeOrOffset"` }
type StateByCategoryPrefixArg ¶
type StateByCategoryPrefixArg struct { Uid UID `codec:"uid" json:"uid"` Deviceid DeviceID `codec:"deviceid" json:"deviceid"` TimeOrOffset TimeOrOffset `codec:"timeOrOffset" json:"timeOrOffset"` CategoryPrefix Category `codec:"categoryPrefix" json:"categoryPrefix"` }
type StateSyncMessage ¶
type StateSyncMessage struct {
Md_ Metadata `codec:"md" json:"md"`
}
func (StateSyncMessage) DeepCopy ¶ added in v1.0.27
func (o StateSyncMessage) DeepCopy() StateSyncMessage
func (StateSyncMessage) Metadata ¶
func (s StateSyncMessage) Metadata() gregor.Metadata
type StateUpdateMessage ¶
type StateUpdateMessage struct { Md_ Metadata `codec:"md" json:"md"` Creation_ *Item `codec:"creation,omitempty" json:"creation,omitempty"` Dismissal_ *Dismissal `codec:"dismissal,omitempty" json:"dismissal,omitempty"` }
func (StateUpdateMessage) Creation ¶
func (s StateUpdateMessage) Creation() gregor.Item
func (StateUpdateMessage) DeepCopy ¶ added in v1.0.27
func (o StateUpdateMessage) DeepCopy() StateUpdateMessage
func (StateUpdateMessage) Dismissal ¶
func (s StateUpdateMessage) Dismissal() gregor.Dismissal
func (StateUpdateMessage) Merge ¶
func (s StateUpdateMessage) Merge(s2 *StateUpdateMessage) (res StateUpdateMessage, err error)
func (StateUpdateMessage) Metadata ¶
func (s StateUpdateMessage) Metadata() gregor.Metadata
type SyncArg ¶
type SyncArg struct { Uid UID `codec:"uid" json:"uid"` Deviceid DeviceID `codec:"deviceid" json:"deviceid"` Ctime Time `codec:"ctime" json:"ctime"` }
type SyncResult ¶
type SyncResult struct { Msgs []InBandMessage `codec:"msgs" json:"msgs"` Hash []byte `codec:"hash" json:"hash"` }
func (SyncResult) DeepCopy ¶ added in v1.0.27
func (o SyncResult) DeepCopy() SyncResult
type Time ¶
type Time int64
func TimeFromMilliseconds ¶ added in v1.0.41
func TimeFromSeconds ¶
func ToTime ¶
copied from keybase/client/go/protocol/extras.go. Consider eventually a refactor to allow this code to be shared.
func (Time) UnixMicroseconds ¶
func (Time) UnixMilliseconds ¶
func (Time) UnixSeconds ¶
type TimeOrOffset ¶
type TimeOrOffset struct { Time_ Time `codec:"time" json:"time"` Offset_ DurationMsec `codec:"offset" json:"offset"` }
func (TimeOrOffset) DeepCopy ¶ added in v1.0.27
func (o TimeOrOffset) DeepCopy() TimeOrOffset
func (TimeOrOffset) IsZero ¶
func (t TimeOrOffset) IsZero() bool
func (TimeOrOffset) Offset ¶
func (t TimeOrOffset) Offset() *time.Duration
func (TimeOrOffset) Time ¶
func (t TimeOrOffset) Time() *time.Time
type UID ¶
type UID []byte
func UIDListMerge ¶ added in v1.0.19
Merge two lists of UIDs. Duplicates will be dropped. Not stably ordered.
type VersionArg ¶
type VersionArg struct {
Uid UID `codec:"uid" json:"uid"`
}