Versions in this module Expand all Collapse all v1 v1.0.18 Oct 26, 2016 Changes in this version + 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 + type AuthClient struct + Cli rpc.GenericClient + func (c AuthClient) AuthenticateSessionToken(ctx context.Context, session SessionToken) (res AuthResult, err error) + type AuthInterface interface + AuthenticateSessionToken func(context.Context, SessionToken) (AuthResult, error) + type AuthInternalClient struct + Cli rpc.GenericClient + func (c AuthInternalClient) CreateGregorSuperUserSessionToken(ctx context.Context) (res SessionToken, err error) + type AuthInternalInterface interface + CreateGregorSuperUserSessionToken func(context.Context) (SessionToken, error) + type AuthResult struct + IsAdmin bool + Sid SessionID + Uid UID + type AuthUpdateClient struct + Cli rpc.GenericClient + func (c AuthUpdateClient) RevokeSessionIDs(ctx context.Context, sessionIDs []SessionID) (err error) + type AuthUpdateInterface interface + RevokeSessionIDs func(context.Context, []SessionID) error + type AuthenticateSessionTokenArg struct + Session SessionToken + type Body []byte + func (b Body) Bytes() []byte + type BroadcastMessageArg struct + M Message + type Category string + func (c Category) Eq(c2 Category) bool + func (c Category) HasPrefix(c2 Category) bool + func (c Category) String() string + type CommonClient struct + Cli rpc.GenericClient + type CommonInterface interface + type ConsumeMessageArg struct + M Message + type ConsumePublishMessageArg struct + M Message + type CreateGregorSuperUserSessionTokenArg struct + type DeleteRemindersArg struct + ReminderIDs []ReminderID + type DeviceID []byte + func (d DeviceID) Bytes() []byte + func (d DeviceID) String() string + type Dismissal struct + MsgIDs_ []MsgID + Ranges_ []MsgRange + func (d Dismissal) MsgIDsToDismiss() []gregor.MsgID + func (d Dismissal) RangesToDismiss() []gregor.MsgRange + type DurationMsec int64 + type GetRemindersArg struct + MaxReminders int + type InBandMessage struct + StateSync_ *StateSyncMessage + StateUpdate_ *StateUpdateMessage + func (i InBandMessage) Merge(i2 gregor.InBandMessage) error + func (i InBandMessage) Metadata() gregor.Metadata + func (i InBandMessage) ToStateSyncMessage() gregor.StateSyncMessage + func (i InBandMessage) ToStateUpdateMessage() gregor.StateUpdateMessage + type IncomingClient struct + Cli rpc.GenericClient + func (c IncomingClient) ConsumeMessage(ctx context.Context, m Message) (err error) + func (c IncomingClient) ConsumePublishMessage(ctx context.Context, m Message) (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 interface + ConsumeMessage func(context.Context, Message) error + ConsumePublishMessage func(context.Context, Message) error + Ping func(context.Context) (string, error) + State func(context.Context, StateArg) (State, error) + StateByCategoryPrefix func(context.Context, StateByCategoryPrefixArg) (State, error) + Sync func(context.Context, SyncArg) (SyncResult, error) + Version func(context.Context, UID) (string, error) + type Item struct + Body_ Body + Category_ Category + Dtime_ TimeOrOffset + RemindTimes_ []TimeOrOffset + type ItemAndMetadata struct + Item_ *Item + Md_ *Metadata + func (i ItemAndMetadata) Body() gregor.Body + func (i ItemAndMetadata) Category() gregor.Category + func (i ItemAndMetadata) DTime() gregor.TimeOrOffset + 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 struct + Ibm_ *InBandMessage + Oobm_ *OutOfBandMessage + func (m *Message) SetCTime(ctime time.Time) + func (m Message) ToInBandMessage() gregor.InBandMessage + func (m Message) ToOutOfBandMessage() gregor.OutOfBandMessage + type Metadata struct + Ctime_ Time + DeviceID_ DeviceID + InBandMsgType_ int + MsgID_ MsgID + Uid_ UID + func (m Metadata) CTime() time.Time + func (m Metadata) DeviceID() gregor.DeviceID + func (m Metadata) InBandMsgType() gregor.InBandMsgType + func (m Metadata) MsgID() gregor.MsgID + func (m Metadata) String() string + func (m Metadata) UID() gregor.UID + type MsgID []byte + func (m MsgID) Bytes() []byte + func (m MsgID) String() string + type MsgRange struct + Category_ Category + EndTime_ TimeOrOffset + func (m MsgRange) Category() gregor.Category + func (m MsgRange) EndTime() gregor.TimeOrOffset + type ObjFactory struct + 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) UnmarshalState(b []byte) (gregor.State, error) + type OutOfBandMessage struct + Body_ Body + System_ System + Uid_ UID + func (o OutOfBandMessage) Body() gregor.Body + func (o OutOfBandMessage) System() gregor.System + func (o OutOfBandMessage) UID() gregor.UID + type OutgoingClient struct + Cli rpc.GenericClient + func (c OutgoingClient) BroadcastMessage(ctx context.Context, m Message) (err error) + type OutgoingInterface interface + BroadcastMessage func(context.Context, Message) error + type PingArg struct + type RemindClient struct + Cli rpc.GenericClient + func (c RemindClient) DeleteReminders(ctx context.Context, reminderIDs []ReminderID) (err error) + func (c RemindClient) GetReminders(ctx context.Context, maxReminders int) (res ReminderSet, err error) + type RemindInterface interface + DeleteReminders func(context.Context, []ReminderID) error + GetReminders func(context.Context, int) (ReminderSet, error) + type Reminder struct + Item_ ItemAndMetadata + RemindTime_ Time + Seqno_ int + func (r Reminder) Item() gregor.Item + func (r Reminder) RemindTime() time.Time + func (r Reminder) Seqno() int + type ReminderID struct + MsgID_ MsgID + Seqno_ int + Uid_ UID + func (r ReminderID) MsgID() gregor.MsgID + func (r ReminderID) Seqno() int + func (r ReminderID) UID() gregor.UID + type ReminderSet struct + MoreRemindersReady_ bool + Reminders_ []Reminder + func (r ReminderSet) MoreRemindersReady() bool + func (r ReminderSet) Reminders() []gregor.Reminder + type RevokeSessionIDsArg struct + SessionIDs []SessionID + type SessionID string + type SessionToken string + type State struct + Items_ []ItemAndMetadata + 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 + type StateArg struct + Deviceid DeviceID + TimeOrOffset TimeOrOffset + Uid UID + type StateByCategoryPrefixArg struct + CategoryPrefix Category + Deviceid DeviceID + TimeOrOffset TimeOrOffset + Uid UID + type StateSyncMessage struct + Md_ Metadata + func (s StateSyncMessage) Metadata() gregor.Metadata + type StateUpdateMessage struct + Creation_ *Item + Dismissal_ *Dismissal + Md_ Metadata + func (s StateUpdateMessage) Creation() gregor.Item + func (s StateUpdateMessage) Dismissal() gregor.Dismissal + func (s StateUpdateMessage) Merge(s2 *StateUpdateMessage) error + func (s StateUpdateMessage) Metadata() gregor.Metadata + type SyncArg struct + Ctime Time + Deviceid DeviceID + Uid UID + func (s SyncArg) CTime() time.Time + func (s SyncArg) DeviceID() gregor.DeviceID + func (s SyncArg) UID() gregor.UID + type SyncResult struct + Hash []byte + Msgs []InBandMessage + type System string + func (s System) String() string + type Time int64 + func TimeFromSeconds(seconds int64) Time + func ToTime(t time.Time) Time + func (t Time) After(t2 Time) bool + func (t Time) Before(t2 Time) bool + func (t Time) IsZero() bool + func (t Time) Time() time.Time + func (t Time) UnixMicroseconds() int64 + func (t Time) UnixMilliseconds() int64 + func (t Time) UnixSeconds() int64 + type TimeOrOffset struct + Offset_ DurationMsec + Time_ Time + func (t TimeOrOffset) Before(t2 time.Time) bool + func (t TimeOrOffset) IsZero() bool + func (t TimeOrOffset) Offset() *time.Duration + func (t TimeOrOffset) Time() *time.Time + type UID []byte + func (u UID) Bytes() []byte + func (u UID) String() string + type VersionArg struct + Uid UID