Documentation
¶
Index ¶
- Variables
- type AccessOptions
- func (*AccessOptions) Descriptor() ([]byte, []int)deprecated
- func (x *AccessOptions) GetAllow() []*AccessRule
- func (x *AccessOptions) GetGuard() []*FieldGuard
- func (x *AccessOptions) GetParents() []string
- func (*AccessOptions) ProtoMessage()
- func (x *AccessOptions) ProtoReflect() protoreflect.Message
- func (x *AccessOptions) Reset()
- func (x *AccessOptions) String() string
- type AccessRule
- func (*AccessRule) Descriptor() ([]byte, []int)deprecated
- func (x *AccessRule) GetAdmitted() *AdmittedCaller
- func (x *AccessRule) GetCallerIs() string
- func (x *AccessRule) GetCreate() bool
- func (x *AccessRule) GetDelete() bool
- func (x *AccessRule) GetFields() []string
- func (x *AccessRule) GetRead() bool
- func (x *AccessRule) GetRequires() []string
- func (x *AccessRule) GetUpdate() bool
- func (x *AccessRule) GetWhen() *Condition
- func (x *AccessRule) GetWithin() []*AccessWithin
- func (x *AccessRule) GetWrite() bool
- func (*AccessRule) ProtoMessage()
- func (x *AccessRule) ProtoReflect() protoreflect.Message
- func (x *AccessRule) Reset()
- func (x *AccessRule) String() string
- type AccessWithin
- func (*AccessWithin) Descriptor() ([]byte, []int)deprecated
- func (x *AccessWithin) GetCallerIs() string
- func (x *AccessWithin) GetEntity() string
- func (x *AccessWithin) GetWhen() *Condition
- func (*AccessWithin) ProtoMessage()
- func (x *AccessWithin) ProtoReflect() protoreflect.Message
- func (x *AccessWithin) Reset()
- func (x *AccessWithin) String() string
- type AdmittedCaller
- type AggregateOp
- func (AggregateOp) Descriptor() protoreflect.EnumDescriptor
- func (x AggregateOp) Enum() *AggregateOp
- func (AggregateOp) EnumDescriptor() ([]byte, []int)deprecated
- func (x AggregateOp) Number() protoreflect.EnumNumber
- func (x AggregateOp) String() string
- func (AggregateOp) Type() protoreflect.EnumType
- type AnchorGroup
- func (*AnchorGroup) Descriptor() ([]byte, []int)deprecated
- func (x *AnchorGroup) GetAnchors() []*AnchorRows
- func (x *AnchorGroup) GetPermissions() []string
- func (*AnchorGroup) ProtoMessage()
- func (x *AnchorGroup) ProtoReflect() protoreflect.Message
- func (x *AnchorGroup) Reset()
- func (x *AnchorGroup) String() string
- type AnchorRows
- type BatchMutation
- type BeginUploadRequest
- func (*BeginUploadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BeginUploadRequest) GetChunkHashes() [][]byte
- func (x *BeginUploadRequest) GetDigest() string
- func (x *BeginUploadRequest) GetSize() int64
- func (x *BeginUploadRequest) GetWorkspaceId() string
- func (*BeginUploadRequest) ProtoMessage()
- func (x *BeginUploadRequest) ProtoReflect() protoreflect.Message
- func (x *BeginUploadRequest) Reset()
- func (x *BeginUploadRequest) String() string
- type BeginUploadResponse
- func (*BeginUploadResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BeginUploadResponse) GetMissingChunks() []uint32
- func (x *BeginUploadResponse) GetState() BlobState
- func (*BeginUploadResponse) ProtoMessage()
- func (x *BeginUploadResponse) ProtoReflect() protoreflect.Message
- func (x *BeginUploadResponse) Reset()
- func (x *BeginUploadResponse) String() string
- type BlobRef
- func (*BlobRef) Descriptor() ([]byte, []int)deprecated
- func (x *BlobRef) GetDigest() string
- func (x *BlobRef) GetMediaType() string
- func (x *BlobRef) GetSize() int64
- func (*BlobRef) ProtoMessage()
- func (x *BlobRef) ProtoReflect() protoreflect.Message
- func (x *BlobRef) Reset()
- func (x *BlobRef) String() string
- type BlobState
- type BlobStatus
- func (*BlobStatus) Descriptor() ([]byte, []int)deprecated
- func (x *BlobStatus) GetChunkHashes() [][]byte
- func (x *BlobStatus) GetDigest() string
- func (x *BlobStatus) GetSize() int64
- func (x *BlobStatus) GetState() BlobState
- func (*BlobStatus) ProtoMessage()
- func (x *BlobStatus) ProtoReflect() protoreflect.Message
- func (x *BlobStatus) Reset()
- func (x *BlobStatus) String() string
- type BootstrapRequest
- func (*BootstrapRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapRequest) GetClientId() string
- func (x *BootstrapRequest) GetPriorityEntities() []string
- func (x *BootstrapRequest) GetResume() *BootstrapResume
- func (x *BootstrapRequest) GetSubscriptions() []*Subscription
- func (x *BootstrapRequest) GetWorkspaceId() string
- func (*BootstrapRequest) ProtoMessage()
- func (x *BootstrapRequest) ProtoReflect() protoreflect.Message
- func (x *BootstrapRequest) Reset()
- func (x *BootstrapRequest) String() string
- type BootstrapResponse
- func (*BootstrapResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapResponse) GetBegin() *BootstrapResponse_Begin
- func (x *BootstrapResponse) GetBody() isBootstrapResponse_Body
- func (x *BootstrapResponse) GetChunk() *BootstrapResponse_Chunk
- func (x *BootstrapResponse) GetEnd() *BootstrapResponse_End
- func (*BootstrapResponse) ProtoMessage()
- func (x *BootstrapResponse) ProtoReflect() protoreflect.Message
- func (x *BootstrapResponse) Reset()
- func (x *BootstrapResponse) String() string
- type BootstrapResponse_Begin
- func (*BootstrapResponse_Begin) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapResponse_Begin) GetCallerAccess() *CallerAccess
- func (x *BootstrapResponse_Begin) GetCursor() []byte
- func (x *BootstrapResponse_Begin) GetEntities() []string
- func (x *BootstrapResponse_Begin) GetLastAckedMutationId() uint64
- func (x *BootstrapResponse_Begin) GetResumed() bool
- func (x *BootstrapResponse_Begin) GetRowEstimates() []uint64
- func (x *BootstrapResponse_Begin) GetSchemaRevision() string
- func (x *BootstrapResponse_Begin) GetSeq() uint64
- func (*BootstrapResponse_Begin) ProtoMessage()
- func (x *BootstrapResponse_Begin) ProtoReflect() protoreflect.Message
- func (x *BootstrapResponse_Begin) Reset()
- func (x *BootstrapResponse_Begin) String() string
- type BootstrapResponse_Begin_
- type BootstrapResponse_Chunk
- func (*BootstrapResponse_Chunk) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapResponse_Chunk) GetResumeToken() []byte
- func (x *BootstrapResponse_Chunk) GetRows() []*RowChange
- func (*BootstrapResponse_Chunk) ProtoMessage()
- func (x *BootstrapResponse_Chunk) ProtoReflect() protoreflect.Message
- func (x *BootstrapResponse_Chunk) Reset()
- func (x *BootstrapResponse_Chunk) String() string
- type BootstrapResponse_Chunk_
- type BootstrapResponse_End
- type BootstrapResponse_End_
- type BootstrapResume
- func (*BootstrapResume) Descriptor() ([]byte, []int)deprecated
- func (x *BootstrapResume) GetCursor() []byte
- func (x *BootstrapResume) GetToken() []byte
- func (*BootstrapResume) ProtoMessage()
- func (x *BootstrapResume) ProtoReflect() protoreflect.Message
- func (x *BootstrapResume) Reset()
- func (x *BootstrapResume) String() string
- type CallerAccess
- func (*CallerAccess) Descriptor() ([]byte, []int)deprecated
- func (x *CallerAccess) GetAnchorGroups() []*AnchorGroup
- func (x *CallerAccess) GetMaxAccessDepth() uint32
- func (x *CallerAccess) GetRootPermissions() []string
- func (x *CallerAccess) GetSeq() uint64
- func (x *CallerAccess) GetSubjects() []string
- func (x *CallerAccess) GetVersion() uint64
- func (*CallerAccess) ProtoMessage()
- func (x *CallerAccess) ProtoReflect() protoreflect.Message
- func (x *CallerAccess) Reset()
- func (x *CallerAccess) String() string
- type CallerAccessDelta
- func (*CallerAccessDelta) Descriptor() ([]byte, []int)deprecated
- func (x *CallerAccessDelta) GetAnchorGroups() []*AnchorGroup
- func (x *CallerAccessDelta) GetBaseVersion() uint64
- func (x *CallerAccessDelta) GetRemoved() []*AnchorRows
- func (x *CallerAccessDelta) GetSeq() uint64
- func (x *CallerAccessDelta) GetVersion() uint64
- func (*CallerAccessDelta) ProtoMessage()
- func (x *CallerAccessDelta) ProtoReflect() protoreflect.Message
- func (x *CallerAccessDelta) Reset()
- func (x *CallerAccessDelta) String() string
- type CmpCond
- func (*CmpCond) Descriptor() ([]byte, []int)deprecated
- func (x *CmpCond) GetOp() CmpOp
- func (x *CmpCond) GetPath() []string
- func (x *CmpCond) GetValue() *QueryValue
- func (*CmpCond) ProtoMessage()
- func (x *CmpCond) ProtoReflect() protoreflect.Message
- func (x *CmpCond) Reset()
- func (x *CmpCond) String() string
- type CmpOp
- type Condition
- func (*Condition) Descriptor() ([]byte, []int)deprecated
- func (x *Condition) GetAnd() *ConditionList
- func (x *Condition) GetCmp() *CmpCond
- func (x *Condition) GetExists() *ExistsCond
- func (x *Condition) GetIn() *InCond
- func (x *Condition) GetKind() isCondition_Kind
- func (x *Condition) GetMatch() *MatchCond
- func (x *Condition) GetNot() *Condition
- func (x *Condition) GetOr() *ConditionList
- func (x *Condition) GetPresent() *PresentCond
- func (x *Condition) GetRel() *RelCond
- func (x *Condition) GetRep() *RepCond
- func (x *Condition) GetStr() *StrCond
- func (*Condition) ProtoMessage()
- func (x *Condition) ProtoReflect() protoreflect.Message
- func (x *Condition) Reset()
- func (x *Condition) String() string
- type ConditionList
- type Condition_And
- type Condition_Cmp
- type Condition_Exists
- type Condition_In
- type Condition_Match
- type Condition_Not
- type Condition_Or
- type Condition_Present
- type Condition_Rel
- type Condition_Rep
- type Condition_Str
- type CreatorOptions
- type CrudMutation
- func (*CrudMutation) Descriptor() ([]byte, []int)deprecated
- func (x *CrudMutation) GetEntity() string
- func (x *CrudMutation) GetExpectedVersion() uint64
- func (x *CrudMutation) GetFieldMask() *fieldmaskpb.FieldMask
- func (x *CrudMutation) GetKey() string
- func (x *CrudMutation) GetOp() CrudOp
- func (x *CrudMutation) GetValue() []byte
- func (*CrudMutation) ProtoMessage()
- func (x *CrudMutation) ProtoReflect() protoreflect.Message
- func (x *CrudMutation) Reset()
- func (x *CrudMutation) String() string
- type CrudOp
- type CustomMutation
- func (*CustomMutation) Descriptor() ([]byte, []int)deprecated
- func (x *CustomMutation) GetArgs() *anypb.Any
- func (x *CustomMutation) GetName() string
- func (*CustomMutation) ProtoMessage()
- func (x *CustomMutation) ProtoReflect() protoreflect.Message
- func (x *CustomMutation) Reset()
- func (x *CustomMutation) String() string
- type Direction
- type EntityOptions
- func (*EntityOptions) Descriptor() ([]byte, []int)deprecated
- func (x *EntityOptions) GetAccess() *AccessOptions
- func (x *EntityOptions) GetGrant() *GrantOptions
- func (x *EntityOptions) GetHistory() *HistoryOptions
- func (x *EntityOptions) GetIndex() []*IndexSpec
- func (x *EntityOptions) GetKeyFields() []string
- func (x *EntityOptions) GetMembers() *MembersOptions
- func (x *EntityOptions) GetName() string
- func (x *EntityOptions) GetSearch() *SearchSpec
- func (x *EntityOptions) GetServerOnly() bool
- func (*EntityOptions) ProtoMessage()
- func (x *EntityOptions) ProtoReflect() protoreflect.Message
- func (x *EntityOptions) Reset()
- func (x *EntityOptions) String() string
- type ExistsCond
- type FieldBehavior
- func (*FieldBehavior) Descriptor() ([]byte, []int)deprecated
- func (x *FieldBehavior) GetCreator() *CreatorOptions
- func (x *FieldBehavior) GetHistory() bool
- func (x *FieldBehavior) GetIndexed() bool
- func (x *FieldBehavior) GetKeyField() []string
- func (x *FieldBehavior) GetOpaque() bool
- func (x *FieldBehavior) GetOrderField() string
- func (x *FieldBehavior) GetReverseRelation() string
- func (x *FieldBehavior) GetSearchable() bool
- func (x *FieldBehavior) GetSparseIndex() bool
- func (x *FieldBehavior) GetText() bool
- func (x *FieldBehavior) GetWorkspace() bool
- func (*FieldBehavior) ProtoMessage()
- func (x *FieldBehavior) ProtoReflect() protoreflect.Message
- func (x *FieldBehavior) Reset()
- func (x *FieldBehavior) String() string
- type FieldDelta
- type FieldGuard
- func (*FieldGuard) Descriptor() ([]byte, []int)deprecated
- func (x *FieldGuard) GetAllow() []*AccessRule
- func (x *FieldGuard) GetFields() []string
- func (*FieldGuard) ProtoMessage()
- func (x *FieldGuard) ProtoReflect() protoreflect.Message
- func (x *FieldGuard) Reset()
- func (x *FieldGuard) String() string
- type FieldHistory
- func (*FieldHistory) Descriptor() ([]byte, []int)deprecated
- func (x *FieldHistory) GetActorSubject() string
- func (x *FieldHistory) GetActorSystem() string
- func (x *FieldHistory) GetMask() *fieldmaskpb.FieldMask
- func (x *FieldHistory) GetPrior() []byte
- func (x *FieldHistory) GetRecordedAt() *timestamppb.Timestamp
- func (x *FieldHistory) GetRowCreated() bool
- func (x *FieldHistory) GetSeq() uint64
- func (x *FieldHistory) GetSourceEntity() string
- func (x *FieldHistory) GetSourceKey() string
- func (x *FieldHistory) GetThroughSeq() uint64
- func (x *FieldHistory) GetWriteGroups() []*FieldHistoryWriteGroup
- func (x *FieldHistory) GetWrites() uint32
- func (*FieldHistory) ProtoMessage()
- func (x *FieldHistory) ProtoReflect() protoreflect.Message
- func (x *FieldHistory) Reset()
- func (x *FieldHistory) String() string
- type FieldHistoryWriteGroup
- func (*FieldHistoryWriteGroup) Descriptor() ([]byte, []int)deprecated
- func (x *FieldHistoryWriteGroup) GetFields() []string
- func (x *FieldHistoryWriteGroup) GetFirstSeq() uint64
- func (x *FieldHistoryWriteGroup) GetLastSeq() uint64
- func (x *FieldHistoryWriteGroup) GetWrites() uint32
- func (*FieldHistoryWriteGroup) ProtoMessage()
- func (x *FieldHistoryWriteGroup) ProtoReflect() protoreflect.Message
- func (x *FieldHistoryWriteGroup) Reset()
- func (x *FieldHistoryWriteGroup) String() string
- type FollowSpec
- type GetChunkRequest
- func (*GetChunkRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetChunkRequest) GetDigest() string
- func (x *GetChunkRequest) GetIndex() uint32
- func (x *GetChunkRequest) GetWorkspaceId() string
- func (*GetChunkRequest) ProtoMessage()
- func (x *GetChunkRequest) ProtoReflect() protoreflect.Message
- func (x *GetChunkRequest) Reset()
- func (x *GetChunkRequest) String() string
- type GetChunkResponse
- type GetSchemaRequest
- type GetSchemaResponse
- func (*GetSchemaResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetSchemaResponse) GetDescriptorSet() []byte
- func (x *GetSchemaResponse) GetFound() bool
- func (x *GetSchemaResponse) GetRevision() string
- func (*GetSchemaResponse) ProtoMessage()
- func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message
- func (x *GetSchemaResponse) Reset()
- func (x *GetSchemaResponse) String() string
- type GrantOptions
- func (*GrantOptions) Descriptor() ([]byte, []int)deprecated
- func (x *GrantOptions) GetRole() string
- func (x *GrantOptions) GetRoles() []*Role
- func (x *GrantOptions) GetSubject() string
- func (*GrantOptions) ProtoMessage()
- func (x *GrantOptions) ProtoReflect() protoreflect.Message
- func (x *GrantOptions) Reset()
- func (x *GrantOptions) String() string
- type HistoryOptions
- type InCond
- type IndexKey
- type IndexSpec
- type KeySet
- type LateRejection
- func (*LateRejection) Descriptor() ([]byte, []int)deprecated
- func (x *LateRejection) GetErrorCode() string
- func (x *LateRejection) GetErrorMessage() string
- func (x *LateRejection) GetMutationId() uint64
- func (x *LateRejection) GetMutator() string
- func (x *LateRejection) GetTargets() []*MutationTarget
- func (*LateRejection) ProtoMessage()
- func (x *LateRejection) ProtoReflect() protoreflect.Message
- func (x *LateRejection) Reset()
- func (x *LateRejection) String() string
- type MatchCond
- type MembersOptions
- type Mutation
- func (*Mutation) Descriptor() ([]byte, []int)deprecated
- func (x *Mutation) GetBatch() *BatchMutation
- func (x *Mutation) GetClientId() string
- func (x *Mutation) GetCrud() *CrudMutation
- func (x *Mutation) GetCustom() *CustomMutation
- func (x *Mutation) GetMutationId() uint64
- func (x *Mutation) GetPayload() isMutation_Payload
- func (*Mutation) ProtoMessage()
- func (x *Mutation) ProtoReflect() protoreflect.Message
- func (x *Mutation) Reset()
- func (x *Mutation) String() string
- type MutationResult
- func (*MutationResult) Descriptor() ([]byte, []int)deprecated
- func (x *MutationResult) GetErrorCode() string
- func (x *MutationResult) GetErrorMessage() string
- func (x *MutationResult) GetMutationId() uint64
- func (x *MutationResult) GetSeq() uint64
- func (x *MutationResult) GetStatus() MutationStatus
- func (*MutationResult) ProtoMessage()
- func (x *MutationResult) ProtoReflect() protoreflect.Message
- func (x *MutationResult) Reset()
- func (x *MutationResult) String() string
- type MutationStatus
- func (MutationStatus) Descriptor() protoreflect.EnumDescriptor
- func (x MutationStatus) Enum() *MutationStatus
- func (MutationStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x MutationStatus) Number() protoreflect.EnumNumber
- func (x MutationStatus) String() string
- func (MutationStatus) Type() protoreflect.EnumType
- type MutationTarget
- func (*MutationTarget) Descriptor() ([]byte, []int)deprecated
- func (x *MutationTarget) GetEntity() string
- func (x *MutationTarget) GetKey() string
- func (*MutationTarget) ProtoMessage()
- func (x *MutationTarget) ProtoReflect() protoreflect.Message
- func (x *MutationTarget) Reset()
- func (x *MutationTarget) String() string
- type Mutation_Batch
- type Mutation_Crud
- type Mutation_Custom
- type OrderKey
- func (*OrderKey) Descriptor() ([]byte, []int)deprecated
- func (x *OrderKey) GetDir() Direction
- func (x *OrderKey) GetPath() []string
- func (x *OrderKey) GetRelevance() bool
- func (*OrderKey) ProtoMessage()
- func (x *OrderKey) ProtoReflect() protoreflect.Message
- func (x *OrderKey) Reset()
- func (x *OrderKey) String() string
- type Participant
- func (*Participant) Descriptor() ([]byte, []int)deprecated
- func (x *Participant) GetPresence() *PresenceUpdate
- func (x *Participant) GetSessionId() string
- func (x *Participant) GetSubject() string
- func (*Participant) ProtoMessage()
- func (x *Participant) ProtoReflect() protoreflect.Message
- func (x *Participant) Reset()
- func (x *Participant) String() string
- type Patch
- type PresenceUpdate
- func (*PresenceUpdate) Descriptor() ([]byte, []int)deprecated
- func (x *PresenceUpdate) GetRevision() uint64
- func (x *PresenceUpdate) GetSeq() uint64
- func (x *PresenceUpdate) GetState() []byte
- func (*PresenceUpdate) ProtoMessage()
- func (x *PresenceUpdate) ProtoReflect() protoreflect.Message
- func (x *PresenceUpdate) Reset()
- func (x *PresenceUpdate) String() string
- type PresentCond
- func (*PresentCond) Descriptor() ([]byte, []int)deprecated
- func (x *PresentCond) GetOp() PresentOp
- func (x *PresentCond) GetPath() []string
- func (*PresentCond) ProtoMessage()
- func (x *PresentCond) ProtoReflect() protoreflect.Message
- func (x *PresentCond) Reset()
- func (x *PresentCond) String() string
- type PresentOp
- type PublishItem
- func (*PublishItem) Descriptor() ([]byte, []int)deprecated
- func (x *PublishItem) GetBody() isPublishItem_Body
- func (x *PublishItem) GetLeave() bool
- func (x *PublishItem) GetMessage() []byte
- func (x *PublishItem) GetPresence() *PresenceUpdate
- func (x *PublishItem) GetTopic() *Topic
- func (*PublishItem) ProtoMessage()
- func (x *PublishItem) ProtoReflect() protoreflect.Message
- func (x *PublishItem) Reset()
- func (x *PublishItem) String() string
- type PublishItem_Leave
- type PublishItem_Message
- type PublishItem_Presence
- type PublishRequest
- func (*PublishRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PublishRequest) GetItems() []*PublishItem
- func (x *PublishRequest) GetSessionId() string
- func (*PublishRequest) ProtoMessage()
- func (x *PublishRequest) ProtoReflect() protoreflect.Message
- func (x *PublishRequest) Reset()
- func (x *PublishRequest) String() string
- type PublishResponse
- func (*PublishResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PublishResponse) GetAnnounceInterval() *durationpb.Duration
- func (*PublishResponse) ProtoMessage()
- func (x *PublishResponse) ProtoReflect() protoreflect.Message
- func (x *PublishResponse) Reset()
- func (x *PublishResponse) String() string
- type PullRequest
- func (*PullRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PullRequest) GetCallerAccessVersion() uint64
- func (x *PullRequest) GetClientId() string
- func (x *PullRequest) GetCursor() []byte
- func (x *PullRequest) GetLimit() uint32
- func (x *PullRequest) GetMinSeq() uint64
- func (x *PullRequest) GetNoDeltaEntities() []string
- func (x *PullRequest) GetSubscriptions() []*Subscription
- func (x *PullRequest) GetWorkspaceId() string
- func (*PullRequest) ProtoMessage()
- func (x *PullRequest) ProtoReflect() protoreflect.Message
- func (x *PullRequest) Reset()
- func (x *PullRequest) String() string
- type PullResponse
- func (*PullResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PullResponse) GetCallerAccess() *CallerAccess
- func (x *PullResponse) GetCallerAccessDelta() *CallerAccessDelta
- func (x *PullResponse) GetHasMore() bool
- func (x *PullResponse) GetHeadSeq() uint64
- func (x *PullResponse) GetLastAckedMutationId() uint64
- func (x *PullResponse) GetLateRejections() []*LateRejection
- func (x *PullResponse) GetNextCursor() []byte
- func (x *PullResponse) GetPatch() *Patch
- func (x *PullResponse) GetReset_() bool
- func (x *PullResponse) GetSchemaRevision() string
- func (x *PullResponse) GetSeq() uint64
- func (*PullResponse) ProtoMessage()
- func (x *PullResponse) ProtoReflect() protoreflect.Message
- func (x *PullResponse) Reset()
- func (x *PullResponse) String() string
- type PushRequest
- type PushResponse
- func (*PushResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PushResponse) GetResults() []*WorkspaceResults
- func (x *PushResponse) GetSchemaRevision() string
- func (*PushResponse) ProtoMessage()
- func (x *PushResponse) ProtoReflect() protoreflect.Message
- func (x *PushResponse) Reset()
- func (x *PushResponse) String() string
- type PutChunkRequest
- func (*PutChunkRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PutChunkRequest) GetData() []byte
- func (x *PutChunkRequest) GetDigest() string
- func (x *PutChunkRequest) GetIndex() uint32
- func (x *PutChunkRequest) GetWorkspaceId() string
- func (*PutChunkRequest) ProtoMessage()
- func (x *PutChunkRequest) ProtoReflect() protoreflect.Message
- func (x *PutChunkRequest) Reset()
- func (x *PutChunkRequest) String() string
- type PutChunkResponse
- type QueryFacet
- func (*QueryFacet) Descriptor() ([]byte, []int)deprecated
- func (x *QueryFacet) GetGroups() []*QueryGroup
- func (x *QueryFacet) GetPath() []string
- func (*QueryFacet) ProtoMessage()
- func (x *QueryFacet) ProtoReflect() protoreflect.Message
- func (x *QueryFacet) Reset()
- func (x *QueryFacet) String() string
- type QueryGroup
- type QueryRequest
- func (*QueryRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRequest) GetAfter() []byte
- func (x *QueryRequest) GetAggregate() AggregateOp
- func (x *QueryRequest) GetBefore() []byte
- func (x *QueryRequest) GetEntity() string
- func (x *QueryRequest) GetFacets() []*QueryFacet
- func (x *QueryRequest) GetGroupBy() []string
- func (x *QueryRequest) GetLimit() uint32
- func (x *QueryRequest) GetOffset() uint32
- func (x *QueryRequest) GetOrderBy() []*OrderKey
- func (x *QueryRequest) GetPerGroup() uint32
- func (x *QueryRequest) GetPerGroupTotal() bool
- func (x *QueryRequest) GetPredicate() *Condition
- func (x *QueryRequest) GetWorkspaceId() string
- func (*QueryRequest) ProtoMessage()
- func (x *QueryRequest) ProtoReflect() protoreflect.Message
- func (x *QueryRequest) Reset()
- func (x *QueryRequest) String() string
- type QueryResponse
- func (*QueryResponse) Descriptor() ([]byte, []int)deprecated
- func (x *QueryResponse) GetEndCursor() []byte
- func (x *QueryResponse) GetFacets() []*QueryFacet
- func (x *QueryResponse) GetGroups() []*QueryGroup
- func (x *QueryResponse) GetHasMore() bool
- func (x *QueryResponse) GetRowGroups() []*QueryRowGroup
- func (x *QueryResponse) GetRows() []*RowChange
- func (x *QueryResponse) GetSchemaRevision() string
- func (x *QueryResponse) GetStartCursor() []byte
- func (*QueryResponse) ProtoMessage()
- func (x *QueryResponse) ProtoReflect() protoreflect.Message
- func (x *QueryResponse) Reset()
- func (x *QueryResponse) String() string
- type QueryRowGroup
- func (*QueryRowGroup) Descriptor() ([]byte, []int)deprecated
- func (x *QueryRowGroup) GetHasMore() bool
- func (x *QueryRowGroup) GetRows() []*RowChange
- func (x *QueryRowGroup) GetTotal() uint64
- func (x *QueryRowGroup) GetValue() *QueryValue
- func (*QueryRowGroup) ProtoMessage()
- func (x *QueryRowGroup) ProtoReflect() protoreflect.Message
- func (x *QueryRowGroup) Reset()
- func (x *QueryRowGroup) String() string
- type QueryValue
- func (*QueryValue) Descriptor() ([]byte, []int)deprecated
- func (x *QueryValue) GetBoolValue() bool
- func (x *QueryValue) GetDoubleValue() float64
- func (x *QueryValue) GetIntValue() int64
- func (x *QueryValue) GetKind() isQueryValue_Kind
- func (x *QueryValue) GetStringValue() string
- func (x *QueryValue) GetUintValue() uint64
- func (*QueryValue) ProtoMessage()
- func (x *QueryValue) ProtoReflect() protoreflect.Message
- func (x *QueryValue) Reset()
- func (x *QueryValue) String() string
- type QueryValue_BoolValue
- type QueryValue_DoubleValue
- type QueryValue_IntValue
- type QueryValue_StringValue
- type QueryValue_UintValue
- type RefPath
- type ReferenceOptions
- type RegisterRequest
- func (*RegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterRequest) GetAllowAccessChange() bool
- func (x *RegisterRequest) GetAppId() string
- func (x *RegisterRequest) GetDescriptorSet() []byte
- func (x *RegisterRequest) GetExpectedRevision() string
- func (*RegisterRequest) ProtoMessage()
- func (x *RegisterRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterRequest) Reset()
- func (x *RegisterRequest) String() string
- type RegisterResponse
- func (*RegisterResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterResponse) GetEntityNames() []string
- func (x *RegisterResponse) GetRevision() string
- func (x *RegisterResponse) GetStatus() RegisterStatus
- func (*RegisterResponse) ProtoMessage()
- func (x *RegisterResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterResponse) Reset()
- func (x *RegisterResponse) String() string
- type RegisterStatus
- func (RegisterStatus) Descriptor() protoreflect.EnumDescriptor
- func (x RegisterStatus) Enum() *RegisterStatus
- func (RegisterStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x RegisterStatus) Number() protoreflect.EnumNumber
- func (x RegisterStatus) String() string
- func (RegisterStatus) Type() protoreflect.EnumType
- type RelCond
- type RepCond
- func (*RepCond) Descriptor() ([]byte, []int)deprecated
- func (x *RepCond) GetOp() RepOp
- func (x *RepCond) GetPath() []string
- func (x *RepCond) GetValues() []*QueryValue
- func (*RepCond) ProtoMessage()
- func (x *RepCond) ProtoReflect() protoreflect.Message
- func (x *RepCond) Reset()
- func (x *RepCond) String() string
- type RepOp
- type Role
- type RoomMessage
- func (*RoomMessage) Descriptor() ([]byte, []int)deprecated
- func (x *RoomMessage) GetPayload() []byte
- func (x *RoomMessage) GetSenderSessionId() string
- func (x *RoomMessage) GetSenderSubject() string
- func (*RoomMessage) ProtoMessage()
- func (x *RoomMessage) ProtoReflect() protoreflect.Message
- func (x *RoomMessage) Reset()
- func (x *RoomMessage) String() string
- type RoomSnapshot
- func (*RoomSnapshot) Descriptor() ([]byte, []int)deprecated
- func (x *RoomSnapshot) GetParticipants() []*Participant
- func (x *RoomSnapshot) GetTruncated() bool
- func (*RoomSnapshot) ProtoMessage()
- func (x *RoomSnapshot) ProtoReflect() protoreflect.Message
- func (x *RoomSnapshot) Reset()
- func (x *RoomSnapshot) String() string
- type RowChange
- func (*RowChange) Descriptor() ([]byte, []int)deprecated
- func (x *RowChange) GetBody() isRowChange_Body
- func (x *RowChange) GetEntity() string
- func (x *RowChange) GetHidden() []string
- func (x *RowChange) GetKey() string
- func (x *RowChange) GetTextDeltas() []*FieldDelta
- func (x *RowChange) GetTombstone() bool
- func (x *RowChange) GetValue() []byte
- func (x *RowChange) GetVersion() uint64
- func (*RowChange) ProtoMessage()
- func (x *RowChange) ProtoReflect() protoreflect.Message
- func (x *RowChange) Reset()
- func (x *RowChange) String() string
- type RowChange_Tombstone
- type RowChange_Value
- type SearchField
- type SearchSpec
- func (*SearchSpec) Descriptor() ([]byte, []int)deprecated
- func (x *SearchSpec) GetField() []*SearchField
- func (x *SearchSpec) GetKeepDiacritics() bool
- func (*SearchSpec) ProtoMessage()
- func (x *SearchSpec) ProtoReflect() protoreflect.Message
- func (x *SearchSpec) Reset()
- func (x *SearchSpec) String() string
- type StatBlobsRequest
- func (*StatBlobsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StatBlobsRequest) GetDigests() []string
- func (x *StatBlobsRequest) GetWorkspaceId() string
- func (*StatBlobsRequest) ProtoMessage()
- func (x *StatBlobsRequest) ProtoReflect() protoreflect.Message
- func (x *StatBlobsRequest) Reset()
- func (x *StatBlobsRequest) String() string
- type StatBlobsResponse
- func (*StatBlobsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StatBlobsResponse) GetBlobs() []*BlobStatus
- func (*StatBlobsResponse) ProtoMessage()
- func (x *StatBlobsResponse) ProtoReflect() protoreflect.Message
- func (x *StatBlobsResponse) Reset()
- func (x *StatBlobsResponse) String() string
- type StrCond
- func (*StrCond) Descriptor() ([]byte, []int)deprecated
- func (x *StrCond) GetOp() StrOp
- func (x *StrCond) GetPath() []string
- func (x *StrCond) GetValue() string
- func (*StrCond) ProtoMessage()
- func (x *StrCond) ProtoReflect() protoreflect.Message
- func (x *StrCond) Reset()
- func (x *StrCond) String() string
- type StrOp
- type SubscribeRequest
- func (*SubscribeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeRequest) GetClientId() string
- func (x *SubscribeRequest) GetLimit() uint32
- func (x *SubscribeRequest) GetNoDeltaEntities() []string
- func (x *SubscribeRequest) GetScopes() []*WorkspaceScope
- func (x *SubscribeRequest) GetSparseCursor() bool
- func (*SubscribeRequest) ProtoMessage()
- func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
- func (x *SubscribeRequest) Reset()
- func (x *SubscribeRequest) String() string
- type SubscribeResponse
- func (*SubscribeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SubscribeResponse) GetBody() isSubscribeResponse_Body
- func (x *SubscribeResponse) GetCaughtUp() bool
- func (x *SubscribeResponse) GetDropped() *WorkspaceDropped
- func (x *SubscribeResponse) GetHeartbeat() bool
- func (x *SubscribeResponse) GetPage() *PullResponse
- func (x *SubscribeResponse) GetSchemaRevision() string
- func (x *SubscribeResponse) GetWorkspaceId() string
- func (*SubscribeResponse) ProtoMessage()
- func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
- func (x *SubscribeResponse) Reset()
- func (x *SubscribeResponse) String() string
- type SubscribeResponse_CaughtUp
- type SubscribeResponse_Dropped
- type SubscribeResponse_Heartbeat
- type SubscribeResponse_Page
- type Subscription
- func (*Subscription) Descriptor() ([]byte, []int)deprecated
- func (x *Subscription) GetEntity() string
- func (x *Subscription) GetFollow() *FollowSpec
- func (x *Subscription) GetKeySet() *KeySet
- func (x *Subscription) GetPredicate() *Condition
- func (x *Subscription) GetWindow() *Window
- func (*Subscription) ProtoMessage()
- func (x *Subscription) ProtoReflect() protoreflect.Message
- func (x *Subscription) Reset()
- func (x *Subscription) String() string
- type Topic
- func (*Topic) Descriptor() ([]byte, []int)deprecated
- func (x *Topic) GetEntity() string
- func (x *Topic) GetKey() string
- func (x *Topic) GetName() string
- func (x *Topic) GetWorkspaceId() string
- func (*Topic) ProtoMessage()
- func (x *Topic) ProtoReflect() protoreflect.Message
- func (x *Topic) Reset()
- func (x *Topic) String() string
- type TopicDropped
- func (*TopicDropped) Descriptor() ([]byte, []int)deprecated
- func (x *TopicDropped) GetMessage() string
- func (x *TopicDropped) GetReason() TopicDropped_Reason
- func (*TopicDropped) ProtoMessage()
- func (x *TopicDropped) ProtoReflect() protoreflect.Message
- func (x *TopicDropped) Reset()
- func (x *TopicDropped) String() string
- type TopicDropped_Reason
- func (TopicDropped_Reason) Descriptor() protoreflect.EnumDescriptor
- func (x TopicDropped_Reason) Enum() *TopicDropped_Reason
- func (TopicDropped_Reason) EnumDescriptor() ([]byte, []int)deprecated
- func (x TopicDropped_Reason) Number() protoreflect.EnumNumber
- func (x TopicDropped_Reason) String() string
- func (TopicDropped_Reason) Type() protoreflect.EnumType
- type WatchBlobsRequest
- func (*WatchBlobsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchBlobsRequest) GetDigests() []string
- func (x *WatchBlobsRequest) GetWorkspaceId() string
- func (*WatchBlobsRequest) ProtoMessage()
- func (x *WatchBlobsRequest) ProtoReflect() protoreflect.Message
- func (x *WatchBlobsRequest) Reset()
- func (x *WatchBlobsRequest) String() string
- type WatchBlobsResponse
- func (*WatchBlobsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WatchBlobsResponse) GetBlobs() []*BlobStatus
- func (*WatchBlobsResponse) ProtoMessage()
- func (x *WatchBlobsResponse) ProtoReflect() protoreflect.Message
- func (x *WatchBlobsResponse) Reset()
- func (x *WatchBlobsResponse) String() string
- type WatchRequest
- func (*WatchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *WatchRequest) GetFrontedSessionIds() []string
- func (x *WatchRequest) GetLimit() uint32
- func (x *WatchRequest) GetSessionId() string
- func (x *WatchRequest) GetTopics() []*Topic
- func (*WatchRequest) ProtoMessage()
- func (x *WatchRequest) ProtoReflect() protoreflect.Message
- func (x *WatchRequest) Reset()
- func (x *WatchRequest) String() string
- type WatchResponse
- func (*WatchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WatchResponse) GetBody() isWatchResponse_Body
- func (x *WatchResponse) GetDropped() *TopicDropped
- func (x *WatchResponse) GetHeartbeat() bool
- func (x *WatchResponse) GetLeft() string
- func (x *WatchResponse) GetMessage() *RoomMessage
- func (x *WatchResponse) GetSnapshot() *RoomSnapshot
- func (x *WatchResponse) GetTopic() *Topic
- func (x *WatchResponse) GetUpdated() *Participant
- func (*WatchResponse) ProtoMessage()
- func (x *WatchResponse) ProtoReflect() protoreflect.Message
- func (x *WatchResponse) Reset()
- func (x *WatchResponse) String() string
- type WatchResponse_Dropped
- type WatchResponse_Heartbeat
- type WatchResponse_Left
- type WatchResponse_Message
- type WatchResponse_Snapshot
- type WatchResponse_Updated
- type Window
- func (*Window) Descriptor() ([]byte, []int)deprecated
- func (x *Window) GetByRecency() bool
- func (x *Window) GetLimit() uint32
- func (x *Window) GetOrderBy() []*OrderKey
- func (*Window) ProtoMessage()
- func (x *Window) ProtoReflect() protoreflect.Message
- func (x *Window) Reset()
- func (x *Window) String() string
- type WorkspaceBatch
- func (*WorkspaceBatch) Descriptor() ([]byte, []int)deprecated
- func (x *WorkspaceBatch) GetBasis() []byte
- func (x *WorkspaceBatch) GetMutations() []*Mutation
- func (x *WorkspaceBatch) GetSentThrough() uint64
- func (x *WorkspaceBatch) GetWorkspaceId() string
- func (*WorkspaceBatch) ProtoMessage()
- func (x *WorkspaceBatch) ProtoReflect() protoreflect.Message
- func (x *WorkspaceBatch) Reset()
- func (x *WorkspaceBatch) String() string
- type WorkspaceDropped
- func (*WorkspaceDropped) Descriptor() ([]byte, []int)deprecated
- func (x *WorkspaceDropped) GetMessage() string
- func (x *WorkspaceDropped) GetReason() WorkspaceDropped_Reason
- func (*WorkspaceDropped) ProtoMessage()
- func (x *WorkspaceDropped) ProtoReflect() protoreflect.Message
- func (x *WorkspaceDropped) Reset()
- func (x *WorkspaceDropped) String() string
- type WorkspaceDropped_Reason
- func (WorkspaceDropped_Reason) Descriptor() protoreflect.EnumDescriptor
- func (x WorkspaceDropped_Reason) Enum() *WorkspaceDropped_Reason
- func (WorkspaceDropped_Reason) EnumDescriptor() ([]byte, []int)deprecated
- func (x WorkspaceDropped_Reason) Number() protoreflect.EnumNumber
- func (x WorkspaceDropped_Reason) String() string
- func (WorkspaceDropped_Reason) Type() protoreflect.EnumType
- type WorkspaceResults
- func (*WorkspaceResults) Descriptor() ([]byte, []int)deprecated
- func (x *WorkspaceResults) GetErrorCode() string
- func (x *WorkspaceResults) GetErrorMessage() string
- func (x *WorkspaceResults) GetResults() []*MutationResult
- func (x *WorkspaceResults) GetWorkspaceId() string
- func (*WorkspaceResults) ProtoMessage()
- func (x *WorkspaceResults) ProtoReflect() protoreflect.Message
- func (x *WorkspaceResults) Reset()
- func (x *WorkspaceResults) String() string
- type WorkspaceScope
- func (*WorkspaceScope) Descriptor() ([]byte, []int)deprecated
- func (x *WorkspaceScope) GetCallerAccessVersion() uint64
- func (x *WorkspaceScope) GetCursor() []byte
- func (x *WorkspaceScope) GetMinSeq() uint64
- func (x *WorkspaceScope) GetSubscriptions() []*Subscription
- func (x *WorkspaceScope) GetWorkspaceId() string
- func (*WorkspaceScope) ProtoMessage()
- func (x *WorkspaceScope) ProtoReflect() protoreflect.Message
- func (x *WorkspaceScope) Reset()
- func (x *WorkspaceScope) String() string
Constants ¶
This section is empty.
Variables ¶
var ( RegisterStatus_name = map[int32]string{ 0: "REGISTER_STATUS_UNSPECIFIED", 1: "REGISTER_STATUS_CREATED", 2: "REGISTER_STATUS_UPDATED", 3: "REGISTER_STATUS_UNCHANGED", } RegisterStatus_value = map[string]int32{ "REGISTER_STATUS_UNSPECIFIED": 0, "REGISTER_STATUS_CREATED": 1, "REGISTER_STATUS_UPDATED": 2, "REGISTER_STATUS_UNCHANGED": 3, } )
Enum value maps for RegisterStatus.
var ( BlobState_name = map[int32]string{ 0: "BLOB_STATE_UNSPECIFIED", 1: "BLOB_STATE_MISSING", 2: "BLOB_STATE_UPLOADING", 3: "BLOB_STATE_COMPLETE", } BlobState_value = map[string]int32{ "BLOB_STATE_UNSPECIFIED": 0, "BLOB_STATE_MISSING": 1, "BLOB_STATE_UPLOADING": 2, "BLOB_STATE_COMPLETE": 3, } )
Enum value maps for BlobState.
var ( CrudOp_name = map[int32]string{ 0: "CRUD_OP_UNSPECIFIED", 1: "CRUD_OP_PUT", 2: "CRUD_OP_PATCH", 3: "CRUD_OP_DELETE", } CrudOp_value = map[string]int32{ "CRUD_OP_UNSPECIFIED": 0, "CRUD_OP_PUT": 1, "CRUD_OP_PATCH": 2, "CRUD_OP_DELETE": 3, } )
Enum value maps for CrudOp.
var ( // Field numbers 50100, 50101 and 50102 are unregistered; fine for // internal use. // // optional syncplane.v1.EntityOptions entity = 50100; E_Entity = &file_syncplane_v1_options_proto_extTypes[0] // Message option that configures reference message options for // cross-workspace references. // // optional syncplane.v1.ReferenceOptions reference = 50102; E_Reference = &file_syncplane_v1_options_proto_extTypes[1] )
Extension fields to descriptorpb.MessageOptions.
var ( TopicDropped_Reason_name = map[int32]string{ 0: "REASON_UNSPECIFIED", 1: "REASON_ACCESS_REVOKED", 2: "REASON_ERROR", 3: "REASON_NO_ACCESS", } TopicDropped_Reason_value = map[string]int32{ "REASON_UNSPECIFIED": 0, "REASON_ACCESS_REVOKED": 1, "REASON_ERROR": 2, "REASON_NO_ACCESS": 3, } )
Enum value maps for TopicDropped_Reason.
var ( CmpOp_name = map[int32]string{ 0: "CMP_OP_UNSPECIFIED", 1: "CMP_OP_EQ", 2: "CMP_OP_NEQ", 3: "CMP_OP_GT", 4: "CMP_OP_GTE", 5: "CMP_OP_LT", 6: "CMP_OP_LTE", } CmpOp_value = map[string]int32{ "CMP_OP_UNSPECIFIED": 0, "CMP_OP_EQ": 1, "CMP_OP_NEQ": 2, "CMP_OP_GT": 3, "CMP_OP_GTE": 4, "CMP_OP_LT": 5, "CMP_OP_LTE": 6, } )
Enum value maps for CmpOp.
var ( StrOp_name = map[int32]string{ 0: "STR_OP_UNSPECIFIED", 1: "STR_OP_STARTS_WITH", 2: "STR_OP_ENDS_WITH", 3: "STR_OP_CONTAINS", } StrOp_value = map[string]int32{ "STR_OP_UNSPECIFIED": 0, "STR_OP_STARTS_WITH": 1, "STR_OP_ENDS_WITH": 2, "STR_OP_CONTAINS": 3, } )
Enum value maps for StrOp.
var ( RepOp_name = map[int32]string{ 0: "REP_OP_UNSPECIFIED", 1: "REP_OP_HAS", 2: "REP_OP_HAS_ANY", 3: "REP_OP_HAS_ALL", 4: "REP_OP_IS_EMPTY", } RepOp_value = map[string]int32{ "REP_OP_UNSPECIFIED": 0, "REP_OP_HAS": 1, "REP_OP_HAS_ANY": 2, "REP_OP_HAS_ALL": 3, "REP_OP_IS_EMPTY": 4, } )
Enum value maps for RepOp.
var ( PresentOp_name = map[int32]string{ 0: "PRESENT_OP_UNSPECIFIED", 1: "PRESENT_OP_IS_SET", 2: "PRESENT_OP_IS_NOT_SET", } PresentOp_value = map[string]int32{ "PRESENT_OP_UNSPECIFIED": 0, "PRESENT_OP_IS_SET": 1, "PRESENT_OP_IS_NOT_SET": 2, } )
Enum value maps for PresentOp.
var ( Direction_name = map[int32]string{ 0: "DIRECTION_UNSPECIFIED", 1: "DIRECTION_ASC", 2: "DIRECTION_DESC", } Direction_value = map[string]int32{ "DIRECTION_UNSPECIFIED": 0, "DIRECTION_ASC": 1, "DIRECTION_DESC": 2, } )
Enum value maps for Direction.
var ( AggregateOp_name = map[int32]string{ 0: "AGGREGATE_OP_UNSPECIFIED", 1: "AGGREGATE_OP_COUNT", 2: "AGGREGATE_OP_DISTINCT", 3: "AGGREGATE_OP_ROWS", } AggregateOp_value = map[string]int32{ "AGGREGATE_OP_UNSPECIFIED": 0, "AGGREGATE_OP_COUNT": 1, "AGGREGATE_OP_DISTINCT": 2, "AGGREGATE_OP_ROWS": 3, } )
Enum value maps for AggregateOp.
var ( MutationStatus_name = map[int32]string{ 0: "MUTATION_STATUS_UNSPECIFIED", 1: "MUTATION_STATUS_APPLIED", 2: "MUTATION_STATUS_ALREADY_APPLIED", 3: "MUTATION_STATUS_REJECTED", } MutationStatus_value = map[string]int32{ "MUTATION_STATUS_UNSPECIFIED": 0, "MUTATION_STATUS_APPLIED": 1, "MUTATION_STATUS_ALREADY_APPLIED": 2, "MUTATION_STATUS_REJECTED": 3, } )
Enum value maps for MutationStatus.
var ( WorkspaceDropped_Reason_name = map[int32]string{ 0: "REASON_UNSPECIFIED", 1: "REASON_RESET", 2: "REASON_ACCESS_REVOKED", 3: "REASON_ERROR", 4: "REASON_NO_ACCESS", } WorkspaceDropped_Reason_value = map[string]int32{ "REASON_UNSPECIFIED": 0, "REASON_RESET": 1, "REASON_ACCESS_REVOKED": 2, "REASON_ERROR": 3, "REASON_NO_ACCESS": 4, } )
Enum value maps for WorkspaceDropped_Reason.
var ( // Field option that configures field-level merge, indexing, and // authorization behavior. // // optional syncplane.v1.FieldBehavior field_behavior = 50101; E_FieldBehavior = &file_syncplane_v1_options_proto_extTypes[2] )
Extension fields to descriptorpb.FieldOptions.
var File_syncplane_v1_admin_proto protoreflect.FileDescriptor
var File_syncplane_v1_blob_proto protoreflect.FileDescriptor
var File_syncplane_v1_history_proto protoreflect.FileDescriptor
var File_syncplane_v1_mutation_proto protoreflect.FileDescriptor
var File_syncplane_v1_options_proto protoreflect.FileDescriptor
var File_syncplane_v1_patch_proto protoreflect.FileDescriptor
var File_syncplane_v1_presence_proto protoreflect.FileDescriptor
var File_syncplane_v1_query_proto protoreflect.FileDescriptor
var File_syncplane_v1_service_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type AccessOptions ¶ added in v0.2.0
type AccessOptions struct {
// The rules. At least one, and no two the same.
Allow []*AccessRule `protobuf:"bytes,1,rep,name=allow,proto3" json:"allow,omitempty"`
// The access parents: references that place each row below another row.
//
// A permission held at the referenced row applies to the referencing row
// and to every row below it. The referenced row can have access parents
// of its own, and an entity can be its own access parent. An entity with
// no parents sits at the workspace root.
//
// Each entry names a top-level field outside any `oneof`, or a `oneof`,
// and no two entries are the same. A field is a reference: its type is an
// entity message, or a reference message without a `workspace` field. It
// can be repeated, but not a map. Each member of a named `oneof` is such a
// reference. A `FieldGuard` cannot name a parent.
//
// A row sits below every row its parents name, and a permission held at
// any of them, or at a row above any of them, applies to the row:
//
// “`protobuf
//
// message Task {
// option (syncplane.v1.entity) = {
// name: "task" key_fields: ["id"]
// access: {
// parents: ["project", "milestone", "labels"]
// allow: [
// { read: true requires: "view_tasks" },
// { write: true requires: "edit_tasks" }
// ]
// }
// };
// string id = 1;
// Project project = 2;
// Milestone milestone = 3;
// repeated Label labels = 4;
// }
//
// “`
//
// A write that adds or removes a parent needs its rule where that parent
// sits; see `AccessRule`. A write fails when the row would name more rows
// than the server's `MaxAccessParents` limit allows, or would sit below
// itself. A grant entity names at most one parent, and not a repeated
// field.
//
// A polymorphic parent points at one of several entities: a `oneof` of
// references, or a field whose reference message holds a `oneof` of
// entities. The case a row holds names the row it sits below, and a row
// that holds no case has no parent there.
Parents []string `protobuf:"bytes,3,rep,name=parents,proto3" json:"parents,omitempty"`
// The field guards: each one restricts who can read and who can write a
// set of fields, whatever rule in `allow` admits the read or the write. A
// field that no guard names follows `allow` alone. See `FieldGuard`.
Guard []*FieldGuard `protobuf:"bytes,2,rep,name=guard,proto3" json:"guard,omitempty"`
// contains filtered or unexported fields
}
Declares who can read and write the rows of an entity in the access model.
A caller holds a permission at an anchor: the workspace root, or one row that a grant row's access parent points at. A permission held at an anchor applies to the anchor row and to every row below it: the rows whose access parents point at it, the rows whose access parents point at those, and so on. A row whose access parents are unset, or name only rows that do not exist, has no parent and never falls back to the workspace root. See `parents` and `GrantOptions`.
An operation on a row is allowed when at least one rule in `allow` admits it. A rule only adds access: no rule takes away what another rule allows, and the order of the rules has no effect. An operation that no rule names is open only to trusted writes, such as connectors, effects and mutator bodies.
```protobuf
message Comment {
option (syncplane.v1.entity) = {
name: "comment" key_fields: ["id"]
access: {
parents: ["task"]
allow: [
{ read: true requires: "view_tasks" },
{ create: true requires: "comment" },
{ update: true delete: true requires: "moderate_comments" }
]
}
};
string id = 1;
Task task = 2;
}
```
Registration refuses a permission that no declared role grants. It logs a warning for a role that grants a permission no rule uses, because only code can ask about that permission.
The application permission hooks still run, and can refuse what the model allows. They cannot allow what the model refuses.
Registration refuses unknown fields inside this message.
func (*AccessOptions) Descriptor
deprecated
added in
v0.2.0
func (*AccessOptions) Descriptor() ([]byte, []int)
Deprecated: Use AccessOptions.ProtoReflect.Descriptor instead.
func (*AccessOptions) GetAllow ¶ added in v0.2.0
func (x *AccessOptions) GetAllow() []*AccessRule
func (*AccessOptions) GetGuard ¶ added in v0.2.0
func (x *AccessOptions) GetGuard() []*FieldGuard
func (*AccessOptions) GetParents ¶ added in v0.2.0
func (x *AccessOptions) GetParents() []string
func (*AccessOptions) ProtoMessage ¶ added in v0.2.0
func (*AccessOptions) ProtoMessage()
func (*AccessOptions) ProtoReflect ¶ added in v0.2.0
func (x *AccessOptions) ProtoReflect() protoreflect.Message
func (*AccessOptions) Reset ¶ added in v0.2.0
func (x *AccessOptions) Reset()
func (*AccessOptions) String ¶ added in v0.2.0
func (x *AccessOptions) String() string
type AccessRule ¶ added in v0.2.0
type AccessRule struct {
// Admits reading rows.
Read bool `protobuf:"varint,1,opt,name=read,proto3" json:"read,omitempty"`
// Admits creating rows.
Create bool `protobuf:"varint,2,opt,name=create,proto3" json:"create,omitempty"`
// Admits changing rows that exist, including moving them to another access
// parent.
Update bool `protobuf:"varint,3,opt,name=update,proto3" json:"update,omitempty"`
// Admits deleting rows.
Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"`
// Admits every write operation: `create`, `update` and `delete`, and each
// write operation a later version adds.
Write bool `protobuf:"varint,5,opt,name=write,proto3" json:"write,omitempty"`
// The source of the rule: a caller that holds every one of these
// permissions where the row sits, at the workspace root, at the row, or at
// a row above the row through its access parents. Each permission can be
// held at a different one of these places. Each entry starts with a letter
// or an underscore, followed by letters, digits and underscores, and no
// entry is named twice.
//
// The text format writes one permission without brackets:
//
// “`protobuf
// access: { allow: [
//
// { read: true requires: "view_tasks" },
// { update: true requires: ["edit_tasks", "use_billing"] }
//
// ] }
// “`
//
// A caller that holds `edit_tasks` at the task's project and `use_billing`
// at the workspace root updates the task. A caller that holds only one of
// them does not. To admit a caller that holds either of two permissions,
// declare two rules.
Requires []string `protobuf:"bytes,6,rep,name=requires,proto3" json:"requires,omitempty"`
// The source of the rule: every caller admitted to the workspace. See
// `AdmittedCaller`.
Admitted *AdmittedCaller `protobuf:"bytes,7,opt,name=admitted,proto3" json:"admitted,omitempty"`
// Admits only rows whose field with this name holds one of the caller's
// subjects. Names a top-level, singular `string` field. An empty field
// value never matches, and a permission held at the workspace root does not
// skip the check. A member of a `oneof` is empty on a row that holds
// another case, so it never matches there.
CallerIs string `protobuf:"bytes,8,opt,name=caller_is,json=callerIs,proto3" json:"caller_is,omitempty"`
// Admits only updates that change no field outside this list. Valid only
// on a rule whose one operation is `update`. Each entry names a top-level
// field outside any `oneof`, or a `oneof`, and no key field. A move
// changes the access parent field, so the rule admits a move only when the
// list names that field or its `oneof`.
//
// A `PATCH` fails before the row is read when every `update` rule of the
// entity has a `fields` list and no list names every field the mask
// names. When every `update` rule that admits the caller at the stored row
// has a `fields` list, a `PUT` that updates the row keeps the stored value
// of each field that none of those lists names.
//
// To take a field away from every caller, whatever rule admits the
// update, use a `FieldGuard`.
Fields []string `protobuf:"bytes,9,rep,name=fields,proto3" json:"fields,omitempty"`
// Admits only rows that match this condition. The condition uses the query
// predicate language with paths from the row, and reads only the row
// itself: a `rel` or a `match` condition is refused.
//
// A read rule with `when` hides a row when a write makes it fail the
// condition, and a client that holds the row receives a delete. An update
// rule with `when` must admit the stored row and the row as it will be
// stored, so it refuses a write that makes a row fail the condition, and
// a write to a row that fails it:
//
// “`protobuf
// access: { allow: [
//
// { read: true requires: "view_tasks" },
// { update: true requires: "edit_tasks"
// when: { cmp: { path: ["archived"] op: CMP_OP_EQ
// value: { bool_value: false } } } },
// { update: true requires: "archive_tasks" }
//
// ] }
// “`
//
// A permission held at the workspace root does not skip the check.
When *Condition `protobuf:"bytes,10,opt,name=when,proto3" json:"when,omitempty"`
// Admits only rows that sit within a row that passes a check: each entry
// must hold. See `AccessWithin`.
Within []*AccessWithin `protobuf:"bytes,11,rep,name=within,proto3" json:"within,omitempty"`
// contains filtered or unexported fields
}
One way to read or write the rows of an entity.
A rule admits each operation it names when its source holds for the caller and every check it sets holds, on the row: for a read, the row; for a create, the row as it will be stored; for a delete, the stored row. An update must be admitted by one rule for both the stored row and the row as it will be stored, so a rule admits a write that moves a row to another access parent only when its source holds at the old place and at the new one, a rule with `caller_is` admits no write that changes the named field to a value outside the caller's subjects, and a rule with `when` admits no write that makes the row fail the condition.
A row with several access parents shows to the readers of each. A rule admits a create only when its source holds through each parent the row names, and an update that adds or removes a parent only when its source holds through each parent it adds or removes. A source holds through a parent when each permission is held at the workspace root, at the row, or at that parent or a row above it. Every other operation needs the source through any one parent.
```protobuf
message Comment {
option (syncplane.v1.entity) = {
name: "comment" key_fields: ["id"]
access: {
parents: ["task"]
allow: [
{ read: true requires: "view_tasks" },
{ create: true delete: true
requires: "comment" caller_is: "author_id" },
{ update: true requires: "comment"
caller_is: "author_id" fields: ["body"] }
]
}
};
string id = 1;
Task task = 2;
string author_id = 3 [(syncplane.v1.field_behavior).creator = {}];
string body = 4;
}
```
Registration refuses a rule without an operation, a rule that sets neither or both of `requires` and `admitted`, and unknown fields inside this message.
func (*AccessRule) Descriptor
deprecated
added in
v0.2.0
func (*AccessRule) Descriptor() ([]byte, []int)
Deprecated: Use AccessRule.ProtoReflect.Descriptor instead.
func (*AccessRule) GetAdmitted ¶ added in v0.2.0
func (x *AccessRule) GetAdmitted() *AdmittedCaller
func (*AccessRule) GetCallerIs ¶ added in v0.2.0
func (x *AccessRule) GetCallerIs() string
func (*AccessRule) GetCreate ¶ added in v0.2.0
func (x *AccessRule) GetCreate() bool
func (*AccessRule) GetDelete ¶ added in v0.2.0
func (x *AccessRule) GetDelete() bool
func (*AccessRule) GetFields ¶ added in v0.2.0
func (x *AccessRule) GetFields() []string
func (*AccessRule) GetRead ¶ added in v0.2.0
func (x *AccessRule) GetRead() bool
func (*AccessRule) GetRequires ¶ added in v0.2.0
func (x *AccessRule) GetRequires() []string
func (*AccessRule) GetUpdate ¶ added in v0.2.0
func (x *AccessRule) GetUpdate() bool
func (*AccessRule) GetWhen ¶ added in v0.2.0
func (x *AccessRule) GetWhen() *Condition
func (*AccessRule) GetWithin ¶ added in v0.2.0
func (x *AccessRule) GetWithin() []*AccessWithin
func (*AccessRule) GetWrite ¶ added in v0.2.0
func (x *AccessRule) GetWrite() bool
func (*AccessRule) ProtoMessage ¶ added in v0.2.0
func (*AccessRule) ProtoMessage()
func (*AccessRule) ProtoReflect ¶ added in v0.2.0
func (x *AccessRule) ProtoReflect() protoreflect.Message
func (*AccessRule) Reset ¶ added in v0.2.0
func (x *AccessRule) Reset()
func (*AccessRule) String ¶ added in v0.2.0
func (x *AccessRule) String() string
type AccessWithin ¶ added in v0.2.0
type AccessWithin struct {
// The entity the row must sit within, by its entity name.
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// Admits only a row of `entity` whose field with this name holds one of
// the caller's subjects. An empty value never matches.
CallerIs string `protobuf:"bytes,2,opt,name=caller_is,json=callerIs,proto3" json:"caller_is,omitempty"`
// Admits only a row of `entity` that matches this condition. Paths start
// at that row.
When *Condition `protobuf:"bytes,3,opt,name=when,proto3" json:"when,omitempty"`
// contains filtered or unexported fields
}
Admits only rows that sit within a row of an entity that passes a check.
The entry holds for a row when the row itself, or a row above it on any path of access parents, is a row of `entity` and passes every check the entry sets. A row with no such row at or above it fails the entry. A permission held at the workspace root does not skip the check.
A private project hides its tasks from callers who read tasks through the workspace root, and its members still read them; an archived project makes its tasks read-only; the owner of a doc reads and edits its comments:
```protobuf
message Task {
option (syncplane.v1.entity) = {
name: "task" key_fields: ["id"]
access: {
parents: ["project"]
allow: [
{ read: true requires: "view_tasks" },
{ read: true requires: "view_open_tasks"
within: { entity: "project"
when: { cmp: { path: ["private"] op: CMP_OP_EQ
value: { bool_value: false } } } } },
{ write: true requires: "edit_tasks"
within: { entity: "project"
when: { cmp: { path: ["archived"] op: CMP_OP_EQ
value: { bool_value: false } } } } }
]
}
};
string id = 1;
Project project = 2;
}
message Comment {
option (syncplane.v1.entity) = {
name: "comment" key_fields: ["id"]
access: {
parents: ["doc"]
allow: [
{ read: true requires: "view_docs" },
{ write: true requires: "view_docs"
within: { entity: "doc" caller_is: "owner_id" } }
]
}
};
string id = 1;
Doc doc = 2;
}
```
A write to a row that changes whether it passes an entry changes what the rows below it show, as a move does. Such a write needs, where the row sits, a read rule of each entity whose rows can sit below it, and clients receive the rows below it that they gain and lose.
In a recursive entity, such as a folder tree, a row that fails the entry does not hide the rows below it from a caller when a row above it passes.
Registration refuses an entry that sets no check, an `entity` whose rows the rule's entity cannot sit below (its own entity only when it is recursive), a `caller_is` that is not a top-level, singular `string` field of `entity`, a `when` that reads another row, and unknown fields inside this message.
func (*AccessWithin) Descriptor
deprecated
added in
v0.2.0
func (*AccessWithin) Descriptor() ([]byte, []int)
Deprecated: Use AccessWithin.ProtoReflect.Descriptor instead.
func (*AccessWithin) GetCallerIs ¶ added in v0.2.0
func (x *AccessWithin) GetCallerIs() string
func (*AccessWithin) GetEntity ¶ added in v0.2.0
func (x *AccessWithin) GetEntity() string
func (*AccessWithin) GetWhen ¶ added in v0.2.0
func (x *AccessWithin) GetWhen() *Condition
func (*AccessWithin) ProtoMessage ¶ added in v0.2.0
func (*AccessWithin) ProtoMessage()
func (*AccessWithin) ProtoReflect ¶ added in v0.2.0
func (x *AccessWithin) ProtoReflect() protoreflect.Message
func (*AccessWithin) Reset ¶ added in v0.2.0
func (x *AccessWithin) Reset()
func (*AccessWithin) String ¶ added in v0.2.0
func (x *AccessWithin) String() string
type AdmittedCaller ¶ added in v0.2.0
type AdmittedCaller struct {
// contains filtered or unexported fields
}
Selects every caller admitted to the workspace as the source of an `AccessRule`.
A caller is admitted when the application's workspace hook lets it in. In a schema that declares a role, it must also hold at least one permission in the workspace.
func (*AdmittedCaller) Descriptor
deprecated
added in
v0.2.0
func (*AdmittedCaller) Descriptor() ([]byte, []int)
Deprecated: Use AdmittedCaller.ProtoReflect.Descriptor instead.
func (*AdmittedCaller) ProtoMessage ¶ added in v0.2.0
func (*AdmittedCaller) ProtoMessage()
func (*AdmittedCaller) ProtoReflect ¶ added in v0.2.0
func (x *AdmittedCaller) ProtoReflect() protoreflect.Message
func (*AdmittedCaller) Reset ¶ added in v0.2.0
func (x *AdmittedCaller) Reset()
func (*AdmittedCaller) String ¶ added in v0.2.0
func (x *AdmittedCaller) String() string
type AggregateOp ¶
type AggregateOp int32
Defines the aggregate operation computed for each group in a grouped read.
const ( AggregateOp_AGGREGATE_OP_UNSPECIFIED AggregateOp = 0 // Counts the number of matching rows in each group. AggregateOp_AGGREGATE_OP_COUNT AggregateOp = 1 // Returns the distinct group values without reading rows or reporting // counts. AggregateOp_AGGREGATE_OP_DISTINCT AggregateOp = 2 // Returns the first rows of each group in `order_by` order, such as a // board column preview or the top item of each project. // // Results return in `QueryResponse.row_groups` rather than `groups` // because row groups have a different shape from numeric counts. AggregateOp_AGGREGATE_OP_ROWS AggregateOp = 3 )
func (AggregateOp) Descriptor ¶
func (AggregateOp) Descriptor() protoreflect.EnumDescriptor
func (AggregateOp) Enum ¶
func (x AggregateOp) Enum() *AggregateOp
func (AggregateOp) EnumDescriptor
deprecated
func (AggregateOp) EnumDescriptor() ([]byte, []int)
Deprecated: Use AggregateOp.Descriptor instead.
func (AggregateOp) Number ¶
func (x AggregateOp) Number() protoreflect.EnumNumber
func (AggregateOp) String ¶
func (x AggregateOp) String() string
func (AggregateOp) Type ¶
func (AggregateOp) Type() protoreflect.EnumType
type AnchorGroup ¶ added in v0.2.0
type AnchorGroup struct {
// The permissions held at each row in the group. Sorted and never empty.
// Omits permissions in CallerAccess.root_permissions. A row whose
// permissions are all held at the root is in no group.
Permissions []string `protobuf:"bytes,1,rep,name=permissions,proto3" json:"permissions,omitempty"`
// Contains rows grouped by entity, sorted by entity.
Anchors []*AnchorRows `protobuf:"bytes,2,rep,name=anchors,proto3" json:"anchors,omitempty"`
// contains filtered or unexported fields
}
Groups rows where the caller holds the same set of permissions.
func (*AnchorGroup) Descriptor
deprecated
added in
v0.2.0
func (*AnchorGroup) Descriptor() ([]byte, []int)
Deprecated: Use AnchorGroup.ProtoReflect.Descriptor instead.
func (*AnchorGroup) GetAnchors ¶ added in v0.2.0
func (x *AnchorGroup) GetAnchors() []*AnchorRows
func (*AnchorGroup) GetPermissions ¶ added in v0.2.0
func (x *AnchorGroup) GetPermissions() []string
func (*AnchorGroup) ProtoMessage ¶ added in v0.2.0
func (*AnchorGroup) ProtoMessage()
func (*AnchorGroup) ProtoReflect ¶ added in v0.2.0
func (x *AnchorGroup) ProtoReflect() protoreflect.Message
func (*AnchorGroup) Reset ¶ added in v0.2.0
func (x *AnchorGroup) Reset()
func (*AnchorGroup) String ¶ added in v0.2.0
func (x *AnchorGroup) String() string
type AnchorRows ¶ added in v0.2.0
type AnchorRows struct {
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// Row keys in sorted order.
Keys []string `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
// contains filtered or unexported fields
}
Rows of one entity, identified by key.
func (*AnchorRows) Descriptor
deprecated
added in
v0.2.0
func (*AnchorRows) Descriptor() ([]byte, []int)
Deprecated: Use AnchorRows.ProtoReflect.Descriptor instead.
func (*AnchorRows) GetEntity ¶ added in v0.2.0
func (x *AnchorRows) GetEntity() string
func (*AnchorRows) GetKeys ¶ added in v0.2.0
func (x *AnchorRows) GetKeys() []string
func (*AnchorRows) ProtoMessage ¶ added in v0.2.0
func (*AnchorRows) ProtoMessage()
func (*AnchorRows) ProtoReflect ¶ added in v0.2.0
func (x *AnchorRows) ProtoReflect() protoreflect.Message
func (*AnchorRows) Reset ¶ added in v0.2.0
func (x *AnchorRows) Reset()
func (*AnchorRows) String ¶ added in v0.2.0
func (x *AnchorRows) String() string
type BatchMutation ¶
type BatchMutation struct {
// Ordered CRUD operations to execute atomically. Must not be empty.
Mutations []*CrudMutation `protobuf:"bytes,1,rep,name=mutations,proto3" json:"mutations,omitempty"`
// contains filtered or unexported fields
}
Applies multiple CRUD write operations as one atomic unit.
The entire batch shares the single `mutation_id` of the envelope and a single workspace sequence. The server applies operations atomically. If the server rejects any sub-mutation, it rolls back the entire batch and returns a single rejection.
Sub-mutations apply in order. A later operation observes earlier operations in the same batch, for example a `CRUD_OP_PATCH` after a `CRUD_OP_PUT` on the same key. The batch must not be empty.
func (*BatchMutation) Descriptor
deprecated
func (*BatchMutation) Descriptor() ([]byte, []int)
Deprecated: Use BatchMutation.ProtoReflect.Descriptor instead.
func (*BatchMutation) GetMutations ¶
func (x *BatchMutation) GetMutations() []*CrudMutation
func (*BatchMutation) ProtoMessage ¶
func (*BatchMutation) ProtoMessage()
func (*BatchMutation) ProtoReflect ¶
func (x *BatchMutation) ProtoReflect() protoreflect.Message
func (*BatchMutation) Reset ¶
func (x *BatchMutation) Reset()
func (*BatchMutation) String ¶
func (x *BatchMutation) String() string
type BeginUploadRequest ¶ added in v0.4.0
type BeginUploadRequest struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
// The blob's digest. See `BlobRef.digest`.
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
// The blob's size in bytes.
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
// The SHA-256 of each chunk, in order, 32 bytes each.
ChunkHashes [][]byte `protobuf:"bytes,4,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"`
// contains filtered or unexported fields
}
func (*BeginUploadRequest) Descriptor
deprecated
added in
v0.4.0
func (*BeginUploadRequest) Descriptor() ([]byte, []int)
Deprecated: Use BeginUploadRequest.ProtoReflect.Descriptor instead.
func (*BeginUploadRequest) GetChunkHashes ¶ added in v0.4.0
func (x *BeginUploadRequest) GetChunkHashes() [][]byte
func (*BeginUploadRequest) GetDigest ¶ added in v0.4.0
func (x *BeginUploadRequest) GetDigest() string
func (*BeginUploadRequest) GetSize ¶ added in v0.4.0
func (x *BeginUploadRequest) GetSize() int64
func (*BeginUploadRequest) GetWorkspaceId ¶ added in v0.4.0
func (x *BeginUploadRequest) GetWorkspaceId() string
func (*BeginUploadRequest) ProtoMessage ¶ added in v0.4.0
func (*BeginUploadRequest) ProtoMessage()
func (*BeginUploadRequest) ProtoReflect ¶ added in v0.4.0
func (x *BeginUploadRequest) ProtoReflect() protoreflect.Message
func (*BeginUploadRequest) Reset ¶ added in v0.4.0
func (x *BeginUploadRequest) Reset()
func (*BeginUploadRequest) String ¶ added in v0.4.0
func (x *BeginUploadRequest) String() string
type BeginUploadResponse ¶ added in v0.4.0
type BeginUploadResponse struct {
State BlobState `protobuf:"varint,1,opt,name=state,proto3,enum=syncplane.v1.BlobState" json:"state,omitempty"`
// The indexes of the chunks the server does not have yet, in ascending
// order. Empty when `state` is `BLOB_STATE_COMPLETE`.
MissingChunks []uint32 `protobuf:"varint,2,rep,packed,name=missing_chunks,json=missingChunks,proto3" json:"missing_chunks,omitempty"`
// contains filtered or unexported fields
}
func (*BeginUploadResponse) Descriptor
deprecated
added in
v0.4.0
func (*BeginUploadResponse) Descriptor() ([]byte, []int)
Deprecated: Use BeginUploadResponse.ProtoReflect.Descriptor instead.
func (*BeginUploadResponse) GetMissingChunks ¶ added in v0.4.0
func (x *BeginUploadResponse) GetMissingChunks() []uint32
func (*BeginUploadResponse) GetState ¶ added in v0.4.0
func (x *BeginUploadResponse) GetState() BlobState
func (*BeginUploadResponse) ProtoMessage ¶ added in v0.4.0
func (*BeginUploadResponse) ProtoMessage()
func (*BeginUploadResponse) ProtoReflect ¶ added in v0.4.0
func (x *BeginUploadResponse) ProtoReflect() protoreflect.Message
func (*BeginUploadResponse) Reset ¶ added in v0.4.0
func (x *BeginUploadResponse) Reset()
func (*BeginUploadResponse) String ¶ added in v0.4.0
func (x *BeginUploadResponse) String() string
type BlobRef ¶ added in v0.4.0
type BlobRef struct {
// Identifies the content, in the form `sp1:<64 lowercase hex digits>`.
//
// The hex digits are the SHA-256 of the blob's size, as an 8-byte unsigned
// big-endian integer, followed by the SHA-256 of each chunk, in order.
// Every chunk except the last is exactly 8 MiB (8388608 bytes). The last
// chunk holds the remaining bytes. An empty blob has no chunks, so its
// digest is the SHA-256 of eight zero bytes.
Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
// The size of the blob in bytes.
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
// The media type of the bytes, for example `image/png`. The engine does
// not read or check it.
MediaType string `protobuf:"bytes,3,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
// contains filtered or unexported fields
}
Refers from a row to an immutable blob of bytes, such as an image, a PDF or a video.
A field of this type is a blob reference wherever it appears in an entity: at the top level, inside a nested message, inside a repeated field or inside a keyed list. The engine finds such fields by type at registration. A caller that can read a row whose blob reference names a digest can read that blob, unless a field guard hides the field from the caller.
The bytes do not travel with the row. Upload them through `BlobService`. A row can refer to a blob before the upload is complete; a reader then sees the blob as not yet available.
func (*BlobRef) Descriptor
deprecated
added in
v0.4.0
func (*BlobRef) GetMediaType ¶ added in v0.4.0
func (*BlobRef) ProtoMessage ¶ added in v0.4.0
func (*BlobRef) ProtoMessage()
func (*BlobRef) ProtoReflect ¶ added in v0.4.0
func (x *BlobRef) ProtoReflect() protoreflect.Message
type BlobState ¶ added in v0.4.0
type BlobState int32
The state of one blob on the server, as one caller sees it.
const ( BlobState_BLOB_STATE_UNSPECIFIED BlobState = 0 // The server does not have the blob, or the caller cannot read it. BlobState_BLOB_STATE_MISSING BlobState = 1 // An upload has started, but the server does not have every chunk yet. BlobState_BLOB_STATE_UPLOADING BlobState = 2 // The server has every chunk and has checked them against the digest. BlobState_BLOB_STATE_COMPLETE BlobState = 3 )
func (BlobState) Descriptor ¶ added in v0.4.0
func (BlobState) Descriptor() protoreflect.EnumDescriptor
func (BlobState) EnumDescriptor
deprecated
added in
v0.4.0
func (BlobState) Number ¶ added in v0.4.0
func (x BlobState) Number() protoreflect.EnumNumber
func (BlobState) Type ¶ added in v0.4.0
func (BlobState) Type() protoreflect.EnumType
type BlobStatus ¶ added in v0.4.0
type BlobStatus struct {
Digest string `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
State BlobState `protobuf:"varint,2,opt,name=state,proto3,enum=syncplane.v1.BlobState" json:"state,omitempty"`
// The size in bytes. Zero unless `state` is `BLOB_STATE_UPLOADING` or
// `BLOB_STATE_COMPLETE`.
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
// The SHA-256 of each chunk, in order. Set only when `state` is
// `BLOB_STATE_COMPLETE`, so a client can check each chunk it downloads.
ChunkHashes [][]byte `protobuf:"bytes,4,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"`
// contains filtered or unexported fields
}
What a caller can know about one blob.
func (*BlobStatus) Descriptor
deprecated
added in
v0.4.0
func (*BlobStatus) Descriptor() ([]byte, []int)
Deprecated: Use BlobStatus.ProtoReflect.Descriptor instead.
func (*BlobStatus) GetChunkHashes ¶ added in v0.4.0
func (x *BlobStatus) GetChunkHashes() [][]byte
func (*BlobStatus) GetDigest ¶ added in v0.4.0
func (x *BlobStatus) GetDigest() string
func (*BlobStatus) GetSize ¶ added in v0.4.0
func (x *BlobStatus) GetSize() int64
func (*BlobStatus) GetState ¶ added in v0.4.0
func (x *BlobStatus) GetState() BlobState
func (*BlobStatus) ProtoMessage ¶ added in v0.4.0
func (*BlobStatus) ProtoMessage()
func (*BlobStatus) ProtoReflect ¶ added in v0.4.0
func (x *BlobStatus) ProtoReflect() protoreflect.Message
func (*BlobStatus) Reset ¶ added in v0.4.0
func (x *BlobStatus) Reset()
func (*BlobStatus) String ¶ added in v0.4.0
func (x *BlobStatus) String() string
type BootstrapRequest ¶
type BootstrapRequest struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// Scopes the snapshot. An empty list requests a full sync.
Subscriptions []*Subscription `protobuf:"bytes,3,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
// Entities to ship BEFORE the rest, in this order — what the client needs
// on screen first. A snapshot is delivered entity by entity and a cold
// client can read each one as it lands, so the order decides what the user
// looks at while the rest downloads. Names not in scope (unregistered, or
// unsubscribed under `subscriptions`) are ignored; anything unnamed follows
// in the server's own order. Without it a subscribed client is served in
// subscription order and a full-sync client in the server's entity order.
PriorityEntities []string `protobuf:"bytes,4,rep,name=priority_entities,json=priorityEntities,proto3" json:"priority_entities,omitempty"`
// Continues an interrupted snapshot instead of starting a new one. The
// server decides whether it can honour it — a changed subscription set, a
// cursor that has fallen behind the tombstone horizon, or a different store
// all mean a fresh snapshot, reported back as Begin.resumed = false.
Resume *BootstrapResume `protobuf:"bytes,5,opt,name=resume,proto3" json:"resume,omitempty"`
// contains filtered or unexported fields
}
func (*BootstrapRequest) Descriptor
deprecated
func (*BootstrapRequest) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapRequest.ProtoReflect.Descriptor instead.
func (*BootstrapRequest) GetClientId ¶
func (x *BootstrapRequest) GetClientId() string
func (*BootstrapRequest) GetPriorityEntities ¶
func (x *BootstrapRequest) GetPriorityEntities() []string
func (*BootstrapRequest) GetResume ¶
func (x *BootstrapRequest) GetResume() *BootstrapResume
func (*BootstrapRequest) GetSubscriptions ¶
func (x *BootstrapRequest) GetSubscriptions() []*Subscription
func (*BootstrapRequest) GetWorkspaceId ¶
func (x *BootstrapRequest) GetWorkspaceId() string
func (*BootstrapRequest) ProtoMessage ¶
func (*BootstrapRequest) ProtoMessage()
func (*BootstrapRequest) ProtoReflect ¶
func (x *BootstrapRequest) ProtoReflect() protoreflect.Message
func (*BootstrapRequest) Reset ¶
func (x *BootstrapRequest) Reset()
func (*BootstrapRequest) String ¶
func (x *BootstrapRequest) String() string
type BootstrapResponse ¶
type BootstrapResponse struct {
// Types that are valid to be assigned to Body:
//
// *BootstrapResponse_Begin_
// *BootstrapResponse_Chunk_
// *BootstrapResponse_End_
Body isBootstrapResponse_Body `protobuf_oneof:"body"`
// contains filtered or unexported fields
}
func (*BootstrapResponse) Descriptor
deprecated
func (*BootstrapResponse) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapResponse.ProtoReflect.Descriptor instead.
func (*BootstrapResponse) GetBegin ¶
func (x *BootstrapResponse) GetBegin() *BootstrapResponse_Begin
func (*BootstrapResponse) GetBody ¶
func (x *BootstrapResponse) GetBody() isBootstrapResponse_Body
func (*BootstrapResponse) GetChunk ¶
func (x *BootstrapResponse) GetChunk() *BootstrapResponse_Chunk
func (*BootstrapResponse) GetEnd ¶
func (x *BootstrapResponse) GetEnd() *BootstrapResponse_End
func (*BootstrapResponse) ProtoMessage ¶
func (*BootstrapResponse) ProtoMessage()
func (*BootstrapResponse) ProtoReflect ¶
func (x *BootstrapResponse) ProtoReflect() protoreflect.Message
func (*BootstrapResponse) Reset ¶
func (x *BootstrapResponse) Reset()
func (*BootstrapResponse) String ¶
func (x *BootstrapResponse) String() string
type BootstrapResponse_Begin ¶
type BootstrapResponse_Begin struct {
// Cursor capturing the snapshot position; pass to the next Pull.
Cursor []byte `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
LastAckedMutationId uint64 `protobuf:"varint,2,opt,name=last_acked_mutation_id,json=lastAckedMutationId,proto3" json:"last_acked_mutation_id,omitempty"`
// Workspace sequence the cursor captures; see PullResponse.seq.
Seq uint64 `protobuf:"varint,3,opt,name=seq,proto3" json:"seq,omitempty"`
// The server's schema revision at snapshot time.
SchemaRevision string `protobuf:"bytes,4,opt,name=schema_revision,json=schemaRevision,proto3" json:"schema_revision,omitempty"`
// Every entity this snapshot ships rows for, in delivery order. Rows of
// one entity arrive contiguously, so a client reading a row of
// entities[i] knows entities[0..i) shipped in full — which is what lets
// a progressively-applied snapshot say which entities are still
// arriving and which are already whole. An entity with no matching rows
// is still listed (it completes silently when the next one starts).
Entities []string `protobuf:"bytes,5,rep,name=entities,proto3" json:"entities,omitempty"`
// True when the request's `resume` was honoured: the chunks that follow
// are the REST of that snapshot, and `cursor` is the one it began with.
// False means a fresh snapshot — whatever an earlier attempt staged
// belongs to a different one and must be discarded rather than merged.
Resumed bool `protobuf:"varint,6,opt,name=resumed,proto3" json:"resumed,omitempty"`
// What the caller holds in the workspace under the access model, as of
// the snapshot. Absent in a schema without the access model.
CallerAccess *CallerAccess `protobuf:"bytes,7,opt,name=caller_access,json=callerAccess,proto3" json:"caller_access,omitempty"`
// Estimated row count of each entity in `entities`, at the same index:
// row_estimates[i] is about how many rows of entities[i] the snapshot
// ships. Empty means the server gives no estimate, and a client must
// then show the snapshot's size as unknown. A list of another length
// than `entities` is also no estimate.
//
// Each count is the entity's live rows as of Begin. It is an estimate,
// not a bound: rows written or deleted while the snapshot streams can
// make it ship some rows more or fewer. A client must therefore not
// rely on the count to size a buffer or to check the download, and
// must not show progress above 100%. A value of 0 means the entity is
// expected to ship no rows.
//
// The server gives no estimate when the snapshot does not ship every
// live row of the announced entities: when a read filter or the access
// model hides rows from the caller, or when a subscription narrows an
// entity with a predicate, a window, named keys or a follow closure.
// A count would then tell the caller how many rows exist that it may
// not read, and would cost more than the narrowed snapshot.
//
// On a resumed snapshot (`resumed` is true) the list covers the WHOLE
// snapshot again, counted as of this attempt, including the rows the
// earlier attempts delivered. It is not a count of the rest. A client
// that keeps the rows it applied across attempts computes progress as
// applied / total. Keeping the smaller of the totals it was given, and
// raising the total to at least the rows applied, gives progress that
// never goes backwards.
RowEstimates []uint64 `protobuf:"varint,8,rep,packed,name=row_estimates,json=rowEstimates,proto3" json:"row_estimates,omitempty"`
// contains filtered or unexported fields
}
func (*BootstrapResponse_Begin) Descriptor
deprecated
func (*BootstrapResponse_Begin) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapResponse_Begin.ProtoReflect.Descriptor instead.
func (*BootstrapResponse_Begin) GetCallerAccess ¶ added in v0.2.0
func (x *BootstrapResponse_Begin) GetCallerAccess() *CallerAccess
func (*BootstrapResponse_Begin) GetCursor ¶
func (x *BootstrapResponse_Begin) GetCursor() []byte
func (*BootstrapResponse_Begin) GetEntities ¶
func (x *BootstrapResponse_Begin) GetEntities() []string
func (*BootstrapResponse_Begin) GetLastAckedMutationId ¶
func (x *BootstrapResponse_Begin) GetLastAckedMutationId() uint64
func (*BootstrapResponse_Begin) GetResumed ¶
func (x *BootstrapResponse_Begin) GetResumed() bool
func (*BootstrapResponse_Begin) GetRowEstimates ¶ added in v0.7.0
func (x *BootstrapResponse_Begin) GetRowEstimates() []uint64
func (*BootstrapResponse_Begin) GetSchemaRevision ¶
func (x *BootstrapResponse_Begin) GetSchemaRevision() string
func (*BootstrapResponse_Begin) GetSeq ¶
func (x *BootstrapResponse_Begin) GetSeq() uint64
func (*BootstrapResponse_Begin) ProtoMessage ¶
func (*BootstrapResponse_Begin) ProtoMessage()
func (*BootstrapResponse_Begin) ProtoReflect ¶
func (x *BootstrapResponse_Begin) ProtoReflect() protoreflect.Message
func (*BootstrapResponse_Begin) Reset ¶
func (x *BootstrapResponse_Begin) Reset()
func (*BootstrapResponse_Begin) String ¶
func (x *BootstrapResponse_Begin) String() string
type BootstrapResponse_Begin_ ¶
type BootstrapResponse_Begin_ struct {
Begin *BootstrapResponse_Begin `protobuf:"bytes,1,opt,name=begin,proto3,oneof"`
}
type BootstrapResponse_Chunk ¶
type BootstrapResponse_Chunk struct {
Rows []*RowChange `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
// Scan position covering every row delivered through this chunk. A
// client that durably stores the chunk stores this alongside it and
// hands it back in BootstrapResume.token to continue from here. Empty
// from servers that cannot resume, which simply means the next attempt
// starts the snapshot over.
ResumeToken []byte `protobuf:"bytes,2,opt,name=resume_token,json=resumeToken,proto3" json:"resume_token,omitempty"`
// contains filtered or unexported fields
}
func (*BootstrapResponse_Chunk) Descriptor
deprecated
func (*BootstrapResponse_Chunk) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapResponse_Chunk.ProtoReflect.Descriptor instead.
func (*BootstrapResponse_Chunk) GetResumeToken ¶
func (x *BootstrapResponse_Chunk) GetResumeToken() []byte
func (*BootstrapResponse_Chunk) GetRows ¶
func (x *BootstrapResponse_Chunk) GetRows() []*RowChange
func (*BootstrapResponse_Chunk) ProtoMessage ¶
func (*BootstrapResponse_Chunk) ProtoMessage()
func (*BootstrapResponse_Chunk) ProtoReflect ¶
func (x *BootstrapResponse_Chunk) ProtoReflect() protoreflect.Message
func (*BootstrapResponse_Chunk) Reset ¶
func (x *BootstrapResponse_Chunk) Reset()
func (*BootstrapResponse_Chunk) String ¶
func (x *BootstrapResponse_Chunk) String() string
type BootstrapResponse_Chunk_ ¶
type BootstrapResponse_Chunk_ struct {
Chunk *BootstrapResponse_Chunk `protobuf:"bytes,2,opt,name=chunk,proto3,oneof"`
}
type BootstrapResponse_End ¶
type BootstrapResponse_End struct {
// contains filtered or unexported fields
}
func (*BootstrapResponse_End) Descriptor
deprecated
func (*BootstrapResponse_End) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapResponse_End.ProtoReflect.Descriptor instead.
func (*BootstrapResponse_End) ProtoMessage ¶
func (*BootstrapResponse_End) ProtoMessage()
func (*BootstrapResponse_End) ProtoReflect ¶
func (x *BootstrapResponse_End) ProtoReflect() protoreflect.Message
func (*BootstrapResponse_End) Reset ¶
func (x *BootstrapResponse_End) Reset()
func (*BootstrapResponse_End) String ¶
func (x *BootstrapResponse_End) String() string
type BootstrapResponse_End_ ¶
type BootstrapResponse_End_ struct {
End *BootstrapResponse_End `protobuf:"bytes,3,opt,name=end,proto3,oneof"`
}
type BootstrapResume ¶
type BootstrapResume struct {
// The Begin cursor of the interrupted attempt. It identifies WHICH snapshot
// is being continued: the server keeps serving that one and re-issues this
// same cursor on the resumed Begin, so the follow-up Pull still covers
// everything written since it was minted — including rows the earlier
// attempt already delivered.
Cursor []byte `protobuf:"bytes,1,opt,name=cursor,proto3" json:"cursor,omitempty"`
// Scan position from the last Chunk the client durably stored
// (Chunk.resume_token). Carried apart from the cursor because it rides on
// every chunk while the cursor does not: a windowed or following cursor
// holds a bounded key-set that would otherwise be repeated once per chunk.
Token []byte `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
// contains filtered or unexported fields
}
BootstrapResume names an interrupted snapshot and how far it got, so the next attempt continues that snapshot rather than downloading it again. Both fields are opaque to clients: they are stored and echoed back exactly as received.
func (*BootstrapResume) Descriptor
deprecated
func (*BootstrapResume) Descriptor() ([]byte, []int)
Deprecated: Use BootstrapResume.ProtoReflect.Descriptor instead.
func (*BootstrapResume) GetCursor ¶
func (x *BootstrapResume) GetCursor() []byte
func (*BootstrapResume) GetToken ¶
func (x *BootstrapResume) GetToken() []byte
func (*BootstrapResume) ProtoMessage ¶
func (*BootstrapResume) ProtoMessage()
func (*BootstrapResume) ProtoReflect ¶
func (x *BootstrapResume) ProtoReflect() protoreflect.Message
func (*BootstrapResume) Reset ¶
func (x *BootstrapResume) Reset()
func (*BootstrapResume) String ¶
func (x *BootstrapResume) String() string
type CallerAccess ¶ added in v0.2.0
type CallerAccess struct {
// Workspace sequence through which this summary is current.
Seq uint64 `protobuf:"varint,2,opt,name=seq,proto3" json:"seq,omitempty"`
// Subjects of the caller, compared against grant rows and `subject`
// checks. The first element is the primary subject, which a create
// operation stores in each `creator` field. Empty for an anonymous caller.
Subjects []string `protobuf:"bytes,3,rep,name=subjects,proto3" json:"subjects,omitempty"`
// Permissions the caller holds at the workspace root, which cover every
// row. The list is sorted.
RootPermissions []string `protobuf:"bytes,4,rep,name=root_permissions,json=rootPermissions,proto3" json:"root_permissions,omitempty"`
// One group for each distinct set of permissions the caller holds at rows.
// The list is sorted by permission list: compared element by element, with
// a list placed before longer lists that begin with it. A row appears in
// at most one group, which lists all permissions that the caller's grants
// at that row give together.
AnchorGroups []*AnchorGroup `protobuf:"bytes,5,rep,name=anchor_groups,json=anchorGroups,proto3" json:"anchor_groups,omitempty"`
// Identifies the content of this summary. Equal summaries have equal
// versions, regardless of their seq. Never 0 in a summary from the server.
Version uint64 `protobuf:"fixed64,6,opt,name=version,proto3" json:"version,omitempty"`
// Maximum number of access parent hops the server follows up from a row:
// its MaxAccessDepth. A permission held at a row further up does not apply
// to the row. 0 from a server that does not send it; clients then assume
// 32, the default.
MaxAccessDepth uint32 `protobuf:"varint,7,opt,name=max_access_depth,json=maxAccessDepth,proto3" json:"max_access_depth,omitempty"`
// contains filtered or unexported fields
}
Summary of permissions held by one caller in one workspace under the access model. Lists permissions held at the workspace root, and rows where the caller holds permissions grouped by the permissions held there.
The caller holds a permission at a row when root_permissions lists it, or when an anchor group that lists the row lists it. A permission held at a row applies to that row and to every row whose access parent points at it. A permission not named in any list is not held anywhere.
Every list except subjects is sorted and contains no duplicates, so equal access has one encoding, apart from seq and version.
This summary is advisory. The server decides every read and every write itself. A client uses this summary to predict server decisions, for example to hide a control the caller cannot use.
func (*CallerAccess) Descriptor
deprecated
added in
v0.2.0
func (*CallerAccess) Descriptor() ([]byte, []int)
Deprecated: Use CallerAccess.ProtoReflect.Descriptor instead.
func (*CallerAccess) GetAnchorGroups ¶ added in v0.2.0
func (x *CallerAccess) GetAnchorGroups() []*AnchorGroup
func (*CallerAccess) GetMaxAccessDepth ¶ added in v0.2.0
func (x *CallerAccess) GetMaxAccessDepth() uint32
func (*CallerAccess) GetRootPermissions ¶ added in v0.2.0
func (x *CallerAccess) GetRootPermissions() []string
func (*CallerAccess) GetSeq ¶ added in v0.2.0
func (x *CallerAccess) GetSeq() uint64
func (*CallerAccess) GetSubjects ¶ added in v0.2.0
func (x *CallerAccess) GetSubjects() []string
func (*CallerAccess) GetVersion ¶ added in v0.2.0
func (x *CallerAccess) GetVersion() uint64
func (*CallerAccess) ProtoMessage ¶ added in v0.2.0
func (*CallerAccess) ProtoMessage()
func (*CallerAccess) ProtoReflect ¶ added in v0.2.0
func (x *CallerAccess) ProtoReflect() protoreflect.Message
func (*CallerAccess) Reset ¶ added in v0.2.0
func (x *CallerAccess) Reset()
func (*CallerAccess) String ¶ added in v0.2.0
func (x *CallerAccess) String() string
type CallerAccessDelta ¶ added in v0.2.0
type CallerAccessDelta struct {
// The workspace sequence that the new summary is current through.
Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
// The summary version that the delta applies to.
BaseVersion uint64 `protobuf:"fixed64,2,opt,name=base_version,json=baseVersion,proto3" json:"base_version,omitempty"`
// The summary version that results from applying the delta.
Version uint64 `protobuf:"fixed64,3,opt,name=version,proto3" json:"version,omitempty"`
// The rows with changed permissions and rows where the caller holds
// permissions for the first time. Each row includes all permissions
// currently held at that row. Ordered and grouped as in
// CallerAccess.anchor_groups.
AnchorGroups []*AnchorGroup `protobuf:"bytes,4,rep,name=anchor_groups,json=anchorGroups,proto3" json:"anchor_groups,omitempty"`
// The rows that are in no group in the new summary. Sorted by entity.
Removed []*AnchorRows `protobuf:"bytes,5,rep,name=removed,proto3" json:"removed,omitempty"`
// contains filtered or unexported fields
}
Updates a CallerAccess summary from base_version to version. The subjects, root_permissions, and max_access_depth fields do not change.
To apply the delta:
- Move each row listed in anchor_groups into the group with the specified permissions, and remove the row from its previous group.
- Remove each row listed in removed from all groups.
- Remove groups that contain no rows.
Do not apply this delta if the summary version does not match base_version. If the summary already has version, the delta changes nothing. Otherwise, keep the current summary and pull again with PullRequest.caller_access_version to receive the delta from that version.
func (*CallerAccessDelta) Descriptor
deprecated
added in
v0.2.0
func (*CallerAccessDelta) Descriptor() ([]byte, []int)
Deprecated: Use CallerAccessDelta.ProtoReflect.Descriptor instead.
func (*CallerAccessDelta) GetAnchorGroups ¶ added in v0.2.0
func (x *CallerAccessDelta) GetAnchorGroups() []*AnchorGroup
func (*CallerAccessDelta) GetBaseVersion ¶ added in v0.2.0
func (x *CallerAccessDelta) GetBaseVersion() uint64
func (*CallerAccessDelta) GetRemoved ¶ added in v0.2.0
func (x *CallerAccessDelta) GetRemoved() []*AnchorRows
func (*CallerAccessDelta) GetSeq ¶ added in v0.2.0
func (x *CallerAccessDelta) GetSeq() uint64
func (*CallerAccessDelta) GetVersion ¶ added in v0.2.0
func (x *CallerAccessDelta) GetVersion() uint64
func (*CallerAccessDelta) ProtoMessage ¶ added in v0.2.0
func (*CallerAccessDelta) ProtoMessage()
func (*CallerAccessDelta) ProtoReflect ¶ added in v0.2.0
func (x *CallerAccessDelta) ProtoReflect() protoreflect.Message
func (*CallerAccessDelta) Reset ¶ added in v0.2.0
func (x *CallerAccessDelta) Reset()
func (*CallerAccessDelta) String ¶ added in v0.2.0
func (x *CallerAccessDelta) String() string
type CmpCond ¶
type CmpCond struct {
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
Op CmpOp `protobuf:"varint,2,opt,name=op,proto3,enum=syncplane.v1.CmpOp" json:"op,omitempty"`
Value *QueryValue `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*CmpCond) Descriptor
deprecated
func (*CmpCond) GetValue ¶
func (x *CmpCond) GetValue() *QueryValue
func (*CmpCond) ProtoMessage ¶
func (*CmpCond) ProtoMessage()
func (*CmpCond) ProtoReflect ¶
func (x *CmpCond) ProtoReflect() protoreflect.Message
type CmpOp ¶
type CmpOp int32
func (CmpOp) Descriptor ¶
func (CmpOp) Descriptor() protoreflect.EnumDescriptor
func (CmpOp) EnumDescriptor
deprecated
func (CmpOp) Number ¶
func (x CmpOp) Number() protoreflect.EnumNumber
func (CmpOp) Type ¶
func (CmpOp) Type() protoreflect.EnumType
type Condition ¶
type Condition struct {
// Types that are valid to be assigned to Kind:
//
// *Condition_Cmp
// *Condition_In
// *Condition_Str
// *Condition_Rep
// *Condition_Present
// *Condition_And
// *Condition_Or
// *Condition_Not
// *Condition_Exists
// *Condition_Rel
// *Condition_Match
Kind isCondition_Kind `protobuf_oneof:"kind"`
// contains filtered or unexported fields
}
func (*Condition) Descriptor
deprecated
func (*Condition) GetAnd ¶
func (x *Condition) GetAnd() *ConditionList
func (*Condition) GetExists ¶
func (x *Condition) GetExists() *ExistsCond
func (*Condition) GetOr ¶
func (x *Condition) GetOr() *ConditionList
func (*Condition) GetPresent ¶
func (x *Condition) GetPresent() *PresentCond
func (*Condition) ProtoMessage ¶
func (*Condition) ProtoMessage()
func (*Condition) ProtoReflect ¶
func (x *Condition) ProtoReflect() protoreflect.Message
type ConditionList ¶
type ConditionList struct {
Conds []*Condition `protobuf:"bytes,1,rep,name=conds,proto3" json:"conds,omitempty"`
// contains filtered or unexported fields
}
func (*ConditionList) Descriptor
deprecated
func (*ConditionList) Descriptor() ([]byte, []int)
Deprecated: Use ConditionList.ProtoReflect.Descriptor instead.
func (*ConditionList) GetConds ¶
func (x *ConditionList) GetConds() []*Condition
func (*ConditionList) ProtoMessage ¶
func (*ConditionList) ProtoMessage()
func (*ConditionList) ProtoReflect ¶
func (x *ConditionList) ProtoReflect() protoreflect.Message
func (*ConditionList) Reset ¶
func (x *ConditionList) Reset()
func (*ConditionList) String ¶
func (x *ConditionList) String() string
type Condition_And ¶
type Condition_And struct {
And *ConditionList `protobuf:"bytes,6,opt,name=and,proto3,oneof"`
}
type Condition_Cmp ¶
type Condition_Cmp struct {
Cmp *CmpCond `protobuf:"bytes,1,opt,name=cmp,proto3,oneof"`
}
type Condition_Exists ¶
type Condition_Exists struct {
Exists *ExistsCond `protobuf:"bytes,9,opt,name=exists,proto3,oneof"`
}
type Condition_In ¶
type Condition_In struct {
In *InCond `protobuf:"bytes,2,opt,name=in,proto3,oneof"`
}
type Condition_Match ¶
type Condition_Match struct {
Match *MatchCond `protobuf:"bytes,11,opt,name=match,proto3,oneof"`
}
type Condition_Not ¶
type Condition_Not struct {
Not *Condition `protobuf:"bytes,8,opt,name=not,proto3,oneof"`
}
type Condition_Or ¶
type Condition_Or struct {
Or *ConditionList `protobuf:"bytes,7,opt,name=or,proto3,oneof"`
}
type Condition_Present ¶
type Condition_Present struct {
Present *PresentCond `protobuf:"bytes,5,opt,name=present,proto3,oneof"`
}
type Condition_Rel ¶
type Condition_Rel struct {
Rel *RelCond `protobuf:"bytes,10,opt,name=rel,proto3,oneof"`
}
type Condition_Rep ¶
type Condition_Rep struct {
Rep *RepCond `protobuf:"bytes,4,opt,name=rep,proto3,oneof"`
}
type Condition_Str ¶
type Condition_Str struct {
Str *StrCond `protobuf:"bytes,3,opt,name=str,proto3,oneof"`
}
type CreatorOptions ¶ added in v0.2.0
type CreatorOptions struct {
// contains filtered or unexported fields
}
Marks a field that records who created the row.
On a create that is not trusted, the server stores the caller's primary subject in the field, whatever value the write carries: the first subject the server maps the caller to, or an empty value for an anonymous caller. After the create, a write that is not trusted cannot change the field: a `PATCH` whose mask names it fails, and a `PUT` keeps the stored value. A trusted write stores the value it carries.
The field is a top-level, singular `string` field outside any `oneof`. It cannot be a key field or be named by a `FieldGuard`.
Registration refuses unknown fields inside this message.
func (*CreatorOptions) Descriptor
deprecated
added in
v0.2.0
func (*CreatorOptions) Descriptor() ([]byte, []int)
Deprecated: Use CreatorOptions.ProtoReflect.Descriptor instead.
func (*CreatorOptions) ProtoMessage ¶ added in v0.2.0
func (*CreatorOptions) ProtoMessage()
func (*CreatorOptions) ProtoReflect ¶ added in v0.2.0
func (x *CreatorOptions) ProtoReflect() protoreflect.Message
func (*CreatorOptions) Reset ¶ added in v0.2.0
func (x *CreatorOptions) Reset()
func (*CreatorOptions) String ¶ added in v0.2.0
func (x *CreatorOptions) String() string
type CrudMutation ¶
type CrudMutation struct {
// Target entity declared in `EntityOptions`.
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// Row key derived from `EntityOptions.key_fields`.
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// Operation to execute.
Op CrudOp `protobuf:"varint,3,opt,name=op,proto3,enum=syncplane.v1.CrudOp" json:"op,omitempty"`
// Serialized entity message. Leave empty for `CRUD_OP_DELETE`. For
// `CRUD_OP_PATCH`, the server reads only the fields named in `field_mask`.
//
// A collaborative-text field (`FieldBehavior.text`) named directly in a
// `PATCH` field mask may carry a delta-state fragment instead of the
// complete document. This fragment contains only the changes the client
// holds beyond the state that the server last confirmed to that client. If
// the server cannot apply the fragment, it rejects the mutation with
// `text_full_state_required`, and the client must resend the complete
// document. The server always accepts full state. The server rejects delta
// state in all other cases, including `CRUD_OP_PUT` and fields omitted
// from `field_mask`.
Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
// Specifies fields to merge for a `CRUD_OP_PATCH` operation with
// last-write-wins (LWW) resolution.
//
// For a `CRUD_OP_PUT`, optionally names the units the PUT replaces: a
// top-level field outside a oneof, or a oneof by its name. Every other
// unit keeps the stored value, or stays unset when the PUT creates the
// row. Key fields are always written and may be left out. The server
// refuses with `invalid_argument` a path that names no such unit, and
// refuses a path that names a field the caller may not write, as it
// refuses such a PATCH. Without a mask, a PUT replaces every unit (see
// `CrudOp`). A server that forwards writes to another server sends a PUT
// with the units the original caller may write, so the other server
// keeps the fields that caller could not change. Unset for DELETE.
FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,5,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"`
// Optional compare-and-swap guard. When set, the server applies this
// mutation only if the target row version matches this value. If the
// versions do not match, the server rejects the mutation with `conflict`.
// On rejection, the client rolls back the optimistic edit and triggers
// `onMutationRejected`.
//
// The version corresponds to the workspace sequence that last wrote the
// row (`RowChange.version`, exposed on the client as `Row.version`). An
// absent or deleted row has version `0`. Setting `expected_version` to `0`
// applies the mutation only if the row does not exist. Use this field to
// opt out of per-field last-write-wins (LWW) resolution to detect
// concurrent edits instead of merging them.
ExpectedVersion *uint64 `protobuf:"varint,6,opt,name=expected_version,json=expectedVersion,proto3,oneof" json:"expected_version,omitempty"`
// contains filtered or unexported fields
}
Generated CRUD write operation against a registered entity.
The server linearizes mutations per workspace. Applying `PATCH` field masks in sequence order provides per-field last-write-wins (LWW) semantics.
func (*CrudMutation) Descriptor
deprecated
func (*CrudMutation) Descriptor() ([]byte, []int)
Deprecated: Use CrudMutation.ProtoReflect.Descriptor instead.
func (*CrudMutation) GetEntity ¶
func (x *CrudMutation) GetEntity() string
func (*CrudMutation) GetExpectedVersion ¶
func (x *CrudMutation) GetExpectedVersion() uint64
func (*CrudMutation) GetFieldMask ¶
func (x *CrudMutation) GetFieldMask() *fieldmaskpb.FieldMask
func (*CrudMutation) GetKey ¶
func (x *CrudMutation) GetKey() string
func (*CrudMutation) GetOp ¶
func (x *CrudMutation) GetOp() CrudOp
func (*CrudMutation) GetValue ¶
func (x *CrudMutation) GetValue() []byte
func (*CrudMutation) ProtoMessage ¶
func (*CrudMutation) ProtoMessage()
func (*CrudMutation) ProtoReflect ¶
func (x *CrudMutation) ProtoReflect() protoreflect.Message
func (*CrudMutation) Reset ¶
func (x *CrudMutation) Reset()
func (*CrudMutation) String ¶
func (x *CrudMutation) String() string
type CrudOp ¶
type CrudOp int32
Specifies the type of CRUD write operation.
const ( // Default value. This value is unused and reserved to detect uninitialized // fields. CrudOp_CRUD_OP_UNSPECIFIED CrudOp = 0 // Creates or replaces an entire entity. CrudOp_CRUD_OP_PUT CrudOp = 1 // Updates specific fields in an entity using a field mask. CrudOp_CRUD_OP_PATCH CrudOp = 2 // Deletes an entity by its key. CrudOp_CRUD_OP_DELETE CrudOp = 3 )
func (CrudOp) Descriptor ¶
func (CrudOp) Descriptor() protoreflect.EnumDescriptor
func (CrudOp) EnumDescriptor
deprecated
func (CrudOp) Number ¶
func (x CrudOp) Number() protoreflect.EnumNumber
func (CrudOp) Type ¶
func (CrudOp) Type() protoreflect.EnumType
type CustomMutation ¶
type CustomMutation struct {
// Registered identifier of the custom mutator to invoke.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Serialized payload for the custom mutator.
Args *anypb.Any `protobuf:"bytes,2,opt,name=args,proto3" json:"args,omitempty"`
// contains filtered or unexported fields
}
Invokes a named mutator registered on the server. Clients may run a best-effort local mirror for optimistic updates. The server is authoritative, and any divergence resolves during a rebase.
func (*CustomMutation) Descriptor
deprecated
func (*CustomMutation) Descriptor() ([]byte, []int)
Deprecated: Use CustomMutation.ProtoReflect.Descriptor instead.
func (*CustomMutation) GetArgs ¶
func (x *CustomMutation) GetArgs() *anypb.Any
func (*CustomMutation) GetName ¶
func (x *CustomMutation) GetName() string
func (*CustomMutation) ProtoMessage ¶
func (*CustomMutation) ProtoMessage()
func (*CustomMutation) ProtoReflect ¶
func (x *CustomMutation) ProtoReflect() protoreflect.Message
func (*CustomMutation) Reset ¶
func (x *CustomMutation) Reset()
func (*CustomMutation) String ¶
func (x *CustomMutation) String() string
type Direction ¶
type Direction int32
func (Direction) Descriptor ¶
func (Direction) Descriptor() protoreflect.EnumDescriptor
func (Direction) EnumDescriptor
deprecated
func (Direction) Number ¶
func (x Direction) Number() protoreflect.EnumNumber
func (Direction) Type ¶
func (Direction) Type() protoreflect.EnumType
type EntityOptions ¶
type EntityOptions struct {
// The logical entity name used on the wire and in storage, for example
// `"todo"`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The field names whose values form the row key, in order.
KeyFields []string `protobuf:"bytes,2,rep,name=key_fields,json=keyFields,proto3" json:"key_fields,omitempty"`
// Composite secondary indexes over the fields of this entity.
//
// Declare a composite index when a query filters on one field and orders
// by another. A single-field index serves that query only by scanning the
// sort order and rechecking candidate rows.
//
// Secondary indexes do not change request or response payloads, and
// queries return identical rows in identical order with or without an
// index. Adding or removing an index is not a breaking change.
//
// Writes to this entity re-encode and update the row position in every
// declared index.
Index []*IndexSpec `protobuf:"bytes,3,rep,name=index,proto3" json:"index,omitempty"`
// Specifies whether rows of this entity stay on the server only.
//
// When `true`, rows are never bootstrapped, pulled, or streamed to
// clients. Client mutations and subscriptions that name this entity fail.
//
// Server-side reads, including the `Query` RPC, in-process view APIs, and
// mutators, can still access the entity.
ServerOnly bool `protobuf:"varint,5,opt,name=server_only,json=serverOnly,proto3" json:"server_only,omitempty"`
// Configures append-only history tracking for field changes on this
// entity.
//
// See `HistoryOptions`.
History *HistoryOptions `protobuf:"bytes,6,opt,name=history,proto3" json:"history,omitempty"`
// Configures full-text search over the fields of this entity.
//
// Fields marked with `(syncplane.v1.field_behavior).searchable` are
// indexed first in field order, followed by the fields declared in this
// search specification. See `SearchSpec`.
Search *SearchSpec `protobuf:"bytes,9,opt,name=search,proto3" json:"search,omitempty"`
// Declares who can read and write the rows of this entity in the access
// model.
//
// A schema uses the access model when any of its entities declares
// `access` or `grant`. An entity in such a schema that declares no
// `access` is outside the model: every caller admitted to the workspace
// reads and writes its rows, and no rule or access parent applies to
// them. A server built with `WithStrictAccess` refuses such an entity.
// See `AccessOptions`.
Access *AccessOptions `protobuf:"bytes,10,opt,name=access,proto3" json:"access,omitempty"`
// Declares the rows of this entity as grant rows: each row gives one
// subject one role at the row's anchor.
//
// A grant entity must also declare `access`. See `GrantOptions`.
Grant *GrantOptions `protobuf:"bytes,11,opt,name=grant,proto3" json:"grant,omitempty"`
// Declares the rows of this entity as teams: a grant row can name a row of
// this entity as its subject, and then grants to every member of that row.
//
// See `MembersOptions`.
Members *MembersOptions `protobuf:"bytes,12,opt,name=members,proto3" json:"members,omitempty"`
// contains filtered or unexported fields
}
Declares a message as a syncable entity.
func (*EntityOptions) Descriptor
deprecated
func (*EntityOptions) Descriptor() ([]byte, []int)
Deprecated: Use EntityOptions.ProtoReflect.Descriptor instead.
func (*EntityOptions) GetAccess ¶ added in v0.2.0
func (x *EntityOptions) GetAccess() *AccessOptions
func (*EntityOptions) GetGrant ¶ added in v0.2.0
func (x *EntityOptions) GetGrant() *GrantOptions
func (*EntityOptions) GetHistory ¶
func (x *EntityOptions) GetHistory() *HistoryOptions
func (*EntityOptions) GetIndex ¶
func (x *EntityOptions) GetIndex() []*IndexSpec
func (*EntityOptions) GetKeyFields ¶
func (x *EntityOptions) GetKeyFields() []string
func (*EntityOptions) GetMembers ¶ added in v0.2.0
func (x *EntityOptions) GetMembers() *MembersOptions
func (*EntityOptions) GetName ¶
func (x *EntityOptions) GetName() string
func (*EntityOptions) GetSearch ¶
func (x *EntityOptions) GetSearch() *SearchSpec
func (*EntityOptions) GetServerOnly ¶
func (x *EntityOptions) GetServerOnly() bool
func (*EntityOptions) ProtoMessage ¶
func (*EntityOptions) ProtoMessage()
func (*EntityOptions) ProtoReflect ¶
func (x *EntityOptions) ProtoReflect() protoreflect.Message
func (*EntityOptions) Reset ¶
func (x *EntityOptions) Reset()
func (*EntityOptions) String ¶
func (x *EntityOptions) String() string
type ExistsCond ¶
type ExistsCond struct {
// Specifies the path from the row to a repeated message field or a map.
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
// Defines the condition to evaluate against each element, or against each
// entry in a map.
//
// Paths in this condition are relative to the element. Evaluates to
// `false` if the collection is empty.
Cond *Condition `protobuf:"bytes,2,opt,name=cond,proto3" json:"cond,omitempty"`
// contains filtered or unexported fields
}
Matches a row when at least one element of a collection satisfies `cond`.
This condition is the only way to query the contents of message elements. It is also the only condition whose subpaths are relative to an element rather than the row: paths in `cond` resolve against the element itself. For example, a `path` of `["assignees"]` combined with a `cond` path of `["id"]` evaluates as 'some assignee's id'.
The element scope is explicit to preserve correlation between conditions. Distributing the quantifier across separate conditions—reading a bare path as 'some element'—would make `and(items.sku == "A", items.qty > 3)` mean 'some item has SKU A and some (possibly different) item has quantity > 3'. Once conditions are split, they no longer record that they apply to the same element.
Two types of collections support element queries:
- A repeated message field, where the element is the message.
- A map, where the element is an entry. An entry uses the field names `key` and `value`, matching the index component `*` selector. For example, `["custom"]` with `and(key == "priority", value.number == 5)` means 'some custom field named priority holds 5'. A subcondition on `value` alone means 'some custom field holds 5'.
The map form evaluates queries across keys (such as 'which field holds X'). Addressing an entry directly by key (`["custom", "priority", "number"]`) answers 'does this specific field hold X'. This condition is a predicate, not a projection: it indicates whether an entry matched, but does not return which entry matched. If your application needs the key name, read it from the map on the row.
func (*ExistsCond) Descriptor
deprecated
func (*ExistsCond) Descriptor() ([]byte, []int)
Deprecated: Use ExistsCond.ProtoReflect.Descriptor instead.
func (*ExistsCond) GetCond ¶
func (x *ExistsCond) GetCond() *Condition
func (*ExistsCond) GetPath ¶
func (x *ExistsCond) GetPath() []string
func (*ExistsCond) ProtoMessage ¶
func (*ExistsCond) ProtoMessage()
func (*ExistsCond) ProtoReflect ¶
func (x *ExistsCond) ProtoReflect() protoreflect.Message
func (*ExistsCond) Reset ¶
func (x *ExistsCond) Reset()
func (*ExistsCond) String ¶
func (x *ExistsCond) String() string
type FieldBehavior ¶
type FieldBehavior struct {
// Specifies that the field is replaced as a whole value rather than merged
// structurally.
//
// Use this for Conflict-free Replicated Data Type (CRDT) blobs or any list
// or field that must be treated as a single atomic value, such as
// order-sensitive or duplicate-bearing lists.
Opaque bool `protobuf:"varint,1,opt,name=opaque,proto3" json:"opaque,omitempty"`
// Specifies the identity field names for elements in a list of messages.
//
// Supports composite keys. When empty and the element type is a registered
// entity, defaults to `EntityOptions.key_fields`. Ignored for maps (which
// are keyed by map key) and scalar lists (which are keyed by value).
KeyField []string `protobuf:"bytes,2,rep,name=key_field,json=keyField,proto3" json:"key_field,omitempty"`
// Names the position field on list elements used to order a keyed list.
//
// The framework manages this field as a fractional index to support
// movable list elements. Requires a keyed message list.
OrderField string `protobuf:"bytes,3,opt,name=order_field,json=orderField,proto3" json:"order_field,omitempty"`
// Specifies that the field stores collaborative text with convergent
// editing, marks, and anchors.
//
// Requires a singular `bytes` field and implies `opaque = true`. The
// engine automatically merges concurrent `PATCH` operations without
// interleaving characters. Incompatible with `key_field` and
// `order_field`.
//
// The field path may traverse keyed message lists and message-valued maps,
// giving each element its own document. This option cannot be used inside
// a `oneof` or an unkeyed repeated element.
Text bool `protobuf:"varint,4,opt,name=text,proto3" json:"text,omitempty"`
// Maintains a single-field secondary index over this field to speed up
// filtering and ordering.
//
// To filter by one field and order by a different field, declare an index
// in `EntityOptions.index` instead. This option is not supported on
// collaborative text fields; use `SearchSpec` for text search. See
// `sparse_index` for an index that leaves out the rows that do not set the
// field.
Indexed bool `protobuf:"varint,5,opt,name=indexed,proto3" json:"indexed,omitempty"`
// Makes the index that `indexed` maintains hold an entry only for a row
// that sets the field.
//
// A field with implicit presence counts as not set when it holds its zero
// value: the empty string, 0, false or the zero enum value. A field with
// explicit presence (`optional`, or a member of a `oneof`) counts as not
// set when it has no value; a zero value that the row sets has an entry.
//
// A query uses the index only when every row it reads has an entry. An
// equality on a value that is set, `!=` against the empty string or
// false, and a range that excludes the zero value use it. An equality on
// the zero value, a range that includes it, `isNotSet`, `isSet` on a field
// with implicit presence, and an ordering or a grouping by the field with
// no filter that excludes the zero value read every row, unless another
// index serves them.
//
// Requires `indexed` on a singular field. Registration fails when it is
// set without `indexed`, or on a repeated field.
SparseIndex bool `protobuf:"varint,13,opt,name=sparse_index,json=sparseIndex,proto3" json:"sparse_index,omitempty"`
// Includes this field in append-only history tracking.
//
// Key fields are never recorded in a history row's mask however they
// are marked, because a PATCH may not change one and a restore built
// from a mask naming one would be refused. The prior value still
// carries them, so a decoded history entry always says which row it
// belongs to. Marking any member of a `oneof` tracks the entire
// `oneof` group. Ignored if the entity does not enable
// `EntityOptions.history`.
History bool `protobuf:"varint,6,opt,name=history,proto3" json:"history,omitempty"`
// Includes this field in full-text search.
//
// Fields marked with this option are evaluated before fields listed in
// `EntityOptions.search`, in field declaration order. Requires a singular
// string or collaborative text field. See `SearchSpec`.
Searchable bool `protobuf:"varint,7,opt,name=searchable,proto3" json:"searchable,omitempty"`
// Identifies the workspace field within a reference message.
//
// Marks a singular string field in a message with
// `(syncplane.v1.reference)` that stores the target workspace identifier.
// An empty value defaults to the holder's workspace. Each reference
// message can contain at most one workspace field. See `ReferenceOptions`.
Workspace bool `protobuf:"varint,9,opt,name=workspace,proto3" json:"workspace,omitempty"`
// Names the reverse relation that this reference adds to its target
// entity.
//
// The reverse relation lists the rows of this entity that point at one
// target row. A `follow` segment, an `include` key and the client's
// `refs` accessor on the target entity use its name. When empty, the
// name is the plural of this entity's name and this field's name in
// camelCase, joined by `By`: `issuesByAssignee` for the `assignee`
// field of the `issue` entity. The name never depends on other fields,
// so adding a reference does not rename an existing one.
//
// Two reverse relations on one target entity must have different
// names, and a name must not be the name of a reference field of the
// target. On a clash, the client refuses the schema when it starts and
// the server refuses each request that follows a relation.
//
// The name must start with a letter or an underscore, followed by
// letters, digits and underscores. Valid only on a reference field
// declared directly on an entity, including a member of a `oneof`. A
// field that holds a polymorphic reference message gives its name to
// the reverse relation of every case.
ReverseRelation string `protobuf:"bytes,10,opt,name=reverse_relation,json=reverseRelation,proto3" json:"reverse_relation,omitempty"`
// Stores the subject of the caller who creates the row. See
// `CreatorOptions`.
Creator *CreatorOptions `protobuf:"bytes,12,opt,name=creator,proto3" json:"creator,omitempty"`
// contains filtered or unexported fields
}
Configures merge, indexing, and authorization behavior for a field.
func (*FieldBehavior) Descriptor
deprecated
func (*FieldBehavior) Descriptor() ([]byte, []int)
Deprecated: Use FieldBehavior.ProtoReflect.Descriptor instead.
func (*FieldBehavior) GetCreator ¶ added in v0.2.0
func (x *FieldBehavior) GetCreator() *CreatorOptions
func (*FieldBehavior) GetHistory ¶
func (x *FieldBehavior) GetHistory() bool
func (*FieldBehavior) GetIndexed ¶
func (x *FieldBehavior) GetIndexed() bool
func (*FieldBehavior) GetKeyField ¶
func (x *FieldBehavior) GetKeyField() []string
func (*FieldBehavior) GetOpaque ¶
func (x *FieldBehavior) GetOpaque() bool
func (*FieldBehavior) GetOrderField ¶
func (x *FieldBehavior) GetOrderField() string
func (*FieldBehavior) GetReverseRelation ¶
func (x *FieldBehavior) GetReverseRelation() string
func (*FieldBehavior) GetSearchable ¶
func (x *FieldBehavior) GetSearchable() bool
func (*FieldBehavior) GetSparseIndex ¶ added in v0.10.0
func (x *FieldBehavior) GetSparseIndex() bool
func (*FieldBehavior) GetText ¶
func (x *FieldBehavior) GetText() bool
func (*FieldBehavior) GetWorkspace ¶
func (x *FieldBehavior) GetWorkspace() bool
func (*FieldBehavior) ProtoMessage ¶
func (*FieldBehavior) ProtoMessage()
func (*FieldBehavior) ProtoReflect ¶
func (x *FieldBehavior) ProtoReflect() protoreflect.Message
func (*FieldBehavior) Reset ¶
func (x *FieldBehavior) Reset()
func (*FieldBehavior) String ¶
func (x *FieldBehavior) String() string
type FieldDelta ¶
type FieldDelta struct {
// The dotted path of the document. This path is the Protocol Buffers path
// for a field on a singular chain. When the path crosses a keyed message
// list or map, the element key is inserted into the path, such as
// `notes.<key>.body`. This format matches a `PATCH` field mask, with one
// entry per element.
Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"`
// The text delta-state fragment in format version `0x02` to apply to the
// confirmed bytes of the field. An empty value indicates that the field
// did not change over the span and you keep the existing state. The field
// is always cleared in `RowChange.value`.
Fragment []byte `protobuf:"bytes,2,opt,name=fragment,proto3" json:"fragment,omitempty"`
// contains filtered or unexported fields
}
FieldDelta carries one collaborative-text document of a RowChange as delta state instead of as part of the row snapshot. `field` is the document's dotted path: the proto path for a field on a singular chain, with the element key inserted where the path crosses a keyed message list or map ("notes.<key>.body") — the same form a PATCH field mask addresses the document by, one entry per element.
`fragment` is a text delta-state fragment (format version 0x02) to apply to the field's CONFIRMED bytes; empty means the field did not change over the span and the recipient keeps what it already holds. Either way the field is cleared in RowChange.value, so a row whose document dwarfs its other fields no longer re-ships the document on every unrelated write.
func (*FieldDelta) Descriptor
deprecated
func (*FieldDelta) Descriptor() ([]byte, []int)
Deprecated: Use FieldDelta.ProtoReflect.Descriptor instead.
func (*FieldDelta) GetField ¶
func (x *FieldDelta) GetField() string
func (*FieldDelta) GetFragment ¶
func (x *FieldDelta) GetFragment() []byte
func (*FieldDelta) ProtoMessage ¶
func (*FieldDelta) ProtoMessage()
func (*FieldDelta) ProtoReflect ¶
func (x *FieldDelta) ProtoReflect() protoreflect.Message
func (*FieldDelta) Reset ¶
func (x *FieldDelta) Reset()
func (*FieldDelta) String ¶
func (x *FieldDelta) String() string
type FieldGuard ¶ added in v0.2.0
type FieldGuard struct {
// The fields the guard restricts. Each entry names a top-level field
// outside any `oneof`, or a `oneof`, which the guard restricts as one
// field.
Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
// The rules. A rule names `read`, `create`, `update` or `write`, which
// admits `create` and `update`.
Allow []*AccessRule `protobuf:"bytes,2,rep,name=allow,proto3" json:"allow,omitempty"`
// contains filtered or unexported fields
}
Restricts who can read and who can write a set of fields of an entity.
A caller reads a guarded field of a row when a rule in `allow` of the entity admits reading the row, and a rule of the guard that names `read` admits reading the row too. A guard without a read rule hides its fields from every client. A read rule of a guard admits a caller as a read rule of the entity does: its source holds for the caller where the row sits, and every check it sets holds on the row.
The server clears each field a caller may not read before it sends the row, and names the field in `RowChange.hidden`. Sync, `Query` and the field history all apply the same rule. A guard decides per row, so a check on the row can hide a field on some rows and show it on others. A change of the caller's grants that shows or hides a field sends the row again.
A `Query`, a subscription predicate, a window, a follow path or a facet that names a field fails with `PermissionDenied` unless the caller reads that field on every row it reads: a read rule of the guard that needs no permission and sets no check, or whose permission the caller holds at the workspace root. So does a search condition when the guard restricts a search field.
A write that sets a guarded field needs a rule in `allow` of the entity that admits the write, and a rule of the guard that admits the field operation: `create` for the value a create stores, `update` for a change of a row that exists. A rule of the guard admits an operation as a rule of the entity does: its source holds for the caller where the row sits, and every check it sets holds on the row as it will be stored and, for an update, on the stored row. A field operation that no rule of the guard admits is open only to trusted writes.
A write the guard does not admit for the caller:
- a `PATCH` whose mask names a guarded field fails with `access_denied`; - a `PUT` that updates a row keeps the stored value of each guarded field; - a `PUT` that creates a row stores the zero value in each guarded field.
Reading and writing are separate. A caller can write a field it may not read: a `PATCH` whose mask names the field sets it, and a `PUT` that updates a row keeps the stored value of each field the caller may not read on the stored row when the `PUT` leaves it unset.
A total that only server code computes, a status that only managers set, and a salary that only HR reads and writes:
```protobuf
access: {
allow: [
{ read: true requires: "view_orders" },
{ write: true requires: "edit_orders" }
]
guard: [
{ fields: ["total"] allow: [{ read: true admitted: {} }] },
{ fields: ["status"] allow: [
{ read: true admitted: {} },
{ write: true requires: "manage_orders" }
] },
{ fields: ["salary"] allow: [
{ read: true write: true requires: "hr" }
] }
]
}
```
To let a caller change only some fields of a row, set `fields` on an update rule in `allow` instead: that rule adds a narrow update, and a guard takes a field away from every rule.
A guard without rules hides its fields from every client and leaves them to trusted writes.
Registration refuses a guard without fields, a field that is a key field, an access parent or a `creator` field, a field that two guards name, a rule with `delete` or `fields`, a rule whose `caller_is` or `when` reads a guarded field, and unknown fields inside this message. When a guard can hide its fields, it also refuses a field that a rule in `allow` checks with `caller_is` or `when`, a field that a `within` entry reads, and the subject and role fields of a grant entity: a client reads those to decide access.
func (*FieldGuard) Descriptor
deprecated
added in
v0.2.0
func (*FieldGuard) Descriptor() ([]byte, []int)
Deprecated: Use FieldGuard.ProtoReflect.Descriptor instead.
func (*FieldGuard) GetAllow ¶ added in v0.2.0
func (x *FieldGuard) GetAllow() []*AccessRule
func (*FieldGuard) GetFields ¶ added in v0.2.0
func (x *FieldGuard) GetFields() []string
func (*FieldGuard) ProtoMessage ¶ added in v0.2.0
func (*FieldGuard) ProtoMessage()
func (*FieldGuard) ProtoReflect ¶ added in v0.2.0
func (x *FieldGuard) ProtoReflect() protoreflect.Message
func (*FieldGuard) Reset ¶ added in v0.2.0
func (x *FieldGuard) Reset()
func (*FieldGuard) String ¶ added in v0.2.0
func (x *FieldGuard) String() string
type FieldHistory ¶
type FieldHistory struct {
// The wire name of the entity whose row changed.
SourceEntity string `protobuf:"bytes,1,opt,name=source_entity,json=sourceEntity,proto3" json:"source_entity,omitempty"`
// The key of the row that changed, in the source entity keyspace.
SourceKey string `protobuf:"bytes,2,opt,name=source_key,json=sourceKey,proto3" json:"source_key,omitempty"`
// The workspace sequence number of the write that opened the session.
//
// The `prior` field holds what the masked fields contained immediately
// before the write at `seq`. The server writes the initial record at this
// sequence number, so a change-feed reader observes the record alongside
// the write that triggered it.
//
// When subsequent writes fold into an open session, the server updates the
// record at their sequence numbers, but does not change `seq`. After that,
// the storage version of the record is ahead of `seq`. For the end of the
// session range, see `through_seq`.
Seq uint64 `protobuf:"varint,3,opt,name=seq,proto3" json:"seq,omitempty"`
// The workspace sequence number of the last write folded into this record.
//
// This value equals `seq` until a second write folds into the session. The
// record covers the inclusive range `[seq, through_seq]`. The `prior`
// field reflects the state before the range began. No other record for
// this actor session covers a sequence number within this range.
//
// In a multi-node deployment, record spans for the same row can overlap
// because nodes track open sessions independently. A node that did not
// process earlier writes opens a new record. A node that processed earlier
// writes can fold a write into the earlier record. Overlapping spans do
// not affect restoration: `prior` and `mask` always describe the row state
// before `seq`.
ThroughSeq uint64 `protobuf:"varint,4,opt,name=through_seq,json=throughSeq,proto3" json:"through_seq,omitempty"`
// The number of writes folded into this record, including the write that
// opened the session.
//
// This count is always at least 1.
Writes uint32 `protobuf:"varint,5,opt,name=writes,proto3" json:"writes,omitempty"`
// Indicates that the row did not exist when the session began.
//
// When `true`, `mask` and `prior` are empty, and restoring from this
// record patches nothing. Display this record as "created" rather than as
// a restorable state.
//
// A creation record absorbs the rest of its session. Writes that fold into
// this record advance only `through_seq` and `writes`.
//
// Only the engine sets this field. A history filter can redact or drop a
// record, but cannot modify `row_created`. The write fails if a filter
// modifies this field.
RowCreated bool `protobuf:"varint,6,opt,name=row_created,json=rowCreated,proto3" json:"row_created,omitempty"`
// The fields changed during this session, formatted as dotted Protocol
// Buffers paths into the source entity.
//
// Use this field mask when sending a `PATCH` request to restore the
// fields. The `prior` payload contains values for these paths.
//
// The mask represents the union of changes across the session:
// - A write folded into the session adds fields that no earlier write
// covered.
// - If a new path is an ancestor of an existing path (for example,
// `settings` over `settings.color`), the ancestor path replaces the
// narrower path. The wider path names the entire subtree, and `prior`
// retains the value recorded by the narrower path.
//
// The mask includes only fields whose stored values changed. A `PATCH`
// request narrows its effective mask, and a `PUT` request narrows the
// capture set of the entity. A write that changes nothing creates no
// history record. Narrowing applies per top-level field. A `oneof` counts
// as a single field named by its group name, so multiple masked paths
// within one field succeed or fail together.
//
// This field is empty when `row_created` is `true`. A history filter that
// redacts every path also empties this mask. To distinguish a row creation
// from a redacted record, check `row_created`.
Mask *fieldmaskpb.FieldMask `protobuf:"bytes,7,opt,name=mask,proto3" json:"mask,omitempty"`
// State of the source entity before the write occurred.
//
// The payload contains the entity key fields and the fields listed in
// `mask`. All other fields are omitted. To restore the row state, decode
// this payload as the source entity type and send a `PATCH` request using
// `mask`. This field is empty when `row_created` is `true`.
//
// Collaborative-text fields contain plain-string values rather than full
// documents. The string stores the text read at capture time, tagged so a
// reader can distinguish plain text from a document. Read these fields
// with the plain-text helper (`text.PlainText` in Go or `plainTextOf` in
// TypeScript). The document decoder rejects them. During a restore, the
// engine converts the text into edits against the live document under the
// identity of the writer who performs the restore.
//
// Marks do not survive a restore. Restoring inserts text as new content,
// so formatting anchored to earlier runs is not reapplied.
Prior []byte `protobuf:"bytes,8,opt,name=prior,proto3" json:"prior,omitempty"`
// Verified caller identity that performed the write.
//
// The engine copies this value from `storage.Actor` at capture time. This
// field is empty when unauthenticated callers perform writes. If both
// `actor_subject` and `actor_system` are set, a trusted bypass ran during
// a request by that caller.
//
// Each session belongs to a single actor. A write by any other actor opens
// a new record instead of folding into the current session. This field
// attributes the entire session span, not only the write that opened it.
ActorSubject string `protobuf:"bytes,9,opt,name=actor_subject,json=actorSubject,proto3" json:"actor_subject,omitempty"`
// Operator label of a write executed under the engine's trusted bypass,
// rather than a caller identity.
//
// This field is empty when an authenticated or unauthenticated caller
// performs the write directly. When both `actor_system` and
// `actor_subject` are set, the bypass ran during a request on behalf of
// that caller.
ActorSystem string `protobuf:"bytes,12,opt,name=actor_system,json=actorSystem,proto3" json:"actor_system,omitempty"`
// Server wall-clock time when the session opened, intended for display.
//
// This value does not define the order of writes. Use `seq` to order
// records. Two records can share the same timestamp. Folding later writes
// into the session does not update `recorded_at`. This preserves the
// moment when the recorded before-state was modified.
RecordedAt *timestamppb.Timestamp `protobuf:"bytes,13,opt,name=recorded_at,json=recordedAt,proto3" json:"recorded_at,omitempty"`
// Writes folded into this record, grouped by the top-level fields each
// write changed.
//
// The server uses the groups to compute `seq`, `through_seq`, and `writes`
// for a caller that cannot read some of the fields. A write that changed
// only fields the caller cannot read does not count. The `Query` RPC never
// returns this field. Server-side reads and `Server.Changes` return it as
// stored.
//
// This field is empty in a record written before the server kept groups.
// Such a record keeps its stored counts for every caller.
WriteGroups []*FieldHistoryWriteGroup `protobuf:"bytes,14,rep,name=write_groups,json=writeGroups,proto3" json:"write_groups,omitempty"`
// contains filtered or unexported fields
}
Records the state of a row's changed fields before an editing session began.
The server appends a record when a write to an entity configured with `(syncplane.v1.entity).history` modifies one of its fields.
A session folds an actor's writes to a single row into one record while the session remains open through `server.WithHistorySession`. For sequence ranges, see `seq` and `through_seq`.
All source entities store their changes in this message type. The `prior` field contains serialized bytes. To read `prior`, decode it as the source entity type.
The engine registers `FieldHistory` automatically when an entity opts in. The entity is `server_only`, so clients do not sync it directly. To read records, call the `Query` RPC (or `queryServer` in the TypeScript client), which queries any registered entity.
func (*FieldHistory) Descriptor
deprecated
func (*FieldHistory) Descriptor() ([]byte, []int)
Deprecated: Use FieldHistory.ProtoReflect.Descriptor instead.
func (*FieldHistory) GetActorSubject ¶
func (x *FieldHistory) GetActorSubject() string
func (*FieldHistory) GetActorSystem ¶
func (x *FieldHistory) GetActorSystem() string
func (*FieldHistory) GetMask ¶
func (x *FieldHistory) GetMask() *fieldmaskpb.FieldMask
func (*FieldHistory) GetPrior ¶
func (x *FieldHistory) GetPrior() []byte
func (*FieldHistory) GetRecordedAt ¶
func (x *FieldHistory) GetRecordedAt() *timestamppb.Timestamp
func (*FieldHistory) GetRowCreated ¶
func (x *FieldHistory) GetRowCreated() bool
func (*FieldHistory) GetSeq ¶
func (x *FieldHistory) GetSeq() uint64
func (*FieldHistory) GetSourceEntity ¶
func (x *FieldHistory) GetSourceEntity() string
func (*FieldHistory) GetSourceKey ¶
func (x *FieldHistory) GetSourceKey() string
func (*FieldHistory) GetThroughSeq ¶
func (x *FieldHistory) GetThroughSeq() uint64
func (*FieldHistory) GetWriteGroups ¶ added in v0.2.0
func (x *FieldHistory) GetWriteGroups() []*FieldHistoryWriteGroup
func (*FieldHistory) GetWrites ¶
func (x *FieldHistory) GetWrites() uint32
func (*FieldHistory) ProtoMessage ¶
func (*FieldHistory) ProtoMessage()
func (*FieldHistory) ProtoReflect ¶
func (x *FieldHistory) ProtoReflect() protoreflect.Message
func (*FieldHistory) Reset ¶
func (x *FieldHistory) Reset()
func (*FieldHistory) String ¶
func (x *FieldHistory) String() string
type FieldHistoryWriteGroup ¶ added in v0.2.0
type FieldHistoryWriteGroup struct {
// First segments of the `mask` paths the writes changed, sorted and
// without duplicates. Empty for the write that created the row.
Fields []string `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"`
// Number of writes in the group. At least 1.
Writes uint32 `protobuf:"varint,2,opt,name=writes,proto3" json:"writes,omitempty"`
// The workspace sequence number of the first write in the group.
FirstSeq uint64 `protobuf:"varint,3,opt,name=first_seq,json=firstSeq,proto3" json:"first_seq,omitempty"`
// The workspace sequence number of the last write in the group.
LastSeq uint64 `protobuf:"varint,4,opt,name=last_seq,json=lastSeq,proto3" json:"last_seq,omitempty"`
// contains filtered or unexported fields
}
Writes of one field-history session that changed the same set of top-level fields.
func (*FieldHistoryWriteGroup) Descriptor
deprecated
added in
v0.2.0
func (*FieldHistoryWriteGroup) Descriptor() ([]byte, []int)
Deprecated: Use FieldHistoryWriteGroup.ProtoReflect.Descriptor instead.
func (*FieldHistoryWriteGroup) GetFields ¶ added in v0.2.0
func (x *FieldHistoryWriteGroup) GetFields() []string
func (*FieldHistoryWriteGroup) GetFirstSeq ¶ added in v0.2.0
func (x *FieldHistoryWriteGroup) GetFirstSeq() uint64
func (*FieldHistoryWriteGroup) GetLastSeq ¶ added in v0.2.0
func (x *FieldHistoryWriteGroup) GetLastSeq() uint64
func (*FieldHistoryWriteGroup) GetWrites ¶ added in v0.2.0
func (x *FieldHistoryWriteGroup) GetWrites() uint32
func (*FieldHistoryWriteGroup) ProtoMessage ¶ added in v0.2.0
func (*FieldHistoryWriteGroup) ProtoMessage()
func (*FieldHistoryWriteGroup) ProtoReflect ¶ added in v0.2.0
func (x *FieldHistoryWriteGroup) ProtoReflect() protoreflect.Message
func (*FieldHistoryWriteGroup) Reset ¶ added in v0.2.0
func (x *FieldHistoryWriteGroup) Reset()
func (*FieldHistoryWriteGroup) String ¶ added in v0.2.0
func (x *FieldHistoryWriteGroup) String() string
type FollowSpec ¶
type FollowSpec struct {
// The reference paths to traverse.
Paths []*RefPath `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
// The maximum number of hops to traverse along each path. A value of `0`
// is treated as `1` (one hop along each path).
Depth uint32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
// contains filtered or unexported fields
}
Specifies reference paths to follow to a bounded depth. This message configures client-local hydration (`include`) and subscription scoping (`follow`). A `depth` of `0` is treated as `1` (one hop along each path).
func (*FollowSpec) Descriptor
deprecated
func (*FollowSpec) Descriptor() ([]byte, []int)
Deprecated: Use FollowSpec.ProtoReflect.Descriptor instead.
func (*FollowSpec) GetDepth ¶
func (x *FollowSpec) GetDepth() uint32
func (*FollowSpec) GetPaths ¶
func (x *FollowSpec) GetPaths() []*RefPath
func (*FollowSpec) ProtoMessage ¶
func (*FollowSpec) ProtoMessage()
func (*FollowSpec) ProtoReflect ¶
func (x *FollowSpec) ProtoReflect() protoreflect.Message
func (*FollowSpec) Reset ¶
func (x *FollowSpec) Reset()
func (*FollowSpec) String ¶
func (x *FollowSpec) String() string
type GetChunkRequest ¶ added in v0.4.0
type GetChunkRequest struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
// The chunk's position, from 0.
Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
// contains filtered or unexported fields
}
func (*GetChunkRequest) Descriptor
deprecated
added in
v0.4.0
func (*GetChunkRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetChunkRequest.ProtoReflect.Descriptor instead.
func (*GetChunkRequest) GetDigest ¶ added in v0.4.0
func (x *GetChunkRequest) GetDigest() string
func (*GetChunkRequest) GetIndex ¶ added in v0.4.0
func (x *GetChunkRequest) GetIndex() uint32
func (*GetChunkRequest) GetWorkspaceId ¶ added in v0.4.0
func (x *GetChunkRequest) GetWorkspaceId() string
func (*GetChunkRequest) ProtoMessage ¶ added in v0.4.0
func (*GetChunkRequest) ProtoMessage()
func (*GetChunkRequest) ProtoReflect ¶ added in v0.4.0
func (x *GetChunkRequest) ProtoReflect() protoreflect.Message
func (*GetChunkRequest) Reset ¶ added in v0.4.0
func (x *GetChunkRequest) Reset()
func (*GetChunkRequest) String ¶ added in v0.4.0
func (x *GetChunkRequest) String() string
type GetChunkResponse ¶ added in v0.4.0
type GetChunkResponse struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*GetChunkResponse) Descriptor
deprecated
added in
v0.4.0
func (*GetChunkResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetChunkResponse.ProtoReflect.Descriptor instead.
func (*GetChunkResponse) GetData ¶ added in v0.4.0
func (x *GetChunkResponse) GetData() []byte
func (*GetChunkResponse) ProtoMessage ¶ added in v0.4.0
func (*GetChunkResponse) ProtoMessage()
func (*GetChunkResponse) ProtoReflect ¶ added in v0.4.0
func (x *GetChunkResponse) ProtoReflect() protoreflect.Message
func (*GetChunkResponse) Reset ¶ added in v0.4.0
func (x *GetChunkResponse) Reset()
func (*GetChunkResponse) String ¶ added in v0.4.0
func (x *GetChunkResponse) String() string
type GetSchemaRequest ¶
type GetSchemaRequest struct {
// Application identifier whose schema to retrieve. Required.
AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
// contains filtered or unexported fields
}
Request to retrieve an application schema.
func (*GetSchemaRequest) Descriptor
deprecated
func (*GetSchemaRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSchemaRequest.ProtoReflect.Descriptor instead.
func (*GetSchemaRequest) GetAppId ¶
func (x *GetSchemaRequest) GetAppId() string
func (*GetSchemaRequest) ProtoMessage ¶
func (*GetSchemaRequest) ProtoMessage()
func (*GetSchemaRequest) ProtoReflect ¶
func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message
func (*GetSchemaRequest) Reset ¶
func (x *GetSchemaRequest) Reset()
func (*GetSchemaRequest) String ¶
func (x *GetSchemaRequest) String() string
type GetSchemaResponse ¶
type GetSchemaResponse struct {
// The application's serialized `google.protobuf.FileDescriptorSet`, as
// registered.
//
// This field is empty if `found` is `false`.
DescriptorSet []byte `protobuf:"bytes,1,opt,name=descriptor_set,json=descriptorSet,proto3" json:"descriptor_set,omitempty"`
// Schema revision of the registered application.
//
// This field is empty if `found` is `false`.
Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
// `true` if the application exists and schema descriptors are returned, or
// `false` if the application is unknown.
Found bool `protobuf:"varint,3,opt,name=found,proto3" json:"found,omitempty"`
// contains filtered or unexported fields
}
Response containing the requested application schema.
func (*GetSchemaResponse) Descriptor
deprecated
func (*GetSchemaResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetSchemaResponse.ProtoReflect.Descriptor instead.
func (*GetSchemaResponse) GetDescriptorSet ¶
func (x *GetSchemaResponse) GetDescriptorSet() []byte
func (*GetSchemaResponse) GetFound ¶
func (x *GetSchemaResponse) GetFound() bool
func (*GetSchemaResponse) GetRevision ¶
func (x *GetSchemaResponse) GetRevision() string
func (*GetSchemaResponse) ProtoMessage ¶
func (*GetSchemaResponse) ProtoMessage()
func (*GetSchemaResponse) ProtoReflect ¶
func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message
func (*GetSchemaResponse) Reset ¶
func (x *GetSchemaResponse) Reset()
func (*GetSchemaResponse) String ¶
func (x *GetSchemaResponse) String() string
type GrantOptions ¶ added in v0.2.0
type GrantOptions struct {
// The name of the field or the `oneof` that holds the subject the row
// grants to. A field is top-level and singular, and is one of:
//
// - a `string` field, which names one subject. The server compares it
// with the subjects of the caller.
// - a reference to an entity that declares `members`, which names a team.
// The row grants to every member of that team. The type of the field is
// the entity's message, or a reference message without a `workspace`
// field.
//
// Each member of a `oneof` is one of these, so that one entity can grant
// to callers and to teams. A row that holds no case grants nothing.
Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
// The name of a top-level, singular `string` or enum field outside any
// `oneof` that holds the role the row grants. An enum value names the
// role with the same name as the value, and every declared role must be a
// value of the enum.
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
// The roles that rows of this entity can grant. At least one.
Roles []*Role `protobuf:"bytes,3,rep,name=roles,proto3" json:"roles,omitempty"`
// contains filtered or unexported fields
}
Declares an entity whose rows grant roles.
Each row gives the subject in its `subject` field the role in its `role` field. The subject is one caller, or every member of a team. The role applies at the row's anchor: the row that its access parent points at, or the workspace root when the entity has no access parent. A row grants nothing when its subject is empty or names a team that does not exist, its role is not declared in `roles`, or its access parent is unset or names a row that does not exist.
```protobuf
message ProjectMember {
option (syncplane.v1.entity) = {
name: "project_member" key_fields: ["id"]
grant: {
subject: "user_id" role: "role"
roles: [
{ name: "project_reader" grants: ["view_projects", "view_tasks"] },
{ name: "project_writer" grants: ["view_projects", "view_tasks",
"edit_tasks"] }
]
}
access: {
parents: ["project"]
allow: [
{ read: true requires: "view_members" },
{ write: true requires: "manage_members" }
]
}
};
string id = 1;
Project project = 2;
string user_id = 3;
string role = 4;
}
```
To grant to users and to teams from one entity, make the subject a `oneof`:
```protobuf
oneof member {
string user_id = 3;
Team team = 5;
}
```
with `subject: "member"`. See `MembersOptions`.
A write that can change what a grant row grants needs every permission of the row's role where the row applies: of the stored role at the stored anchor, and of the new role at the new anchor. A caller can therefore grant and revoke only what it holds itself. Every write path, trusted ones included, refuses a grant row with an empty subject, an undeclared role, or no access parent on an entity that names one.
Registration refuses unknown fields inside this message and inside `Role`.
func (*GrantOptions) Descriptor
deprecated
added in
v0.2.0
func (*GrantOptions) Descriptor() ([]byte, []int)
Deprecated: Use GrantOptions.ProtoReflect.Descriptor instead.
func (*GrantOptions) GetRole ¶ added in v0.2.0
func (x *GrantOptions) GetRole() string
func (*GrantOptions) GetRoles ¶ added in v0.2.0
func (x *GrantOptions) GetRoles() []*Role
func (*GrantOptions) GetSubject ¶ added in v0.2.0
func (x *GrantOptions) GetSubject() string
func (*GrantOptions) ProtoMessage ¶ added in v0.2.0
func (*GrantOptions) ProtoMessage()
func (*GrantOptions) ProtoReflect ¶ added in v0.2.0
func (x *GrantOptions) ProtoReflect() protoreflect.Message
func (*GrantOptions) Reset ¶ added in v0.2.0
func (x *GrantOptions) Reset()
func (*GrantOptions) String ¶ added in v0.2.0
func (x *GrantOptions) String() string
type HistoryOptions ¶
type HistoryOptions struct {
// contains filtered or unexported fields
}
Enables server-side field history tracking for an entity.
When enabled, any `PUT` or `PATCH` operation that changes a field marked with `(syncplane.v1.field_behavior).history` records the previous values in a `syncplane.v1.FieldHistory` row. You must explicitly mark at least one field with history behavior.
The server records changed fields only, not identical writes. Consecutive writes to the same row by the same actor within an open session fold into a single record holding the state before the first write in the session.
The resulting history entity is `server_only` and does not sync to clients. Query history through the `Query` RPC. Deleting a row purges its history records.
func (*HistoryOptions) Descriptor
deprecated
func (*HistoryOptions) Descriptor() ([]byte, []int)
Deprecated: Use HistoryOptions.ProtoReflect.Descriptor instead.
func (*HistoryOptions) ProtoMessage ¶
func (*HistoryOptions) ProtoMessage()
func (*HistoryOptions) ProtoReflect ¶
func (x *HistoryOptions) ProtoReflect() protoreflect.Message
func (*HistoryOptions) Reset ¶
func (x *HistoryOptions) Reset()
func (*HistoryOptions) String ¶
func (x *HistoryOptions) String() string
type InCond ¶
type InCond struct {
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
Values []*QueryValue `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
func (*InCond) Descriptor
deprecated
func (*InCond) GetValues ¶
func (x *InCond) GetValues() []*QueryValue
func (*InCond) ProtoMessage ¶
func (*InCond) ProtoMessage()
func (*InCond) ProtoReflect ¶
func (x *InCond) ProtoReflect() protoreflect.Message
type IndexKey ¶
type IndexKey struct {
// The dotted field path for this index component, for example
// `"settings.size"`.
//
// A path ending at a single-key reference extends to that reference's key
// field.
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
// Sorts this index component in descending order.
//
// When `false`, sorts ascending. Missing and `NaN` values always sort last
// regardless of this setting.
Desc bool `protobuf:"varint,2,opt,name=desc,proto3" json:"desc,omitempty"`
// contains filtered or unexported fields
}
Specifies one field component of an index and its sort order.
func (*IndexKey) Descriptor
deprecated
func (*IndexKey) ProtoMessage ¶
func (*IndexKey) ProtoMessage()
func (*IndexKey) ProtoReflect ¶
func (x *IndexKey) ProtoReflect() protoreflect.Message
type IndexSpec ¶
type IndexSpec struct {
// The index name, unique within the entity.
//
// Names beginning with `__` are reserved for engine-derived indexes.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The ordered key components that make up the index.
//
// A query can use this index when its equality filters match a prefix of
// these components and its sort order matches the subsequent components.
//
// When the first component fans out over a map (a path with `*`), the
// index holds no entry for a row whose first component is missing, for
// example a row with an empty map. Every other index holds an entry for
// each row.
Key []*IndexKey `protobuf:"bytes,2,rep,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
Defines a secondary index for an entity.
func (*IndexSpec) Descriptor
deprecated
func (*IndexSpec) ProtoMessage ¶
func (*IndexSpec) ProtoMessage()
func (*IndexSpec) ProtoReflect ¶
func (x *IndexSpec) ProtoReflect() protoreflect.Message
type KeySet ¶
type KeySet struct {
// The list of row keys. Key order does not matter and duplicate keys are
// folded.
Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
// contains filtered or unexported fields
}
KeySet names rows of one entity by key, in the row-key form CrudMutation.key carries (see docs/reference/naming.md). Order carries no meaning and duplicates are folded, so two sets with the same members hash alike.
func (*KeySet) Descriptor
deprecated
func (*KeySet) ProtoMessage ¶
func (*KeySet) ProtoMessage()
func (*KeySet) ProtoReflect ¶
func (x *KeySet) ProtoReflect() protoreflect.Message
type LateRejection ¶ added in v0.6.0
type LateRejection struct {
MutationId uint64 `protobuf:"varint,1,opt,name=mutation_id,json=mutationId,proto3" json:"mutation_id,omitempty"`
// Machine-readable rejection code, as in `MutationResult.error_code`.
ErrorCode string `protobuf:"bytes,2,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// The rows the mutation named, in payload order: one for a CRUD mutation,
// one for each member of a batch, none for a custom mutation.
Targets []*MutationTarget `protobuf:"bytes,4,rep,name=targets,proto3" json:"targets,omitempty"`
// Name of the custom mutation. Empty for a CRUD or batch mutation.
Mutator string `protobuf:"bytes,5,opt,name=mutator,proto3" json:"mutator,omitempty"`
// contains filtered or unexported fields
}
Reports a mutation that the server acknowledged as applied and rejected after the acknowledgement. A server that forwards writes to another server (write-behind) acknowledges a mutation before that server decides it. When that server rejects the mutation, the forwarding server reverts the rows the mutation wrote and records this report.
The report has a position in the workspace sequence. The first page whose position reaches it carries it, and the row changes that revert the mutation are on that page or an earlier one. A client that pulls again from an earlier cursor receives the report again. A client that bootstraps does not receive reports from before the bootstrap. The server keeps a report as long as it keeps the client's other rejection records.
Only the client that pushed the mutation, under the same caller, receives the report.
func (*LateRejection) Descriptor
deprecated
added in
v0.6.0
func (*LateRejection) Descriptor() ([]byte, []int)
Deprecated: Use LateRejection.ProtoReflect.Descriptor instead.
func (*LateRejection) GetErrorCode ¶ added in v0.6.0
func (x *LateRejection) GetErrorCode() string
func (*LateRejection) GetErrorMessage ¶ added in v0.6.0
func (x *LateRejection) GetErrorMessage() string
func (*LateRejection) GetMutationId ¶ added in v0.6.0
func (x *LateRejection) GetMutationId() uint64
func (*LateRejection) GetMutator ¶ added in v0.6.0
func (x *LateRejection) GetMutator() string
func (*LateRejection) GetTargets ¶ added in v0.6.0
func (x *LateRejection) GetTargets() []*MutationTarget
func (*LateRejection) ProtoMessage ¶ added in v0.6.0
func (*LateRejection) ProtoMessage()
func (*LateRejection) ProtoReflect ¶ added in v0.6.0
func (x *LateRejection) ProtoReflect() protoreflect.Message
func (*LateRejection) Reset ¶ added in v0.6.0
func (x *LateRejection) Reset()
func (*LateRejection) String ¶ added in v0.6.0
func (x *LateRejection) String() string
type MatchCond ¶
type MatchCond struct {
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
// contains filtered or unexported fields
}
Matches a row when the entity's declared search fields contain every term in `query`.
The entity's analyzer analyzes the query using the same pipeline used for search fields. If the query ends inside the final term, that term matches as a prefix to support search-as-you-type. Terms are conjunctive, and any searchable field can satisfy a term. A query that produces no terms (for example, an empty string or separators only) matches every row.
This condition is a predicate. You can combine it with `and`, `or`, and `not` conditions. Matching rows return in the query's declared order. To rank rows by match quality, order by `OrderKey.relevance`.
Validation rejects this condition in the following cases:
- The entity declares no search fields (see `syncplane.v1.SearchSpec`).
- Used inside `any()`, because the scope is the row rather than an element.
- Used inside the target scope of a `RelCond`, unless the target entity declares search fields.
func (*MatchCond) Descriptor
deprecated
func (*MatchCond) ProtoMessage ¶
func (*MatchCond) ProtoMessage()
func (*MatchCond) ProtoReflect ¶
func (x *MatchCond) ProtoReflect() protoreflect.Message
type MembersOptions ¶ added in v0.2.0
type MembersOptions struct {
// The name of the entity whose rows make members. It is a grant entity
// whose access parent is a reference to this entity and to no other, and
// whose subject is one `string` field, so a team cannot be a member of a
// team.
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// contains filtered or unexported fields
}
Declares the entity whose rows say who the members of each team are.
A row of the member entity that grants its role at a team row also makes its subject a member of that team, whatever the role. A grant row whose subject is a reference to a team row grants its role to every member of that team. A permission held at the workspace root, or at a row above the team, does not make a caller a member.
```protobuf
message Team {
option (syncplane.v1.entity) = {
name: "team" key_fields: ["id"]
members: { entity: "team_member" }
access: { allow: [
{ read: true requires: "view_teams" },
{ write: true requires: "manage_teams" }
] }
};
string id = 1;
}
message TeamMember {
option (syncplane.v1.entity) = {
name: "team_member" key_fields: ["id"]
grant: {
subject: "user_id" role: "role"
roles: [
{ name: "team_member" grants: ["view_teams"] },
{ name: "team_lead" grants: ["view_teams", "manage_teams"] }
]
}
access: {
parents: ["team"]
allow: [
{ read: true requires: "view_teams" },
{ write: true requires: "manage_teams" }
]
}
};
string id = 1;
Team team = 2;
string user_id = 3;
string role = 4;
}
```
A grant to a team gives its role to whoever a caller adds to the team later, so a caller who can write rows of the member entity decides who receives it. A write that is not trusted cannot delete a team row while a live grant row names it as its subject.
Registration refuses unknown fields inside this message.
func (*MembersOptions) Descriptor
deprecated
added in
v0.2.0
func (*MembersOptions) Descriptor() ([]byte, []int)
Deprecated: Use MembersOptions.ProtoReflect.Descriptor instead.
func (*MembersOptions) GetEntity ¶ added in v0.2.0
func (x *MembersOptions) GetEntity() string
func (*MembersOptions) ProtoMessage ¶ added in v0.2.0
func (*MembersOptions) ProtoMessage()
func (*MembersOptions) ProtoReflect ¶ added in v0.2.0
func (x *MembersOptions) ProtoReflect() protoreflect.Message
func (*MembersOptions) Reset ¶ added in v0.2.0
func (x *MembersOptions) Reset()
func (*MembersOptions) String ¶ added in v0.2.0
func (x *MembersOptions) String() string
type Mutation ¶
type Mutation struct {
// Identifies the originating client, such as a device or browser tab. Use
// a stable identifier across requests from the same client. The value must
// be at most 128 bytes and must not contain control characters (\u0000 to
// \u001f). The server refuses the whole batch with invalid_argument if the
// value violates these rules. Pull, Bootstrap, and Subscribe refuse an
// identifier that violates these rules in the same way.
ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// Tracks sequence order with a monotonically increasing value for the
// client, starting at 1. The server tracks the last applied value per
// client and caller for idempotency and gap detection (see
// WorkspaceBatch). The server refuses the whole batch with
// invalid_argument if the value is 0 or greater than 2^63 - 1.
MutationId uint64 `protobuf:"varint,2,opt,name=mutation_id,json=mutationId,proto3" json:"mutation_id,omitempty"`
// Specifies the write operation to apply. Future payload variants add new
// branches to this oneof.
//
// Types that are valid to be assigned to Payload:
//
// *Mutation_Crud
// *Mutation_Custom
// *Mutation_Batch
Payload isMutation_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
Encloses a single client-originated write operation.
func (*Mutation) Descriptor
deprecated
func (*Mutation) GetBatch ¶
func (x *Mutation) GetBatch() *BatchMutation
func (*Mutation) GetClientId ¶
func (*Mutation) GetCrud ¶
func (x *Mutation) GetCrud() *CrudMutation
func (*Mutation) GetCustom ¶
func (x *Mutation) GetCustom() *CustomMutation
func (*Mutation) GetMutationId ¶
func (*Mutation) GetPayload ¶
func (x *Mutation) GetPayload() isMutation_Payload
func (*Mutation) ProtoMessage ¶
func (*Mutation) ProtoMessage()
func (*Mutation) ProtoReflect ¶
func (x *Mutation) ProtoReflect() protoreflect.Message
type MutationResult ¶
type MutationResult struct {
MutationId uint64 `protobuf:"varint,1,opt,name=mutation_id,json=mutationId,proto3" json:"mutation_id,omitempty"`
Status MutationStatus `protobuf:"varint,2,opt,name=status,proto3,enum=syncplane.v1.MutationStatus" json:"status,omitempty"`
// Workspace sequence the mutation was applied at. Set when status is
// APPLIED. Set when status is ALREADY_APPLIED and the mutation was in the
// client's latest push that applied something, which covers the resend of
// a push whose response was lost; 0 for an older mutation. 0 when status
// is REJECTED. This is the only in-band way a writer learns the sequence
// its own write took,
// without waiting for the row to come back down a pull as
// RowChange.version. A REJECTED mutation reports 0 because it consumes no
// sequence — its savepoint rolled back — which is what makes rejections
// free rather than gap-producing.
//
// The TypeScript client tracks the highest value per workspace and sends
// it back as PullRequest.min_seq / WorkspaceScope.min_seq, so a
// replica-reading server never serves it a snapshot older than its own
// acked writes. Also the only in-band way a client that never syncs back —
// a server-side or batch writer — learns the sequence its write took.
Seq uint64 `protobuf:"varint,3,opt,name=seq,proto3" json:"seq,omitempty"`
// Machine-readable rejection code (e.g. "permission_denied").
ErrorCode string `protobuf:"bytes,4,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
ErrorMessage string `protobuf:"bytes,5,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
func (*MutationResult) Descriptor
deprecated
func (*MutationResult) Descriptor() ([]byte, []int)
Deprecated: Use MutationResult.ProtoReflect.Descriptor instead.
func (*MutationResult) GetErrorCode ¶
func (x *MutationResult) GetErrorCode() string
func (*MutationResult) GetErrorMessage ¶
func (x *MutationResult) GetErrorMessage() string
func (*MutationResult) GetMutationId ¶
func (x *MutationResult) GetMutationId() uint64
func (*MutationResult) GetSeq ¶
func (x *MutationResult) GetSeq() uint64
func (*MutationResult) GetStatus ¶
func (x *MutationResult) GetStatus() MutationStatus
func (*MutationResult) ProtoMessage ¶
func (*MutationResult) ProtoMessage()
func (*MutationResult) ProtoReflect ¶
func (x *MutationResult) ProtoReflect() protoreflect.Message
func (*MutationResult) Reset ¶
func (x *MutationResult) Reset()
func (*MutationResult) String ¶
func (x *MutationResult) String() string
type MutationStatus ¶
type MutationStatus int32
const ( MutationStatus_MUTATION_STATUS_UNSPECIFIED MutationStatus = 0 // The server applied the mutation. A server that forwards writes to // another server can still reject the mutation later, and then reports it // as a `LateRejection` on a later page. MutationStatus_MUTATION_STATUS_APPLIED MutationStatus = 1 // Mutation id at or below the server's watermark for this client; safe to // drop (idempotent retry). MutationStatus_MUTATION_STATUS_ALREADY_APPLIED MutationStatus = 2 // Business rejection. This is an ack: the client drops the mutation and // fires its rejection callback. MutationStatus_MUTATION_STATUS_REJECTED MutationStatus = 3 )
func (MutationStatus) Descriptor ¶
func (MutationStatus) Descriptor() protoreflect.EnumDescriptor
func (MutationStatus) Enum ¶
func (x MutationStatus) Enum() *MutationStatus
func (MutationStatus) EnumDescriptor
deprecated
func (MutationStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use MutationStatus.Descriptor instead.
func (MutationStatus) Number ¶
func (x MutationStatus) Number() protoreflect.EnumNumber
func (MutationStatus) String ¶
func (x MutationStatus) String() string
func (MutationStatus) Type ¶
func (MutationStatus) Type() protoreflect.EnumType
type MutationTarget ¶ added in v0.6.0
type MutationTarget struct {
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
Identifies one row that a mutation named.
func (*MutationTarget) Descriptor
deprecated
added in
v0.6.0
func (*MutationTarget) Descriptor() ([]byte, []int)
Deprecated: Use MutationTarget.ProtoReflect.Descriptor instead.
func (*MutationTarget) GetEntity ¶ added in v0.6.0
func (x *MutationTarget) GetEntity() string
func (*MutationTarget) GetKey ¶ added in v0.6.0
func (x *MutationTarget) GetKey() string
func (*MutationTarget) ProtoMessage ¶ added in v0.6.0
func (*MutationTarget) ProtoMessage()
func (*MutationTarget) ProtoReflect ¶ added in v0.6.0
func (x *MutationTarget) ProtoReflect() protoreflect.Message
func (*MutationTarget) Reset ¶ added in v0.6.0
func (x *MutationTarget) Reset()
func (*MutationTarget) String ¶ added in v0.6.0
func (x *MutationTarget) String() string
type Mutation_Batch ¶
type Mutation_Batch struct {
// Applies multiple CRUD write operations as one atomic transaction.
Batch *BatchMutation `protobuf:"bytes,5,opt,name=batch,proto3,oneof"`
}
type Mutation_Crud ¶
type Mutation_Crud struct {
// Applies a single CRUD write operation to an entity.
Crud *CrudMutation `protobuf:"bytes,3,opt,name=crud,proto3,oneof"`
}
type Mutation_Custom ¶
type Mutation_Custom struct {
// Applies a named custom mutator registered on the server.
Custom *CustomMutation `protobuf:"bytes,4,opt,name=custom,proto3,oneof"`
}
type OrderKey ¶
type OrderKey struct {
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
Dir Direction `protobuf:"varint,2,opt,name=dir,proto3,enum=syncplane.v1.Direction" json:"dir,omitempty"`
// Orders rows by how well each row satisfies the predicate's match
// condition rather than by a field value.
//
// When `true`, ascending order places the best match first. Using this
// option requires `path` to be empty and the query predicate to contain
// exactly one match condition. The relevance rank is computed from the row
// alone, without depending on other store contents. Rows with equal rank
// fall through to subsequent order keys and ultimately the row key.
Relevance bool `protobuf:"varint,3,opt,name=relevance,proto3" json:"relevance,omitempty"`
// contains filtered or unexported fields
}
func (*OrderKey) Descriptor
deprecated
func (*OrderKey) GetRelevance ¶
func (*OrderKey) ProtoMessage ¶
func (*OrderKey) ProtoMessage()
func (*OrderKey) ProtoReflect ¶
func (x *OrderKey) ProtoReflect() protoreflect.Message
type Participant ¶
type Participant struct {
// The publishing session. Stable for as long as that session lives, and
// distinct from the client id: one device may hold several sessions, and
// the client id is an idempotency handle rather than an identity.
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
// Who is publishing, taken from the request principal at publish time.
// Empty when the publisher was unauthenticated. Never client-supplied.
Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"`
// The participant's transient presence state within the room.
Presence *PresenceUpdate `protobuf:"bytes,3,opt,name=presence,proto3" json:"presence,omitempty"`
// contains filtered or unexported fields
}
Participant is one session's record in one room, as a watcher sees it.
func (*Participant) Descriptor
deprecated
func (*Participant) Descriptor() ([]byte, []int)
Deprecated: Use Participant.ProtoReflect.Descriptor instead.
func (*Participant) GetPresence ¶
func (x *Participant) GetPresence() *PresenceUpdate
func (*Participant) GetSessionId ¶
func (x *Participant) GetSessionId() string
func (*Participant) GetSubject ¶
func (x *Participant) GetSubject() string
func (*Participant) ProtoMessage ¶
func (*Participant) ProtoMessage()
func (*Participant) ProtoReflect ¶
func (x *Participant) ProtoReflect() protoreflect.Message
func (*Participant) Reset ¶
func (x *Participant) Reset()
func (*Participant) String ¶
func (x *Participant) String() string
type Patch ¶
type Patch struct {
// The ordered list of row changes to apply.
Changes []*RowChange `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"`
// Entities whose entire confirmed state the client must drop BEFORE
// applying changes. Sent when an entity leaves the subscription set during
// a delta resync — one name instead of a tombstone per row.
DropEntities []string `protobuf:"bytes,2,rep,name=drop_entities,json=dropEntities,proto3" json:"drop_entities,omitempty"`
// contains filtered or unexported fields
}
Represents an ordered set of row changes to apply to confirmed state.
func (*Patch) Descriptor
deprecated
func (*Patch) GetChanges ¶
func (*Patch) GetDropEntities ¶
func (*Patch) ProtoMessage ¶
func (*Patch) ProtoMessage()
func (*Patch) ProtoReflect ¶
func (x *Patch) ProtoReflect() protoreflect.Message
type PresenceUpdate ¶
type PresenceUpdate struct {
// The application-defined state payload, opaque to the engine, and
// capped by the server's `MaxPresenceStateBytes` limit, which defaults
// to 4 KiB. An empty state indicates presence with no additional
// payload.
State []byte `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
// The monotonic revision number assigned by the publisher for this session
// and topic. Recipients discard updates with a lower revision than the
// highest revision received.
Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
// The workspace sequence number that the publisher was at when authoring
// this state. If 0, the publisher did not specify a sequence number.
// Recipients use this value to determine whether their local data stream
// needs to catch up.
Seq uint64 `protobuf:"varint,3,opt,name=seq,proto3" json:"seq,omitempty"`
// contains filtered or unexported fields
}
Contains a session's transient state within a single room.
func (*PresenceUpdate) Descriptor
deprecated
func (*PresenceUpdate) Descriptor() ([]byte, []int)
Deprecated: Use PresenceUpdate.ProtoReflect.Descriptor instead.
func (*PresenceUpdate) GetRevision ¶
func (x *PresenceUpdate) GetRevision() uint64
func (*PresenceUpdate) GetSeq ¶
func (x *PresenceUpdate) GetSeq() uint64
func (*PresenceUpdate) GetState ¶
func (x *PresenceUpdate) GetState() []byte
func (*PresenceUpdate) ProtoMessage ¶
func (*PresenceUpdate) ProtoMessage()
func (*PresenceUpdate) ProtoReflect ¶
func (x *PresenceUpdate) ProtoReflect() protoreflect.Message
func (*PresenceUpdate) Reset ¶
func (x *PresenceUpdate) Reset()
func (*PresenceUpdate) String ¶
func (x *PresenceUpdate) String() string
type PresentCond ¶
type PresentCond struct {
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
Op PresentOp `protobuf:"varint,2,opt,name=op,proto3,enum=syncplane.v1.PresentOp" json:"op,omitempty"`
// contains filtered or unexported fields
}
func (*PresentCond) Descriptor
deprecated
func (*PresentCond) Descriptor() ([]byte, []int)
Deprecated: Use PresentCond.ProtoReflect.Descriptor instead.
func (*PresentCond) GetOp ¶
func (x *PresentCond) GetOp() PresentOp
func (*PresentCond) GetPath ¶
func (x *PresentCond) GetPath() []string
func (*PresentCond) ProtoMessage ¶
func (*PresentCond) ProtoMessage()
func (*PresentCond) ProtoReflect ¶
func (x *PresentCond) ProtoReflect() protoreflect.Message
func (*PresentCond) Reset ¶
func (x *PresentCond) Reset()
func (*PresentCond) String ¶
func (x *PresentCond) String() string
type PresentOp ¶
type PresentOp int32
func (PresentOp) Descriptor ¶
func (PresentOp) Descriptor() protoreflect.EnumDescriptor
func (PresentOp) EnumDescriptor
deprecated
func (PresentOp) Number ¶
func (x PresentOp) Number() protoreflect.EnumNumber
func (PresentOp) Type ¶
func (PresentOp) Type() protoreflect.EnumType
type PublishItem ¶
type PublishItem struct {
// The topic to publish to.
Topic *Topic `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
// The update, message, or departure notice to publish.
//
// Types that are valid to be assigned to Body:
//
// *PublishItem_Presence
// *PublishItem_Message
// *PublishItem_Leave
Body isPublishItem_Body `protobuf_oneof:"body"`
// contains filtered or unexported fields
}
PublishItem is one write to one room.
func (*PublishItem) Descriptor
deprecated
func (*PublishItem) Descriptor() ([]byte, []int)
Deprecated: Use PublishItem.ProtoReflect.Descriptor instead.
func (*PublishItem) GetBody ¶
func (x *PublishItem) GetBody() isPublishItem_Body
func (*PublishItem) GetLeave ¶
func (x *PublishItem) GetLeave() bool
func (*PublishItem) GetMessage ¶
func (x *PublishItem) GetMessage() []byte
func (*PublishItem) GetPresence ¶
func (x *PublishItem) GetPresence() *PresenceUpdate
func (*PublishItem) GetTopic ¶
func (x *PublishItem) GetTopic() *Topic
func (*PublishItem) ProtoMessage ¶
func (*PublishItem) ProtoMessage()
func (*PublishItem) ProtoReflect ¶
func (x *PublishItem) ProtoReflect() protoreflect.Message
func (*PublishItem) Reset ¶
func (x *PublishItem) Reset()
func (*PublishItem) String ¶
func (x *PublishItem) String() string
type PublishItem_Leave ¶
type PublishItem_Leave struct {
// Withdraw this session from the topic. Watchers see it as `left`
// immediately rather than waiting out the expiry window, which is what
// makes closing a document feel instant.
Leave bool `protobuf:"varint,4,opt,name=leave,proto3,oneof"`
}
type PublishItem_Message ¶
type PublishItem_Message struct {
// Broadcast a payload to whoever is watching the topic now. At most
// once, to nobody if nobody is there.
Message []byte `protobuf:"bytes,3,opt,name=message,proto3,oneof"`
}
type PublishItem_Presence ¶
type PublishItem_Presence struct {
// Replace this session's state in the topic. Wholly replaces the
// previous state — there is no field mask and no merge, because soft
// state is re-sent in full on every announce anyway.
Presence *PresenceUpdate `protobuf:"bytes,2,opt,name=presence,proto3,oneof"`
}
type PublishRequest ¶
type PublishRequest struct {
// The publishing session, as named on this account's Watch stream. When
// the serving node holds Watch streams for the session and none of them
// is the caller's, the request is rejected with permission_denied.
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
// The writes, applied in order. At least one, and at most
// Limits.MaxPublishItems. Items are independent: there is no atomicity
// across them and none is implied.
Items []*PublishItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"`
// contains filtered or unexported fields
}
Request to publish presence updates, broadcast messages, or departure notices for a session.
func (*PublishRequest) Descriptor
deprecated
func (*PublishRequest) Descriptor() ([]byte, []int)
Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead.
func (*PublishRequest) GetItems ¶
func (x *PublishRequest) GetItems() []*PublishItem
func (*PublishRequest) GetSessionId ¶
func (x *PublishRequest) GetSessionId() string
func (*PublishRequest) ProtoMessage ¶
func (*PublishRequest) ProtoMessage()
func (*PublishRequest) ProtoReflect ¶
func (x *PublishRequest) ProtoReflect() protoreflect.Message
func (*PublishRequest) Reset ¶
func (x *PublishRequest) Reset()
func (*PublishRequest) String ¶
func (x *PublishRequest) String() string
type PublishResponse ¶
type PublishResponse struct {
// How often a publisher holding no Watch stream must re-publish to keep its
// records alive, and the interval the serving node re-announces on.
//
// A record survives because some node re-announces it, and a node does that
// only for the sessions whose streams it holds. A publisher with no stream
// anywhere is therefore kept alive by its own publishes alone, and lapses
// three of these intervals after the last one. Re-publishing the same state
// at its existing revision refreshes liveness without costing watchers a
// frame.
//
// A client that holds a Watch stream can ignore this — the node serving the
// stream is already doing it.
AnnounceInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=announce_interval,json=announceInterval,proto3" json:"announce_interval,omitempty"`
// contains filtered or unexported fields
}
Response containing publication timing parameters for the session.
func (*PublishResponse) Descriptor
deprecated
func (*PublishResponse) Descriptor() ([]byte, []int)
Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead.
func (*PublishResponse) GetAnnounceInterval ¶
func (x *PublishResponse) GetAnnounceInterval() *durationpb.Duration
func (*PublishResponse) ProtoMessage ¶
func (*PublishResponse) ProtoMessage()
func (*PublishResponse) ProtoReflect ¶
func (x *PublishResponse) ProtoReflect() protoreflect.Message
func (*PublishResponse) Reset ¶
func (x *PublishResponse) Reset()
func (*PublishResponse) String ¶
func (x *PublishResponse) String() string
type PullRequest ¶
type PullRequest struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// Opaque cursor from a previous Pull/Bootstrap/Subscribe. Empty means "from
// the beginning", which the server serves only while the workspace has
// collected no tombstones; once it has, an empty cursor is below the
// collection horizon like any other stale cursor and answers reset=true.
// Clients with no state should therefore Bootstrap: replaying from the
// beginning is not a substitute for it and stops working without warning.
Cursor []byte `protobuf:"bytes,3,opt,name=cursor,proto3" json:"cursor,omitempty"`
// Scopes the sync. Empty = full sync. A mismatch with the subscription
// set the cursor was issued under starts a delta resync: only the
// visible-set difference ships (values in, tombstones/drops out). When the
// old set cannot be reconstructed the server replies reset=true instead.
Subscriptions []*Subscription `protobuf:"bytes,4,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
// Maximum number of changes to return. 0 means "server default"; the
// server clamps to its own maximum either way. When the response is
// truncated, has_more is set and next_cursor resumes the scan.
Limit uint32 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"`
// Entities whose rows this client stores but cannot decode, and so cannot
// fold delta state into. Their rows ship as full snapshots and are never
// named in RowChange.text_deltas. Empty means the client can reconstruct
// every entity it stores.
//
// Delta state assumes the recipient both holds the row as of its cursor and
// can read it, and the server can only judge the first. A client that
// stores rows for an entity outside its own schema — one build keeping
// another build's rows current in a shared local store — names it here, or
// discards and re-bootstraps on every page that carries delta state for it.
NoDeltaEntities []string `protobuf:"bytes,6,rep,name=no_delta_entities,json=noDeltaEntities,proto3" json:"no_delta_entities,omitempty"`
// Lowest workspace sequence this pull may be answered from: the highest
// seq the client has seen a push acked at (MutationResult.seq). A freshness
// floor for servers reading from a replica — without it, a pull served
// from a snapshot older than the client's own acked writes would drop
// their optimistic state and briefly revert them. It never widens what the
// pull returns; the cursor still decides that. 0 (and clients predating
// the field) means no floor beyond the cursor's own position.
MinSeq uint64 `protobuf:"varint,7,opt,name=min_seq,json=minSeq,proto3" json:"min_seq,omitempty"`
// The CallerAccess.version of the summary the client holds for the
// workspace, 0 when it holds none. A client that sets the field can apply
// a CallerAccessDelta, and the response carries one only when it applies
// to this version. Without the field, the response carries a whole
// CallerAccess when the cursor was issued under another one.
CallerAccessVersion *uint64 `` /* 128-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*PullRequest) Descriptor
deprecated
func (*PullRequest) Descriptor() ([]byte, []int)
Deprecated: Use PullRequest.ProtoReflect.Descriptor instead.
func (*PullRequest) GetCallerAccessVersion ¶ added in v0.2.0
func (x *PullRequest) GetCallerAccessVersion() uint64
func (*PullRequest) GetClientId ¶
func (x *PullRequest) GetClientId() string
func (*PullRequest) GetCursor ¶
func (x *PullRequest) GetCursor() []byte
func (*PullRequest) GetLimit ¶
func (x *PullRequest) GetLimit() uint32
func (*PullRequest) GetMinSeq ¶
func (x *PullRequest) GetMinSeq() uint64
func (*PullRequest) GetNoDeltaEntities ¶
func (x *PullRequest) GetNoDeltaEntities() []string
func (*PullRequest) GetSubscriptions ¶
func (x *PullRequest) GetSubscriptions() []*Subscription
func (*PullRequest) GetWorkspaceId ¶
func (x *PullRequest) GetWorkspaceId() string
func (*PullRequest) ProtoMessage ¶
func (*PullRequest) ProtoMessage()
func (*PullRequest) ProtoReflect ¶
func (x *PullRequest) ProtoReflect() protoreflect.Message
func (*PullRequest) Reset ¶
func (x *PullRequest) Reset()
func (*PullRequest) String ¶
func (x *PullRequest) String() string
type PullResponse ¶
type PullResponse struct {
Patch *Patch `protobuf:"bytes,1,opt,name=patch,proto3" json:"patch,omitempty"`
// Where to resume. A Pull response always carries one. A Subscribe page
// frame carries one only at a checkpoint when the client set
// sparse_cursor: empty then means "keep the cursor you hold", and the
// frames since the last checkpoint are re-delivered if the stream is
// reopened. Empty is never a valid cursor to store.
NextCursor []byte `protobuf:"bytes,2,opt,name=next_cursor,json=nextCursor,proto3" json:"next_cursor,omitempty"`
// Highest mutation id the server has applied for this client and caller
// (see WorkspaceBatch); the client drops pending mutations at or below it
// during rebase.
LastAckedMutationId uint64 `protobuf:"varint,3,opt,name=last_acked_mutation_id,json=lastAckedMutationId,proto3" json:"last_acked_mutation_id,omitempty"`
// True when the client must discard local state and re-bootstrap: the
// cursor predates the tombstone horizon, or its scope changed in a way the
// server cannot delta-resync (old subscriptions unknown, filter epoch not
// reconstructable, or another change landed mid-resync). On Subscribe the
// same condition arrives as a WorkspaceDropped frame instead.
Reset_ bool `protobuf:"varint,4,opt,name=reset,proto3" json:"reset,omitempty"`
// True when the response was truncated by the limit; pull again from
// next_cursor to continue.
HasMore bool `protobuf:"varint,5,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
// Workspace sequence this response is current through (the position
// next_cursor encodes). Lets clients judge how far behind they are without
// decoding the opaque cursor. Unset when reset is true.
Seq uint64 `protobuf:"varint,6,opt,name=seq,proto3" json:"seq,omitempty"`
// The server's app-defined schema revision (see WithSchemaRevision). Empty
// when the server advertises none (an older build, or the option unset). A
// client configured with its own revision compares the two and reacts to a
// mismatch per its skew policy.
SchemaRevision string `protobuf:"bytes,7,opt,name=schema_revision,json=schemaRevision,proto3" json:"schema_revision,omitempty"`
// What the caller holds in the workspace under the access model. Present
// when it differs from what the request's cursor was issued under, and on
// a response to a request without a cursor. Absent otherwise, and in a
// schema without the access model: the client keeps the last one it
// received.
CallerAccess *CallerAccess `protobuf:"bytes,8,opt,name=caller_access,json=callerAccess,proto3" json:"caller_access,omitempty"`
// Delta for the CallerAccess identified by
// PullRequest.caller_access_version, sent in place of caller_access. The
// response contains at most one of caller_access or caller_access_delta.
// Only a request that sets caller_access_version receives this field.
CallerAccessDelta *CallerAccessDelta `protobuf:"bytes,9,opt,name=caller_access_delta,json=callerAccessDelta,proto3" json:"caller_access_delta,omitempty"`
// Mutations of this client and caller that the server acknowledged as
// applied and rejected after that, ordered by mutation id. See
// `LateRejection`. A reset response carries none.
LateRejections []*LateRejection `protobuf:"bytes,10,rep,name=late_rejections,json=lateRejections,proto3" json:"late_rejections,omitempty"`
// The workspace's sequence when the server served this response: the
// newest write it holds. head_seq - seq is how many sequences of writes
// the client has not pulled yet, 0 when it is up to date. The distance
// counts writes, not rows: one write can change many rows, and a write the
// caller may not read still takes a sequence. 0 means the server gives no
// head (an older build), and is also the value on a reset response.
HeadSeq uint64 `protobuf:"varint,11,opt,name=head_seq,json=headSeq,proto3" json:"head_seq,omitempty"`
// contains filtered or unexported fields
}
func (*PullResponse) Descriptor
deprecated
func (*PullResponse) Descriptor() ([]byte, []int)
Deprecated: Use PullResponse.ProtoReflect.Descriptor instead.
func (*PullResponse) GetCallerAccess ¶ added in v0.2.0
func (x *PullResponse) GetCallerAccess() *CallerAccess
func (*PullResponse) GetCallerAccessDelta ¶ added in v0.2.0
func (x *PullResponse) GetCallerAccessDelta() *CallerAccessDelta
func (*PullResponse) GetHasMore ¶
func (x *PullResponse) GetHasMore() bool
func (*PullResponse) GetHeadSeq ¶ added in v0.7.0
func (x *PullResponse) GetHeadSeq() uint64
func (*PullResponse) GetLastAckedMutationId ¶
func (x *PullResponse) GetLastAckedMutationId() uint64
func (*PullResponse) GetLateRejections ¶ added in v0.6.0
func (x *PullResponse) GetLateRejections() []*LateRejection
func (*PullResponse) GetNextCursor ¶
func (x *PullResponse) GetNextCursor() []byte
func (*PullResponse) GetPatch ¶
func (x *PullResponse) GetPatch() *Patch
func (*PullResponse) GetReset_ ¶
func (x *PullResponse) GetReset_() bool
func (*PullResponse) GetSchemaRevision ¶
func (x *PullResponse) GetSchemaRevision() string
func (*PullResponse) GetSeq ¶
func (x *PullResponse) GetSeq() uint64
func (*PullResponse) ProtoMessage ¶
func (*PullResponse) ProtoMessage()
func (*PullResponse) ProtoReflect ¶
func (x *PullResponse) ProtoReflect() protoreflect.Message
func (*PullResponse) Reset ¶
func (x *PullResponse) Reset()
func (*PullResponse) String ¶
func (x *PullResponse) String() string
type PushRequest ¶
type PushRequest struct {
// One batch per workspace. Batches are independent: each is gated,
// authorized and committed on its own, and the order they are applied in is
// unspecified. Two batches naming the same workspace are rejected.
Batches []*WorkspaceBatch `protobuf:"bytes,1,rep,name=batches,proto3" json:"batches,omitempty"`
// contains filtered or unexported fields
}
func (*PushRequest) Descriptor
deprecated
func (*PushRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.
func (*PushRequest) GetBatches ¶
func (x *PushRequest) GetBatches() []*WorkspaceBatch
func (*PushRequest) ProtoMessage ¶
func (*PushRequest) ProtoMessage()
func (*PushRequest) ProtoReflect ¶
func (x *PushRequest) ProtoReflect() protoreflect.Message
func (*PushRequest) Reset ¶
func (x *PushRequest) Reset()
func (*PushRequest) String ¶
func (x *PushRequest) String() string
type PushResponse ¶
type PushResponse struct {
// One entry per submitted batch, in request order.
Results []*WorkspaceResults `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
// The server's app-defined schema revision; see
// PullResponse.schema_revision. Carried here too so a client learns of skew
// on the WRITE path — the sync cycle pushes before it pulls, so without
// this the first cycle after a deploy always pushes against a skewed server
// before a "block" policy can engage.
SchemaRevision string `protobuf:"bytes,2,opt,name=schema_revision,json=schemaRevision,proto3" json:"schema_revision,omitempty"`
// contains filtered or unexported fields
}
func (*PushResponse) Descriptor
deprecated
func (*PushResponse) Descriptor() ([]byte, []int)
Deprecated: Use PushResponse.ProtoReflect.Descriptor instead.
func (*PushResponse) GetResults ¶
func (x *PushResponse) GetResults() []*WorkspaceResults
func (*PushResponse) GetSchemaRevision ¶
func (x *PushResponse) GetSchemaRevision() string
func (*PushResponse) ProtoMessage ¶
func (*PushResponse) ProtoMessage()
func (*PushResponse) ProtoReflect ¶
func (x *PushResponse) ProtoReflect() protoreflect.Message
func (*PushResponse) Reset ¶
func (x *PushResponse) Reset()
func (*PushResponse) String ¶
func (x *PushResponse) String() string
type PutChunkRequest ¶ added in v0.4.0
type PutChunkRequest struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
Digest string `protobuf:"bytes,2,opt,name=digest,proto3" json:"digest,omitempty"`
// The chunk's position, from 0.
Index uint32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
// The chunk's bytes: 8 MiB for every chunk except the last.
Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*PutChunkRequest) Descriptor
deprecated
added in
v0.4.0
func (*PutChunkRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutChunkRequest.ProtoReflect.Descriptor instead.
func (*PutChunkRequest) GetData ¶ added in v0.4.0
func (x *PutChunkRequest) GetData() []byte
func (*PutChunkRequest) GetDigest ¶ added in v0.4.0
func (x *PutChunkRequest) GetDigest() string
func (*PutChunkRequest) GetIndex ¶ added in v0.4.0
func (x *PutChunkRequest) GetIndex() uint32
func (*PutChunkRequest) GetWorkspaceId ¶ added in v0.4.0
func (x *PutChunkRequest) GetWorkspaceId() string
func (*PutChunkRequest) ProtoMessage ¶ added in v0.4.0
func (*PutChunkRequest) ProtoMessage()
func (*PutChunkRequest) ProtoReflect ¶ added in v0.4.0
func (x *PutChunkRequest) ProtoReflect() protoreflect.Message
func (*PutChunkRequest) Reset ¶ added in v0.4.0
func (x *PutChunkRequest) Reset()
func (*PutChunkRequest) String ¶ added in v0.4.0
func (x *PutChunkRequest) String() string
type PutChunkResponse ¶ added in v0.4.0
type PutChunkResponse struct {
// `BLOB_STATE_COMPLETE` when this call stored the last missing chunk, or
// when the blob was already complete. Otherwise `BLOB_STATE_UPLOADING`.
State BlobState `protobuf:"varint,1,opt,name=state,proto3,enum=syncplane.v1.BlobState" json:"state,omitempty"`
// contains filtered or unexported fields
}
func (*PutChunkResponse) Descriptor
deprecated
added in
v0.4.0
func (*PutChunkResponse) Descriptor() ([]byte, []int)
Deprecated: Use PutChunkResponse.ProtoReflect.Descriptor instead.
func (*PutChunkResponse) GetState ¶ added in v0.4.0
func (x *PutChunkResponse) GetState() BlobState
func (*PutChunkResponse) ProtoMessage ¶ added in v0.4.0
func (*PutChunkResponse) ProtoMessage()
func (*PutChunkResponse) ProtoReflect ¶ added in v0.4.0
func (x *PutChunkResponse) ProtoReflect() protoreflect.Message
func (*PutChunkResponse) Reset ¶ added in v0.4.0
func (x *PutChunkResponse) Reset()
func (*PutChunkResponse) String ¶ added in v0.4.0
func (x *PutChunkResponse) String() string
type QueryFacet ¶
type QueryFacet struct {
// Path from the entity root, specified as one field name per element.
//
// Matches the format of `QueryRequest.group_by`. Supported leaf fields
// include comparable scalars and repeated scalars. Repeated scalars count
// once per element.
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
// Groups produced by the match set at `path`.
//
// Each group contains the count of matching rows that hold that value.
// Groups are ordered by value in ascending order, with the group for unset
// values placed last. This field is empty in a request.
Groups []*QueryGroup `protobuf:"bytes,2,rep,name=groups,proto3" json:"groups,omitempty"`
// contains filtered or unexported fields
}
Defines one facet axis for a row query.
In a request, `QueryFacet` specifies the path used to group and count matches. In a response, it echoes the path along with the resulting groups. Facets are supplied in `QueryRequest.facets` and returned in `QueryResponse.facets` in the same order.
func (*QueryFacet) Descriptor
deprecated
func (*QueryFacet) Descriptor() ([]byte, []int)
Deprecated: Use QueryFacet.ProtoReflect.Descriptor instead.
func (*QueryFacet) GetGroups ¶
func (x *QueryFacet) GetGroups() []*QueryGroup
func (*QueryFacet) GetPath ¶
func (x *QueryFacet) GetPath() []string
func (*QueryFacet) ProtoMessage ¶
func (*QueryFacet) ProtoMessage()
func (*QueryFacet) ProtoReflect ¶
func (x *QueryFacet) ProtoReflect() protoreflect.Message
func (*QueryFacet) Reset ¶
func (x *QueryFacet) Reset()
func (*QueryFacet) String ¶
func (x *QueryFacet) String() string
type QueryGroup ¶
type QueryGroup struct {
// Shared value for rows in this group.
//
// This field is unset for the group of rows that have no value at the
// path. That group forms its own distinct group and orders last.
Value *QueryValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// Number of matching rows in the group.
//
// This value is `0` when using `AGGREGATE_OP_DISTINCT`.
Count uint64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
// contains filtered or unexported fields
}
Represents a single group from a grouped read.
Contains the value shared by rows at the grouping path and the result of the aggregate computation for that group.
func (*QueryGroup) Descriptor
deprecated
func (*QueryGroup) Descriptor() ([]byte, []int)
Deprecated: Use QueryGroup.ProtoReflect.Descriptor instead.
func (*QueryGroup) GetCount ¶
func (x *QueryGroup) GetCount() uint64
func (*QueryGroup) GetValue ¶
func (x *QueryGroup) GetValue() *QueryValue
func (*QueryGroup) ProtoMessage ¶
func (*QueryGroup) ProtoMessage()
func (*QueryGroup) ProtoReflect ¶
func (x *QueryGroup) ProtoReflect() protoreflect.Message
func (*QueryGroup) Reset ¶
func (x *QueryGroup) Reset()
func (*QueryGroup) String ¶
func (x *QueryGroup) String() string
type QueryRequest ¶
type QueryRequest struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
// Entity name declared in `EntityOptions`.
Entity string `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"`
// When unset, matches all rows. Read filters still apply.
Predicate *Condition `protobuf:"bytes,4,opt,name=predicate,proto3" json:"predicate,omitempty"`
OrderBy []*OrderKey `protobuf:"bytes,5,rep,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
// Maximum rows to return. A value of 0 uses the server default. The server
// clamps the limit to its own maximum in both cases.
Limit uint32 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"`
// Number of rows to skip after ordering.
//
// The server rejects offsets beyond the server maximum instead of clamping
// them. The server also rejects requests that set `offset` alongside
// `after` or `before`.
Offset uint32 `protobuf:"varint,7,opt,name=offset,proto3" json:"offset,omitempty"`
// Exclusive lower bound. Only rows that sort strictly after this position
// are returned.
//
// Opaque bytes from a prior `QueryResponse` of the same query:
// `end_cursor` to step forward, or `start_cursor` to bound the page below.
//
// A cursor is tied to the (`entity`, `order_by`) pair it was issued under.
// The server returns `INVALID_ARGUMENT` if a cursor is replayed against a
// different entity or ordering, or sent alongside a non-zero `offset`.
//
// `limit` counts forward from this bound.
After []byte `protobuf:"bytes,8,opt,name=after,proto3" json:"after,omitempty"`
// Exclusive upper bound. Only rows that sort strictly before this position
// are returned. Follows the same rules as `after`.
//
// When only `before` is set, `limit` counts backward from this bound.
// Passing a page's `start_cursor` returns the preceding page.
//
// When both `after` and `before` are set, the request reads a bounded
// range and `limit` counts forward from `after`.
//
// Rows always return in `order_by` order regardless of which bounds are
// set.
Before []byte `protobuf:"bytes,9,opt,name=before,proto3" json:"before,omitempty"`
// Partitions matching rows by the value at this path and returns groups
// instead of individual rows. The `aggregate` field defines what to compute
// for each partition. When unset, executes a standard row query.
//
// Groups return in ascending value order, with the no-value group last.
// `limit` caps the number of returned groups.
//
// The server rejects requests that set `offset`, `after`, or `before`
// alongside `group_by`. The server also rejects `order_by` under an
// aggregate that returns numbers: only `AGGREGATE_OP_ROWS` has rows to
// order.
//
// A path through a repeated field groups per element. A row with multiple
// elements joins multiple groups, so counts do not sum to the number of
// matching rows.
//
// Only groups that the match set produces exist. A value that no matching
// row holds is omitted rather than returned with zero.
GroupBy []string `protobuf:"bytes,10,rep,name=group_by,json=groupBy,proto3" json:"group_by,omitempty"`
// Operation to compute per group. Required with `group_by`. The server
// rejects this field without `group_by`.
Aggregate AggregateOp `protobuf:"varint,11,opt,name=aggregate,proto3,enum=syncplane.v1.AggregateOp" json:"aggregate,omitempty"`
// Number of rows to return per group under `AGGREGATE_OP_ROWS`, counted
// from the first in `order_by` order. Required with `AGGREGATE_OP_ROWS`,
// and rejected under every other aggregate.
//
// The response carries `limit` × `per_group` rows. The server clamps both
// fields against the row maximum of an ungrouped page. A request that asks
// for more groups than that maximum permits receives the first groups,
// with `has_more` set to true.
PerGroup uint32 `protobuf:"varint,12,opt,name=per_group,json=perGroup,proto3" json:"per_group,omitempty"`
// Whether each row group reports the total count of rows it holds.
//
// Computing the total evaluates every matching row in each returned group,
// rather than only `per_group` rows. Defaults to false. Ignored without
// `AGGREGATE_OP_ROWS`.
PerGroupTotal bool `protobuf:"varint,13,opt,name=per_group_total,json=perGroupTotal,proto3" json:"per_group_total,omitempty"`
// Per-value counts of the match set, with one `QueryFacet` per axis naming
// a path. Results appear in `QueryResponse.facets` in the same order.
//
// A facet counts every row admitted by the predicate and cursor bounds,
// not only the rows on the returned page. Counts sum to what the page
// `total` would be, except on a repeated path, which counts per element
// (see `group_by`).
//
// Evaluating facets inspects every matching row rather than only the page.
// A request with facets costs the same as an unlimited read of the
// predicate, but the response remains a page.
//
// Rejected if `group_by` is set. Capped by `MaxQueryFacets` on the server.
Facets []*QueryFacet `protobuf:"bytes,14,rep,name=facets,proto3" json:"facets,omitempty"`
// contains filtered or unexported fields
}
func (*QueryRequest) Descriptor
deprecated
func (*QueryRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) GetAfter ¶
func (x *QueryRequest) GetAfter() []byte
func (*QueryRequest) GetAggregate ¶
func (x *QueryRequest) GetAggregate() AggregateOp
func (*QueryRequest) GetBefore ¶
func (x *QueryRequest) GetBefore() []byte
func (*QueryRequest) GetEntity ¶
func (x *QueryRequest) GetEntity() string
func (*QueryRequest) GetFacets ¶
func (x *QueryRequest) GetFacets() []*QueryFacet
func (*QueryRequest) GetGroupBy ¶
func (x *QueryRequest) GetGroupBy() []string
func (*QueryRequest) GetLimit ¶
func (x *QueryRequest) GetLimit() uint32
func (*QueryRequest) GetOffset ¶
func (x *QueryRequest) GetOffset() uint32
func (*QueryRequest) GetOrderBy ¶
func (x *QueryRequest) GetOrderBy() []*OrderKey
func (*QueryRequest) GetPerGroup ¶
func (x *QueryRequest) GetPerGroup() uint32
func (*QueryRequest) GetPerGroupTotal ¶
func (x *QueryRequest) GetPerGroupTotal() bool
func (*QueryRequest) GetPredicate ¶
func (x *QueryRequest) GetPredicate() *Condition
func (*QueryRequest) GetWorkspaceId ¶
func (x *QueryRequest) GetWorkspaceId() string
func (*QueryRequest) ProtoMessage ¶
func (*QueryRequest) ProtoMessage()
func (*QueryRequest) ProtoReflect ¶
func (x *QueryRequest) ProtoReflect() protoreflect.Message
func (*QueryRequest) Reset ¶
func (x *QueryRequest) Reset()
func (*QueryRequest) String ¶
func (x *QueryRequest) String() string
type QueryResponse ¶
type QueryResponse struct {
// Contains value changes only, never tombstones. Ordered by `order_by`,
// with ties broken by row key ascending.
Rows []*RowChange `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"`
// The server schema revision. Callers use this field to detect schema
// skew. See `PullResponse.schema_revision`.
SchemaRevision string `protobuf:"bytes,2,opt,name=schema_revision,json=schemaRevision,proto3" json:"schema_revision,omitempty"`
// Position of the first returned row, used for pagination. Send this value
// as `before` to fetch the previous page. Send `end_cursor` as `after` to
// fetch the next page. Both cursors are empty when the page is empty.
StartCursor []byte `protobuf:"bytes,3,opt,name=start_cursor,json=startCursor,proto3" json:"start_cursor,omitempty"`
EndCursor []byte `protobuf:"bytes,4,opt,name=end_cursor,json=endCursor,proto3" json:"end_cursor,omitempty"`
// Whether rows remain past the end `limit` counted from — after end_cursor
// for a forward page, before start_cursor for a backward one. False for an
// unlimited query, which returns everything that matched. Under `group_by`
// it reports whether groups remain past `limit` instead.
HasMore bool `protobuf:"varint,5,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
// The groups of a request carrying `group_by` with a counting aggregate, in
// ascending value order with the no-value group last; empty otherwise.
// `rows`, `start_cursor` and `end_cursor` are all empty whenever a request
// grouped.
Groups []*QueryGroup `protobuf:"bytes,6,rep,name=groups,proto3" json:"groups,omitempty"`
// The groups of a request carrying `group_by` with AGGREGATE_OP_ROWS, in
// the same order; empty otherwise.
RowGroups []*QueryRowGroup `protobuf:"bytes,7,rep,name=row_groups,json=rowGroups,proto3" json:"row_groups,omitempty"`
// The facets of a request carrying `facets`, one per requested axis in
// request order, each echoing its path; empty otherwise.
Facets []*QueryFacet `protobuf:"bytes,8,rep,name=facets,proto3" json:"facets,omitempty"`
// contains filtered or unexported fields
}
Contains the results of a `QueryRequest`.
func (*QueryResponse) Descriptor
deprecated
func (*QueryResponse) Descriptor() ([]byte, []int)
Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead.
func (*QueryResponse) GetEndCursor ¶
func (x *QueryResponse) GetEndCursor() []byte
func (*QueryResponse) GetFacets ¶
func (x *QueryResponse) GetFacets() []*QueryFacet
func (*QueryResponse) GetGroups ¶
func (x *QueryResponse) GetGroups() []*QueryGroup
func (*QueryResponse) GetHasMore ¶
func (x *QueryResponse) GetHasMore() bool
func (*QueryResponse) GetRowGroups ¶
func (x *QueryResponse) GetRowGroups() []*QueryRowGroup
func (*QueryResponse) GetRows ¶
func (x *QueryResponse) GetRows() []*RowChange
func (*QueryResponse) GetSchemaRevision ¶
func (x *QueryResponse) GetSchemaRevision() string
func (*QueryResponse) GetStartCursor ¶
func (x *QueryResponse) GetStartCursor() []byte
func (*QueryResponse) ProtoMessage ¶
func (*QueryResponse) ProtoMessage()
func (*QueryResponse) ProtoReflect ¶
func (x *QueryResponse) ProtoReflect() protoreflect.Message
func (*QueryResponse) Reset ¶
func (x *QueryResponse) Reset()
func (*QueryResponse) String ¶
func (x *QueryResponse) String() string
type QueryRowGroup ¶
type QueryRowGroup struct {
// The shared value, absent for the group of rows that hold no value at the
// path — a group of its own, ordered last.
Value *QueryValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// The group's first rows, at most QueryRequest.per_group of them, ordered
// by order_by with ties broken by row key ascending. Value changes only,
// never tombstones.
Rows []*RowChange `protobuf:"bytes,2,rep,name=rows,proto3" json:"rows,omitempty"`
// Matching rows in the group in all, or 0 when the request did not ask for
// it — a group that holds no matching row does not come back at all, so 0
// never means "empty".
Total uint64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"`
// Whether the group holds rows past the ones returned.
HasMore bool `protobuf:"varint,4,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
// contains filtered or unexported fields
}
QueryRowGroup is one group of a read that answers with rows: the value its rows share at the grouping path, and the first of them in order_by order.
func (*QueryRowGroup) Descriptor
deprecated
func (*QueryRowGroup) Descriptor() ([]byte, []int)
Deprecated: Use QueryRowGroup.ProtoReflect.Descriptor instead.
func (*QueryRowGroup) GetHasMore ¶
func (x *QueryRowGroup) GetHasMore() bool
func (*QueryRowGroup) GetRows ¶
func (x *QueryRowGroup) GetRows() []*RowChange
func (*QueryRowGroup) GetTotal ¶
func (x *QueryRowGroup) GetTotal() uint64
func (*QueryRowGroup) GetValue ¶
func (x *QueryRowGroup) GetValue() *QueryValue
func (*QueryRowGroup) ProtoMessage ¶
func (*QueryRowGroup) ProtoMessage()
func (*QueryRowGroup) ProtoReflect ¶
func (x *QueryRowGroup) ProtoReflect() protoreflect.Message
func (*QueryRowGroup) Reset ¶
func (x *QueryRowGroup) Reset()
func (*QueryRowGroup) String ¶
func (x *QueryRowGroup) String() string
type QueryValue ¶
type QueryValue struct {
// Types that are valid to be assigned to Kind:
//
// *QueryValue_StringValue
// *QueryValue_DoubleValue
// *QueryValue_IntValue
// *QueryValue_UintValue
// *QueryValue_BoolValue
Kind isQueryValue_Kind `protobuf_oneof:"kind"`
// contains filtered or unexported fields
}
Holds a scalar literal value in a condition.
The selected branch preserves the client-side type so evaluation coercion rules match on both sides. JavaScript numbers travel as `double_value`, and JavaScript bigints travel as `int_value` or `uint_value`.
func (*QueryValue) Descriptor
deprecated
func (*QueryValue) Descriptor() ([]byte, []int)
Deprecated: Use QueryValue.ProtoReflect.Descriptor instead.
func (*QueryValue) GetBoolValue ¶
func (x *QueryValue) GetBoolValue() bool
func (*QueryValue) GetDoubleValue ¶
func (x *QueryValue) GetDoubleValue() float64
func (*QueryValue) GetIntValue ¶
func (x *QueryValue) GetIntValue() int64
func (*QueryValue) GetKind ¶
func (x *QueryValue) GetKind() isQueryValue_Kind
func (*QueryValue) GetStringValue ¶
func (x *QueryValue) GetStringValue() string
func (*QueryValue) GetUintValue ¶
func (x *QueryValue) GetUintValue() uint64
func (*QueryValue) ProtoMessage ¶
func (*QueryValue) ProtoMessage()
func (*QueryValue) ProtoReflect ¶
func (x *QueryValue) ProtoReflect() protoreflect.Message
func (*QueryValue) Reset ¶
func (x *QueryValue) Reset()
func (*QueryValue) String ¶
func (x *QueryValue) String() string
type QueryValue_BoolValue ¶
type QueryValue_BoolValue struct {
BoolValue bool `protobuf:"varint,5,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type QueryValue_DoubleValue ¶
type QueryValue_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,2,opt,name=double_value,json=doubleValue,proto3,oneof"`
}
type QueryValue_IntValue ¶
type QueryValue_IntValue struct {
IntValue int64 `protobuf:"zigzag64,3,opt,name=int_value,json=intValue,proto3,oneof"`
}
type QueryValue_StringValue ¶
type QueryValue_StringValue struct {
StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
}
type QueryValue_UintValue ¶
type QueryValue_UintValue struct {
// Holds a JavaScript bigint that exceeds the `int64` range.
UintValue uint64 `protobuf:"varint,4,opt,name=uint_value,json=uintValue,proto3,oneof"`
}
type RefPath ¶
type RefPath struct {
// The ordered list of relation segments to traverse.
Segments []string `protobuf:"bytes,1,rep,name=segments,proto3" json:"segments,omitempty"`
// contains filtered or unexported fields
}
RefPath names a chain of reference relations to follow from a root entity. Each segment is a forward ref field name or a reverse-relation name (the emitter resolves direction from the ref graph). Used by both query-time hydration (include) and reference-following subscriptions (follow).
func (*RefPath) Descriptor
deprecated
func (*RefPath) GetSegments ¶
func (*RefPath) ProtoMessage ¶
func (*RefPath) ProtoMessage()
func (*RefPath) ProtoReflect ¶
func (x *RefPath) ProtoReflect() protoreflect.Message
type ReferenceOptions ¶
type ReferenceOptions struct {
// contains filtered or unexported fields
}
Declares a message as a reference message: the stored shape of a typed reference that can cross workspace boundaries.
A field whose message type is an entity is already a reference, and it resolves inside the holder's workspace because a stored stub carries only the target's key fields. A reference message wraps that stub together with the workspace it lives in:
```protobuf
message PersonRef {
option (syncplane.v1.reference) = {};
string workspace_id = 1 [(syncplane.v1.field_behavior).workspace = true];
Person person = 2;
}
message Task {
PersonRef assignee = 2;
repeated PersonRef watchers = 3;
}
```
A field of a reference message type is a reference like any other: it gets the forward accessor, the reverse relation on the target, the follow segment, and the derived index, and its target is the entity the embedded field names. The message holds the entity field (or the oneof of entity fields) and the workspace field and nothing else; any other field is rejected at registration. Specifically, it must carry exactly one singular entity-typed field — or a oneof whose members are all singular entity-typed fields, making it a polymorphic reference — and at most one string field marked `(syncplane.v1.field_behavior).workspace` outside any oneof. An empty or unset workspace value means the holder's own workspace, so a reference message without the workspace field is a same-workspace reference with an explicit stored shape.
```protobuf
message OwnerRef {
option (syncplane.v1.reference) = {};
string workspace_id = 1 [(syncplane.v1.field_behavior).workspace = true];
oneof owner {
Person person = 2;
Team team = 3;
}
}
```
Each member of the oneof is a case with its own reverse relation on its target and its own derived index that a query names as `owner.person`, and a stored value holds at most one case. A oneof of references on the holder itself is polymorphic too, named by the oneof; its members may be entity-typed fields, reference messages, and plain fields alike, where only the references are cases.
A reference message is replaced whole on every write: a PATCH mask that names one names the whole message, so the workspace and the key never split. A repeated reference message merges as a set whose elements are identified by workspace and key and case together, so a PATCH adds or removes one element without touching the others. An element naming no workspace and one naming the holder's own workspace are two elements, even though they resolve to the same row.
Reading is client-local: a client resolves each stub in the workspace it names, from the workspaces it holds. The server evaluates `matches()`, `include`, and `follow` inside the request's workspace only, so a stub that names another workspace resolves to nothing there.
func (*ReferenceOptions) Descriptor
deprecated
func (*ReferenceOptions) Descriptor() ([]byte, []int)
Deprecated: Use ReferenceOptions.ProtoReflect.Descriptor instead.
func (*ReferenceOptions) ProtoMessage ¶
func (*ReferenceOptions) ProtoMessage()
func (*ReferenceOptions) ProtoReflect ¶
func (x *ReferenceOptions) ProtoReflect() protoreflect.Message
func (*ReferenceOptions) Reset ¶
func (x *ReferenceOptions) Reset()
func (*ReferenceOptions) String ¶
func (x *ReferenceOptions) String() string
type RegisterRequest ¶
type RegisterRequest struct {
// Routing and storage partition key for the application.
//
// This value is not encoded in the Protocol Buffer package. Different
// applications can define identical message names without collision.
// Required.
AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
// Serialized `google.protobuf.FileDescriptorSet` for the application.
//
// Must be self-contained and bundle `descriptor.proto`,
// `syncplane/v1/options.proto`, and the synthesized entity files.
// Required.
DescriptorSet []byte `protobuf:"bytes,2,opt,name=descriptor_set,json=descriptorSet,proto3" json:"descriptor_set,omitempty"`
// Optimistic-concurrency guard revision.
//
// If set, the server rejects the registration with `FAILED_PRECONDITION`
// unless this value matches the current revision of the application. If
// empty, the server does not check the revision.
ExpectedRevision string `protobuf:"bytes,3,opt,name=expected_revision,json=expectedRevision,proto3" json:"expected_revision,omitempty"`
// Permits changes to the access model of an already registered entity: its
// `access` or `grant` options, or the enum value names that its role field
// matches.
//
// If `false`, the server rejects such changes with `FAILED_PRECONDITION`.
// Changing the access model causes all clients to resync the affected
// rows.
AllowAccessChange bool `protobuf:"varint,4,opt,name=allow_access_change,json=allowAccessChange,proto3" json:"allow_access_change,omitempty"`
// contains filtered or unexported fields
}
Request to register or update an application schema.
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetAllowAccessChange ¶ added in v0.2.0
func (x *RegisterRequest) GetAllowAccessChange() bool
func (*RegisterRequest) GetAppId ¶
func (x *RegisterRequest) GetAppId() string
func (*RegisterRequest) GetDescriptorSet ¶
func (x *RegisterRequest) GetDescriptorSet() []byte
func (*RegisterRequest) GetExpectedRevision ¶
func (x *RegisterRequest) GetExpectedRevision() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type RegisterResponse ¶
type RegisterResponse struct {
// Schema revision of the application after registration.
//
// This value is a stable hash of the canonical descriptor set bytes.
// Clients observe this value as `SchemaRevision`.
Revision string `protobuf:"bytes,1,opt,name=revision,proto3" json:"revision,omitempty"`
// The outcome of the registration request.
Status RegisterStatus `protobuf:"varint,2,opt,name=status,proto3,enum=syncplane.v1.RegisterStatus" json:"status,omitempty"`
// The sorted list of entity wire names registered for this application.
EntityNames []string `protobuf:"bytes,3,rep,name=entity_names,json=entityNames,proto3" json:"entity_names,omitempty"`
// contains filtered or unexported fields
}
Result of a schema registration request.
func (*RegisterResponse) Descriptor
deprecated
func (*RegisterResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterResponse.ProtoReflect.Descriptor instead.
func (*RegisterResponse) GetEntityNames ¶
func (x *RegisterResponse) GetEntityNames() []string
func (*RegisterResponse) GetRevision ¶
func (x *RegisterResponse) GetRevision() string
func (*RegisterResponse) GetStatus ¶
func (x *RegisterResponse) GetStatus() RegisterStatus
func (*RegisterResponse) ProtoMessage ¶
func (*RegisterResponse) ProtoMessage()
func (*RegisterResponse) ProtoReflect ¶
func (x *RegisterResponse) ProtoReflect() protoreflect.Message
func (*RegisterResponse) Reset ¶
func (x *RegisterResponse) Reset()
func (*RegisterResponse) String ¶
func (x *RegisterResponse) String() string
type RegisterStatus ¶
type RegisterStatus int32
Outcome of a schema registration request.
const ( // Default value. Do not use. RegisterStatus_REGISTER_STATUS_UNSPECIFIED RegisterStatus = 0 // The server registered a new application. RegisterStatus_REGISTER_STATUS_CREATED RegisterStatus = 1 // The server additively updated an existing application schema. RegisterStatus_REGISTER_STATUS_UPDATED RegisterStatus = 2 // The submitted schema was identical to the registered schema. The server // made no changes. RegisterStatus_REGISTER_STATUS_UNCHANGED RegisterStatus = 3 )
func (RegisterStatus) Descriptor ¶
func (RegisterStatus) Descriptor() protoreflect.EnumDescriptor
func (RegisterStatus) Enum ¶
func (x RegisterStatus) Enum() *RegisterStatus
func (RegisterStatus) EnumDescriptor
deprecated
func (RegisterStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use RegisterStatus.Descriptor instead.
func (RegisterStatus) Number ¶
func (x RegisterStatus) Number() protoreflect.EnumNumber
func (RegisterStatus) String ¶
func (x RegisterStatus) String() string
func (RegisterStatus) Type ¶
func (RegisterStatus) Type() protoreflect.EnumType
type RelCond ¶
type RelCond struct {
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
Cond *Condition `protobuf:"bytes,2,opt,name=cond,proto3" json:"cond,omitempty"`
// contains filtered or unexported fields
}
Matches a row when at least one referenced row at `path` exists and satisfies `cond`.
This operation performs a one-hop semi-join. The `path` field names a forward reference field on the entity, which can be singular or repeated. Paths in `cond` are relative to the target entity's row. The condition evaluates to `false` for unset to-one references, orphaned stubs, and tombstoned targets.
The schema derives the target entity from the reference graph, so this message has no target entity field. Validation rejects a `RelCond` if `path` does not name a reference field, or if `RelCond` is nested inside another `RelCond` or `ExistsCond`.
Both evaluators execute this condition as a two-phase rewrite: the inner condition selects matching target keys, and the node collapses to a membership test on the stored reference stubs. This rewrite does not appear on the wire.
func (*RelCond) Descriptor
deprecated
func (*RelCond) ProtoMessage ¶
func (*RelCond) ProtoMessage()
func (*RelCond) ProtoReflect ¶
func (x *RelCond) ProtoReflect() protoreflect.Message
type RepCond ¶
type RepCond struct {
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
Op RepOp `protobuf:"varint,2,opt,name=op,proto3,enum=syncplane.v1.RepOp" json:"op,omitempty"`
// Specifies the literal values to compare against the repeated field.
//
// `HAS` reads `values[0]`. `HAS_ANY` and `HAS_ALL` read all values in the
// list. `IS_EMPTY` reads no values.
Values []*QueryValue `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
// contains filtered or unexported fields
}
Evaluates conditions against a repeated field as a whole.
Membership operators (`HAS`, `HAS_ANY`, and `HAS_ALL`) compare elements. The field must contain comparable elements: a repeated scalar or a repeated single-key reference. Both sides rewrite a repeated single-key reference to an `ExistsCond` over the target field's key before evaluating it. To test membership in a repeated message list, use `ExistsCond` instead.
func (*RepCond) Descriptor
deprecated
func (*RepCond) GetValues ¶
func (x *RepCond) GetValues() []*QueryValue
func (*RepCond) ProtoMessage ¶
func (*RepCond) ProtoMessage()
func (*RepCond) ProtoReflect ¶
func (x *RepCond) ProtoReflect() protoreflect.Message
type RepOp ¶
type RepOp int32
func (RepOp) Descriptor ¶
func (RepOp) Descriptor() protoreflect.EnumDescriptor
func (RepOp) EnumDescriptor
deprecated
func (RepOp) Number ¶
func (x RepOp) Number() protoreflect.EnumNumber
func (RepOp) Type ¶
func (RepOp) Type() protoreflect.EnumType
type Role ¶ added in v0.2.0
type Role struct {
// The role name. Unique across the schema, with the same character rules
// as a permission name.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The permissions the role grants at its anchor, without duplicates. A
// permission that an included role also grants is accepted.
Grants []string `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants,omitempty"`
// The names of the roles whose permissions this role also grants, without
// duplicates. Each one is a role of the same `GrantOptions`. A role that
// includes itself, directly or through other roles, is refused.
Includes []string `protobuf:"bytes,3,rep,name=includes,proto3" json:"includes,omitempty"`
// contains filtered or unexported fields
}
Declares one role and the permissions it grants.
A role grants the permissions in `grants` and every permission of each role in `includes`, through any number of steps:
```protobuf roles: [
{ name: "task_reader" grants: ["view_projects", "view_tasks"] },
{ name: "task_writer" includes: ["task_reader"] grants: ["edit_tasks"] }
] ```
A role grants at least one permission, directly or through `includes`.
func (*Role) Descriptor
deprecated
added in
v0.2.0
func (*Role) GetIncludes ¶ added in v0.2.0
func (*Role) ProtoMessage ¶ added in v0.2.0
func (*Role) ProtoMessage()
func (*Role) ProtoReflect ¶ added in v0.2.0
func (x *Role) ProtoReflect() protoreflect.Message
type RoomMessage ¶
type RoomMessage struct {
// The session that sent it.
SenderSessionId string `protobuf:"bytes,1,opt,name=sender_session_id,json=senderSessionId,proto3" json:"sender_session_id,omitempty"`
// Who sent it, stamped from the request principal. Empty when the sender
// was unauthenticated.
SenderSubject string `protobuf:"bytes,2,opt,name=sender_subject,json=senderSubject,proto3" json:"sender_subject,omitempty"`
// App-defined, opaque to the engine, capped by MaxBroadcastBytes.
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
// contains filtered or unexported fields
}
RoomMessage is one broadcast: an ephemeral payload delivered to whoever is watching the topic at the moment it arrives. It is not stored, not replayed and not acknowledged.
func (*RoomMessage) Descriptor
deprecated
func (*RoomMessage) Descriptor() ([]byte, []int)
Deprecated: Use RoomMessage.ProtoReflect.Descriptor instead.
func (*RoomMessage) GetPayload ¶
func (x *RoomMessage) GetPayload() []byte
func (*RoomMessage) GetSenderSessionId ¶
func (x *RoomMessage) GetSenderSessionId() string
func (*RoomMessage) GetSenderSubject ¶
func (x *RoomMessage) GetSenderSubject() string
func (*RoomMessage) ProtoMessage ¶
func (*RoomMessage) ProtoMessage()
func (*RoomMessage) ProtoReflect ¶
func (x *RoomMessage) ProtoReflect() protoreflect.Message
func (*RoomMessage) Reset ¶
func (x *RoomMessage) Reset()
func (*RoomMessage) String ¶
func (x *RoomMessage) String() string
type RoomSnapshot ¶
type RoomSnapshot struct {
// Every participant the node knows of, the joining session included.
Participants []*Participant `protobuf:"bytes,1,rep,name=participants,proto3" json:"participants,omitempty"`
// True when the roster was cut to MaxParticipantsPerRoom. The kept prefix
// is ordered by session id, so every recipient of the same roster keeps the
// same participants.
Truncated bool `protobuf:"varint,2,opt,name=truncated,proto3" json:"truncated,omitempty"`
// contains filtered or unexported fields
}
RoomSnapshot is the roster of one topic as the serving node knows it, sent once when the topic is joined.
It is a node-local view, not global truth: a node knows the sessions whose streams it holds plus whatever the bus has told it about the rest. A record that has not been re-announced within the expiry window is absent from it.
func (*RoomSnapshot) Descriptor
deprecated
func (*RoomSnapshot) Descriptor() ([]byte, []int)
Deprecated: Use RoomSnapshot.ProtoReflect.Descriptor instead.
func (*RoomSnapshot) GetParticipants ¶
func (x *RoomSnapshot) GetParticipants() []*Participant
func (*RoomSnapshot) GetTruncated ¶
func (x *RoomSnapshot) GetTruncated() bool
func (*RoomSnapshot) ProtoMessage ¶
func (*RoomSnapshot) ProtoMessage()
func (*RoomSnapshot) ProtoReflect ¶
func (x *RoomSnapshot) ProtoReflect() protoreflect.Message
func (*RoomSnapshot) Reset ¶
func (x *RoomSnapshot) Reset()
func (*RoomSnapshot) String ¶
func (x *RoomSnapshot) String() string
type RowChange ¶
type RowChange struct {
// The name of the entity for this row.
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// The key that identifies this row within the entity.
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
// Workspace sequence number assigned to the mutation that last wrote this
// row. Monotonic per workspace.
Version uint64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
// The row content or deletion status.
//
// Types that are valid to be assigned to Body:
//
// *RowChange_Value
// *RowChange_Tombstone
Body isRowChange_Body `protobuf_oneof:"body"`
// Collaborative-text fields shipped as delta state relative to the
// recipient's cursor position. Empty on every path where the recipient's
// prior state is not known to match that position — bootstrap, delta
// resync, membership diffs, query results, and any scoped subscription
// whose visibility could have changed. A recipient that cannot reconstruct
// a named field must discard the page and re-bootstrap; one that knows in
// advance it holds no schema for an entity names it in
// PullRequest.no_delta_entities instead.
TextDeltas []*FieldDelta `protobuf:"bytes,6,rep,name=text_deltas,json=textDeltas,proto3" json:"text_deltas,omitempty"`
// The fields of the row that the recipient may not read, sorted: each
// entry names a top-level field outside any `oneof`, or a `oneof`. The
// server clears each one in `value`, so a cleared field reads as its zero
// value; this list tells it apart from a stored zero value. Empty when
// the recipient reads every field. A field guard decides it (see
// `syncplane.v1.FieldGuard`), per row, so two rows of one entity can
// hide different fields, and a change of the recipient's access sends
// the row again with a new list.
//
// A `PUT` that updates the row keeps the stored value of each field the
// writer may not read and leaves unset, so a recipient can write the row
// back whole.
Hidden []string `protobuf:"bytes,7,rep,name=hidden,proto3" json:"hidden,omitempty"`
// contains filtered or unexported fields
}
RowChange is a full-row snapshot (or tombstone) at a given workspace sequence. Every field is a merged snapshot except the collaborative-text fields named in text_deltas, which the recipient reconstructs from state it already holds, and the fields named in hidden, which the recipient may not read.
func (*RowChange) Descriptor
deprecated
func (*RowChange) GetTextDeltas ¶
func (x *RowChange) GetTextDeltas() []*FieldDelta
func (*RowChange) GetTombstone ¶
func (*RowChange) GetVersion ¶
func (*RowChange) ProtoMessage ¶
func (*RowChange) ProtoMessage()
func (*RowChange) ProtoReflect ¶
func (x *RowChange) ProtoReflect() protoreflect.Message
type RowChange_Tombstone ¶
type RowChange_Tombstone struct {
// True when the row was deleted.
Tombstone bool `protobuf:"varint,5,opt,name=tombstone,proto3,oneof"`
}
type RowChange_Value ¶
type RowChange_Value struct {
// Serialized entity message. Full merged snapshot, EXCEPT that every
// field named in text_deltas or in hidden is cleared.
Value []byte `protobuf:"bytes,4,opt,name=value,proto3,oneof"`
}
type SearchField ¶
type SearchField struct {
// The dotted field path to a singular string or collaborative text field,
// for example `"title"` or `"details.summary"`.
//
// Collaborative text fields are searched as their plain-text value.
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
// contains filtered or unexported fields
}
Specifies a single field read during full-text search.
func (*SearchField) Descriptor
deprecated
func (*SearchField) Descriptor() ([]byte, []int)
Deprecated: Use SearchField.ProtoReflect.Descriptor instead.
func (*SearchField) GetPath ¶
func (x *SearchField) GetPath() string
func (*SearchField) ProtoMessage ¶
func (*SearchField) ProtoMessage()
func (*SearchField) ProtoReflect ¶
func (x *SearchField) ProtoReflect() protoreflect.Message
func (*SearchField) Reset ¶
func (x *SearchField) Reset()
func (*SearchField) String ¶
func (x *SearchField) String() string
type SearchSpec ¶
type SearchSpec struct {
// The fields to search, ordered from most important to least important.
//
// Fields marked with `(syncplane.v1.field_behavior).searchable` are
// evaluated before the fields listed here. A field path may appear only
// once across both definitions.
Field []*SearchField `protobuf:"bytes,1,rep,name=field,proto3" json:"field,omitempty"`
// Preserves diacritical marks during text analysis.
//
// When `true`, words such as "café" and "cafe" analyze to distinct terms.
// Defaults to `false`, which folds diacritics together.
KeepDiacritics bool `protobuf:"varint,2,opt,name=keep_diacritics,json=keepDiacritics,proto3" json:"keep_diacritics,omitempty"`
// contains filtered or unexported fields
}
Configures full-text search over an entity, specifying searchable fields in order of importance and text analysis settings.
Fields are evaluated in the order listed, with earlier fields ranked higher during relevance scoring.
Text analysis applies Unicode normalization, lowercasing, diacritic folding (unless `keep_diacritics` is `true`), and segmentation with CJK bigrams to both content and search queries.
Search matching behaves identically locally and on the server, returning identical rows and sort order with or without a search index.
func (*SearchSpec) Descriptor
deprecated
func (*SearchSpec) Descriptor() ([]byte, []int)
Deprecated: Use SearchSpec.ProtoReflect.Descriptor instead.
func (*SearchSpec) GetField ¶
func (x *SearchSpec) GetField() []*SearchField
func (*SearchSpec) GetKeepDiacritics ¶
func (x *SearchSpec) GetKeepDiacritics() bool
func (*SearchSpec) ProtoMessage ¶
func (*SearchSpec) ProtoMessage()
func (*SearchSpec) ProtoReflect ¶
func (x *SearchSpec) ProtoReflect() protoreflect.Message
func (*SearchSpec) Reset ¶
func (x *SearchSpec) Reset()
func (*SearchSpec) String ¶
func (x *SearchSpec) String() string
type StatBlobsRequest ¶ added in v0.4.0
type StatBlobsRequest struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
Digests []string `protobuf:"bytes,2,rep,name=digests,proto3" json:"digests,omitempty"`
// contains filtered or unexported fields
}
func (*StatBlobsRequest) Descriptor
deprecated
added in
v0.4.0
func (*StatBlobsRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatBlobsRequest.ProtoReflect.Descriptor instead.
func (*StatBlobsRequest) GetDigests ¶ added in v0.4.0
func (x *StatBlobsRequest) GetDigests() []string
func (*StatBlobsRequest) GetWorkspaceId ¶ added in v0.4.0
func (x *StatBlobsRequest) GetWorkspaceId() string
func (*StatBlobsRequest) ProtoMessage ¶ added in v0.4.0
func (*StatBlobsRequest) ProtoMessage()
func (*StatBlobsRequest) ProtoReflect ¶ added in v0.4.0
func (x *StatBlobsRequest) ProtoReflect() protoreflect.Message
func (*StatBlobsRequest) Reset ¶ added in v0.4.0
func (x *StatBlobsRequest) Reset()
func (*StatBlobsRequest) String ¶ added in v0.4.0
func (x *StatBlobsRequest) String() string
type StatBlobsResponse ¶ added in v0.4.0
type StatBlobsResponse struct {
// One entry for each requested digest, in request order.
Blobs []*BlobStatus `protobuf:"bytes,1,rep,name=blobs,proto3" json:"blobs,omitempty"`
// contains filtered or unexported fields
}
func (*StatBlobsResponse) Descriptor
deprecated
added in
v0.4.0
func (*StatBlobsResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatBlobsResponse.ProtoReflect.Descriptor instead.
func (*StatBlobsResponse) GetBlobs ¶ added in v0.4.0
func (x *StatBlobsResponse) GetBlobs() []*BlobStatus
func (*StatBlobsResponse) ProtoMessage ¶ added in v0.4.0
func (*StatBlobsResponse) ProtoMessage()
func (*StatBlobsResponse) ProtoReflect ¶ added in v0.4.0
func (x *StatBlobsResponse) ProtoReflect() protoreflect.Message
func (*StatBlobsResponse) Reset ¶ added in v0.4.0
func (x *StatBlobsResponse) Reset()
func (*StatBlobsResponse) String ¶ added in v0.4.0
func (x *StatBlobsResponse) String() string
type StrCond ¶
type StrCond struct {
Path []string `protobuf:"bytes,1,rep,name=path,proto3" json:"path,omitempty"`
Op StrOp `protobuf:"varint,2,opt,name=op,proto3,enum=syncplane.v1.StrOp" json:"op,omitempty"`
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*StrCond) Descriptor
deprecated
func (*StrCond) ProtoMessage ¶
func (*StrCond) ProtoMessage()
func (*StrCond) ProtoReflect ¶
func (x *StrCond) ProtoReflect() protoreflect.Message
type StrOp ¶
type StrOp int32
func (StrOp) Descriptor ¶
func (StrOp) Descriptor() protoreflect.EnumDescriptor
func (StrOp) EnumDescriptor
deprecated
func (StrOp) Number ¶
func (x StrOp) Number() protoreflect.EnumNumber
func (StrOp) Type ¶
func (StrOp) Type() protoreflect.EnumType
type SubscribeRequest ¶
type SubscribeRequest struct {
// Idempotency handle, shared by every scope: watermarks are kept per
// (workspace, caller, client_id) (see WorkspaceBatch), so one handle per
// client is enough and lets each page report last_acked_mutation_id for its
// own workspace.
ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
// The workspaces this stream carries. At least one; duplicates are
// rejected, and the server caps the count (see Limits).
Scopes []*WorkspaceScope `protobuf:"bytes,2,rep,name=scopes,proto3" json:"scopes,omitempty"`
// Catch-up page size, applied per workspace. 0 means "server default"; the
// server clamps to its own maximum either way. Pages stream back-to-back
// until each scope is drained.
Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
// PullRequest.no_delta_entities, applied to every scope: what a client can
// decode is a property of its build, not of one workspace.
NoDeltaEntities []string `protobuf:"bytes,4,rep,name=no_delta_entities,json=noDeltaEntities,proto3" json:"no_delta_entities,omitempty"`
// True when the client can apply a page frame that carries no next_cursor,
// keeping the cursor it already holds. The server then sends the cursor as
// a periodic checkpoint instead of on every frame.
//
// It is worth setting for a windowed or reference-following subscription,
// whose cursor carries the client's whole membership set and so is orders
// of magnitude larger than the page it rides on. The cost is that a
// reopened stream resumes from the last checkpoint rather than the last
// frame, re-delivering what came after it; the server withholds a cursor
// only while that re-delivery would cost less than the cursor it skipped.
// A frame that changes which rows the client holds beyond what the last
// checkpoint accounts for always carries the cursor: one that moves a
// window or closure membership, a delta resync, or a new row the scope can
// later hide. So the saving comes from edits to rows the client holds.
SparseCursor bool `protobuf:"varint,5,opt,name=sparse_cursor,json=sparseCursor,proto3" json:"sparse_cursor,omitempty"`
// contains filtered or unexported fields
}
func (*SubscribeRequest) Descriptor
deprecated
func (*SubscribeRequest) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.
func (*SubscribeRequest) GetClientId ¶
func (x *SubscribeRequest) GetClientId() string
func (*SubscribeRequest) GetLimit ¶
func (x *SubscribeRequest) GetLimit() uint32
func (*SubscribeRequest) GetNoDeltaEntities ¶
func (x *SubscribeRequest) GetNoDeltaEntities() []string
func (*SubscribeRequest) GetScopes ¶
func (x *SubscribeRequest) GetScopes() []*WorkspaceScope
func (*SubscribeRequest) GetSparseCursor ¶
func (x *SubscribeRequest) GetSparseCursor() bool
func (*SubscribeRequest) ProtoMessage ¶
func (*SubscribeRequest) ProtoMessage()
func (*SubscribeRequest) ProtoReflect ¶
func (x *SubscribeRequest) ProtoReflect() protoreflect.Message
func (*SubscribeRequest) Reset ¶
func (x *SubscribeRequest) Reset()
func (*SubscribeRequest) String ¶
func (x *SubscribeRequest) String() string
type SubscribeResponse ¶
type SubscribeResponse struct {
// Identifies the workspace for this frame. Empty only on a heartbeat.
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
// Application-defined schema revision from the server. Sent on every
// frame, including heartbeats. Empty when the server advertises none.
SchemaRevision string `protobuf:"bytes,2,opt,name=schema_revision,json=schemaRevision,proto3" json:"schema_revision,omitempty"`
// Payload of the stream frame.
//
// Types that are valid to be assigned to Body:
//
// *SubscribeResponse_Page
// *SubscribeResponse_CaughtUp
// *SubscribeResponse_Dropped
// *SubscribeResponse_Heartbeat
Body isSubscribeResponse_Body `protobuf_oneof:"body"`
// contains filtered or unexported fields
}
One frame of the stream. Always names the workspace that it concerns, except for a stream-level heartbeat.
func (*SubscribeResponse) Descriptor
deprecated
func (*SubscribeResponse) Descriptor() ([]byte, []int)
Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.
func (*SubscribeResponse) GetBody ¶
func (x *SubscribeResponse) GetBody() isSubscribeResponse_Body
func (*SubscribeResponse) GetCaughtUp ¶
func (x *SubscribeResponse) GetCaughtUp() bool
func (*SubscribeResponse) GetDropped ¶
func (x *SubscribeResponse) GetDropped() *WorkspaceDropped
func (*SubscribeResponse) GetHeartbeat ¶
func (x *SubscribeResponse) GetHeartbeat() bool
func (*SubscribeResponse) GetPage ¶
func (x *SubscribeResponse) GetPage() *PullResponse
func (*SubscribeResponse) GetSchemaRevision ¶
func (x *SubscribeResponse) GetSchemaRevision() string
func (*SubscribeResponse) GetWorkspaceId ¶
func (x *SubscribeResponse) GetWorkspaceId() string
func (*SubscribeResponse) ProtoMessage ¶
func (*SubscribeResponse) ProtoMessage()
func (*SubscribeResponse) ProtoReflect ¶
func (x *SubscribeResponse) ProtoReflect() protoreflect.Message
func (*SubscribeResponse) Reset ¶
func (x *SubscribeResponse) Reset()
func (*SubscribeResponse) String ¶
func (x *SubscribeResponse) String() string
type SubscribeResponse_CaughtUp ¶
type SubscribeResponse_CaughtUp struct {
// Sent once per workspace after its catch-up backlog drains. The
// workspace is now current and its live tail follows. Other scopes may
// still be catching up.
CaughtUp bool `protobuf:"varint,4,opt,name=caught_up,json=caughtUp,proto3,oneof"`
}
type SubscribeResponse_Dropped ¶
type SubscribeResponse_Dropped struct {
// The workspace has left the stream. See `WorkspaceDropped`.
Dropped *WorkspaceDropped `protobuf:"bytes,5,opt,name=dropped,proto3,oneof"`
}
type SubscribeResponse_Heartbeat ¶
type SubscribeResponse_Heartbeat struct {
// Liveness keepalive for the entire stream. Carries no workspace and
// no page. The client treats this frame as a no-op (no rebase, no
// notify).
Heartbeat bool `protobuf:"varint,6,opt,name=heartbeat,proto3,oneof"`
}
type SubscribeResponse_Page ¶
type SubscribeResponse_Page struct {
// Forward page for `workspace_id`, identical to `PullResponse`. The
// `reset` field is never set here. A reset arrives as a `dropped`
// frame.
Page *PullResponse `protobuf:"bytes,3,opt,name=page,proto3,oneof"`
}
type Subscription ¶
type Subscription struct {
// The name of the entity to synchronize.
Entity string `protobuf:"bytes,1,opt,name=entity,proto3" json:"entity,omitempty"`
// Rows of the entity matching this predicate sync; absent = whole entity.
Predicate *Condition `protobuf:"bytes,2,opt,name=predicate,proto3" json:"predicate,omitempty"`
// Reference paths to follow from matched rows. Following references
// expands the synchronized set to a bounded-depth forward or reverse
// closure, using key point-lookups forward and predicate scans in reverse.
// When unset, synchronization remains scoped to the base entity. Changes
// to this field are excluded from `sub_hash` and are reconciled through
// closure diffs (`Cursor.closure`) rather than a base-scope delta
// resynchronization. Every closure member remains subject to the same read
// filter as a base row; following a reference never escalates permissions.
Follow *FollowSpec `protobuf:"bytes,3,opt,name=follow,proto3" json:"follow,omitempty"`
// Bounds the synced set to the first `limit` rows of this subscription's
// predicate match under `order_by` — so the working set is a policy choice
// rather than the size of the entity. Absent ⇒ every matching row syncs.
// Unlike `follow`, a window IS part of sub_hash: widening or removing one
// needs rows the client does not hold, which only a delta resync can
// supply.
Window *Window `protobuf:"bytes,4,opt,name=window,proto3" json:"window,omitempty"`
// Rows named by key: exactly these rows of the entity sync, whatever their
// fields hold. Set for "the documents this device has pinned" — a set the
// entity's fields cannot express and that N per-key predicates would cost N
// predicates to express. Mutually exclusive with `predicate` and `window`;
// `follow` combines with it and walks references from the named rows.
// Present-but-empty names no rows, which is different from absent (the
// whole entity). Part of sub_hash, like a window: a changed set is
// reconciled by a delta resync that reads only the rows named on either
// side. A key the caller may not read is withheld, never refused. Bounded
// by the server's MaxSubscriptionKeys.
KeySet *KeySet `protobuf:"bytes,5,opt,name=key_set,json=keySet,proto3" json:"key_set,omitempty"`
// contains filtered or unexported fields
}
Subscription scopes what a client syncs. An empty subscription list means full sync; a subscription without a predicate covers the whole entity.
func (*Subscription) Descriptor
deprecated
func (*Subscription) Descriptor() ([]byte, []int)
Deprecated: Use Subscription.ProtoReflect.Descriptor instead.
func (*Subscription) GetEntity ¶
func (x *Subscription) GetEntity() string
func (*Subscription) GetFollow ¶
func (x *Subscription) GetFollow() *FollowSpec
func (*Subscription) GetKeySet ¶
func (x *Subscription) GetKeySet() *KeySet
func (*Subscription) GetPredicate ¶
func (x *Subscription) GetPredicate() *Condition
func (*Subscription) GetWindow ¶
func (x *Subscription) GetWindow() *Window
func (*Subscription) ProtoMessage ¶
func (*Subscription) ProtoMessage()
func (*Subscription) ProtoReflect ¶
func (x *Subscription) ProtoReflect() protoreflect.Message
func (*Subscription) Reset ¶
func (x *Subscription) Reset()
func (*Subscription) String ¶
func (x *Subscription) String() string
type Topic ¶
type Topic struct {
// The identifier of the workspace containing the room.
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
// Names the room within the workspace. Free-form, but subject to the
// room-name rule in docs/reference/naming.md; two callers naming the
// same string are in the same room.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The entity name of the anchor row, or empty if the topic is unanchored.
// Set together with `key`.
Entity string `protobuf:"bytes,3,opt,name=entity,proto3" json:"entity,omitempty"`
// The row key of the anchor row, or empty if the topic is unanchored. Set
// together with `entity`.
Key string `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
// contains filtered or unexported fields
}
Addresses one room. Scoped to a workspace and is either anchored to a row or not.
An anchored topic (entity and key both set) inherits that row's read permission: a caller is admitted only if the app's ReadFilter would let them read the row.
An unanchored topic (entity and key both empty) is gated on workspace access alone plus the app's own room hook when it installs one.
func (*Topic) Descriptor
deprecated
func (*Topic) GetWorkspaceId ¶
func (*Topic) ProtoMessage ¶
func (*Topic) ProtoMessage()
func (*Topic) ProtoReflect ¶
func (x *Topic) ProtoReflect() protoreflect.Message
type TopicDropped ¶
type TopicDropped struct {
// The reason why the topic was dropped.
Reason TopicDropped_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=syncplane.v1.TopicDropped_Reason" json:"reason,omitempty"`
// Human-readable detail for logs. Never parse it; branch on reason.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
TopicDropped ends one topic's participation in a Watch stream. The server sends nothing further for that topic; every other topic keeps streaming.
It reports only per-topic outcomes. A request that exceeds a limit — too many topics, too many fronted sessions, an oversize payload — fails the whole RPC with resource_exhausted instead, because the stream never opens.
func (*TopicDropped) Descriptor
deprecated
func (*TopicDropped) Descriptor() ([]byte, []int)
Deprecated: Use TopicDropped.ProtoReflect.Descriptor instead.
func (*TopicDropped) GetMessage ¶
func (x *TopicDropped) GetMessage() string
func (*TopicDropped) GetReason ¶
func (x *TopicDropped) GetReason() TopicDropped_Reason
func (*TopicDropped) ProtoMessage ¶
func (*TopicDropped) ProtoMessage()
func (*TopicDropped) ProtoReflect ¶
func (x *TopicDropped) ProtoReflect() protoreflect.Message
func (*TopicDropped) Reset ¶
func (x *TopicDropped) Reset()
func (*TopicDropped) String ¶
func (x *TopicDropped) String() string
type TopicDropped_Reason ¶
type TopicDropped_Reason int32
Specifies the reason why a topic was dropped from a watch stream.
const ( // Default value. The reason is unspecified. TopicDropped_REASON_UNSPECIFIED TopicDropped_Reason = 0 // The join gate refused this caller, permanently: workspace access was // revoked, the anchor row is no longer readable, or the app's room hook // said no. Stop showing the room; retrying will not change the answer. TopicDropped_REASON_ACCESS_REVOKED TopicDropped_Reason = 1 // A failure scoped to this topic that may not persist (a storage error, // a permission hook that could not decide). Reopen with backoff. TopicDropped_REASON_ERROR TopicDropped_Reason = 2 // The caller holds no permission in the workspace's access model. A // grant written later lifts it, so the room can be reopened with // backoff. It is the room's form of WorkspaceDropped.REASON_NO_ACCESS. TopicDropped_REASON_NO_ACCESS TopicDropped_Reason = 3 )
func (TopicDropped_Reason) Descriptor ¶
func (TopicDropped_Reason) Descriptor() protoreflect.EnumDescriptor
func (TopicDropped_Reason) Enum ¶
func (x TopicDropped_Reason) Enum() *TopicDropped_Reason
func (TopicDropped_Reason) EnumDescriptor
deprecated
func (TopicDropped_Reason) EnumDescriptor() ([]byte, []int)
Deprecated: Use TopicDropped_Reason.Descriptor instead.
func (TopicDropped_Reason) Number ¶
func (x TopicDropped_Reason) Number() protoreflect.EnumNumber
func (TopicDropped_Reason) String ¶
func (x TopicDropped_Reason) String() string
func (TopicDropped_Reason) Type ¶
func (TopicDropped_Reason) Type() protoreflect.EnumType
type WatchBlobsRequest ¶ added in v0.4.0
type WatchBlobsRequest struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
Digests []string `protobuf:"bytes,2,rep,name=digests,proto3" json:"digests,omitempty"`
// contains filtered or unexported fields
}
func (*WatchBlobsRequest) Descriptor
deprecated
added in
v0.4.0
func (*WatchBlobsRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchBlobsRequest.ProtoReflect.Descriptor instead.
func (*WatchBlobsRequest) GetDigests ¶ added in v0.4.0
func (x *WatchBlobsRequest) GetDigests() []string
func (*WatchBlobsRequest) GetWorkspaceId ¶ added in v0.4.0
func (x *WatchBlobsRequest) GetWorkspaceId() string
func (*WatchBlobsRequest) ProtoMessage ¶ added in v0.4.0
func (*WatchBlobsRequest) ProtoMessage()
func (*WatchBlobsRequest) ProtoReflect ¶ added in v0.4.0
func (x *WatchBlobsRequest) ProtoReflect() protoreflect.Message
func (*WatchBlobsRequest) Reset ¶ added in v0.4.0
func (x *WatchBlobsRequest) Reset()
func (*WatchBlobsRequest) String ¶ added in v0.4.0
func (x *WatchBlobsRequest) String() string
type WatchBlobsResponse ¶ added in v0.4.0
type WatchBlobsResponse struct {
// The digests whose state this message reports. Empty on a keepalive.
Blobs []*BlobStatus `protobuf:"bytes,1,rep,name=blobs,proto3" json:"blobs,omitempty"`
// contains filtered or unexported fields
}
func (*WatchBlobsResponse) Descriptor
deprecated
added in
v0.4.0
func (*WatchBlobsResponse) Descriptor() ([]byte, []int)
Deprecated: Use WatchBlobsResponse.ProtoReflect.Descriptor instead.
func (*WatchBlobsResponse) GetBlobs ¶ added in v0.4.0
func (x *WatchBlobsResponse) GetBlobs() []*BlobStatus
func (*WatchBlobsResponse) ProtoMessage ¶ added in v0.4.0
func (*WatchBlobsResponse) ProtoMessage()
func (*WatchBlobsResponse) ProtoReflect ¶ added in v0.4.0
func (x *WatchBlobsResponse) ProtoReflect() protoreflect.Message
func (*WatchBlobsResponse) Reset ¶ added in v0.4.0
func (x *WatchBlobsResponse) Reset()
func (*WatchBlobsResponse) String ¶ added in v0.4.0
func (x *WatchBlobsResponse) String() string
type WatchRequest ¶
type WatchRequest struct {
// Identifies the watching session, and is the session a Publish on this
// account writes as. Minted by the client, per tab: it is what a departure
// and an expiry are keyed on. The server binds it to the caller's principal
// for the life of the stream.
SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"`
// The rooms to watch. At least one; duplicates are rejected, and the
// server caps the count (see Limits.MaxRoomsPerStream). The set is fixed
// for the life of the stream.
Topics []*Topic `protobuf:"bytes,2,rep,name=topics,proto3" json:"topics,omitempty"`
// Caps the participants in each RoomSnapshot. 0 means "server default"; the
// server clamps to its own maximum either way.
Limit uint32 `protobuf:"varint,3,opt,name=limit,proto3" json:"limit,omitempty"`
// Other sessions this stream is responsible for keeping alive.
//
// A record survives because the node holding its session's stream
// re-announces it, so a session with no stream anywhere is forgotten within
// the expiry window — which is exactly what should happen to one whose
// process died. But a browser shares ONE stream across an account's tabs,
// and the tabs that are not holding it still publish their own presence.
// Naming them here is what stops a room emptying out to whichever tab
// happens to hold the lock.
//
// A stream keeps alive only the records its own principal wrote. Naming a
// session whose record another principal wrote does not fail the stream,
// and does not keep that record alive. The list is fixed for the life of
// the stream, so a tab that opens or closes is a reopen — the same reopen a
// room change already costs.
FrontedSessionIds []string `protobuf:"bytes,4,rep,name=fronted_session_ids,json=frontedSessionIds,proto3" json:"fronted_session_ids,omitempty"`
// contains filtered or unexported fields
}
Request to watch presence updates and broadcast messages for a set of topics.
func (*WatchRequest) Descriptor
deprecated
func (*WatchRequest) Descriptor() ([]byte, []int)
Deprecated: Use WatchRequest.ProtoReflect.Descriptor instead.
func (*WatchRequest) GetFrontedSessionIds ¶
func (x *WatchRequest) GetFrontedSessionIds() []string
func (*WatchRequest) GetLimit ¶
func (x *WatchRequest) GetLimit() uint32
func (*WatchRequest) GetSessionId ¶
func (x *WatchRequest) GetSessionId() string
func (*WatchRequest) GetTopics ¶
func (x *WatchRequest) GetTopics() []*Topic
func (*WatchRequest) ProtoMessage ¶
func (*WatchRequest) ProtoMessage()
func (*WatchRequest) ProtoReflect ¶
func (x *WatchRequest) ProtoReflect() protoreflect.Message
func (*WatchRequest) Reset ¶
func (x *WatchRequest) Reset()
func (*WatchRequest) String ¶
func (x *WatchRequest) String() string
type WatchResponse ¶
type WatchResponse struct {
// The topic this frame is about. Unset only on a heartbeat.
Topic *Topic `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
// The event payload received for the topic.
//
// Types that are valid to be assigned to Body:
//
// *WatchResponse_Snapshot
// *WatchResponse_Updated
// *WatchResponse_Left
// *WatchResponse_Message
// *WatchResponse_Dropped
// *WatchResponse_Heartbeat
Body isWatchResponse_Body `protobuf_oneof:"body"`
// contains filtered or unexported fields
}
WatchResponse is one frame of the stream, always naming the topic it concerns — except a heartbeat, which is stream-level.
func (*WatchResponse) Descriptor
deprecated
func (*WatchResponse) Descriptor() ([]byte, []int)
Deprecated: Use WatchResponse.ProtoReflect.Descriptor instead.
func (*WatchResponse) GetBody ¶
func (x *WatchResponse) GetBody() isWatchResponse_Body
func (*WatchResponse) GetDropped ¶
func (x *WatchResponse) GetDropped() *TopicDropped
func (*WatchResponse) GetHeartbeat ¶
func (x *WatchResponse) GetHeartbeat() bool
func (*WatchResponse) GetLeft ¶
func (x *WatchResponse) GetLeft() string
func (*WatchResponse) GetMessage ¶
func (x *WatchResponse) GetMessage() *RoomMessage
func (*WatchResponse) GetSnapshot ¶
func (x *WatchResponse) GetSnapshot() *RoomSnapshot
func (*WatchResponse) GetTopic ¶
func (x *WatchResponse) GetTopic() *Topic
func (*WatchResponse) GetUpdated ¶
func (x *WatchResponse) GetUpdated() *Participant
func (*WatchResponse) ProtoMessage ¶
func (*WatchResponse) ProtoMessage()
func (*WatchResponse) ProtoReflect ¶
func (x *WatchResponse) ProtoReflect() protoreflect.Message
func (*WatchResponse) Reset ¶
func (x *WatchResponse) Reset()
func (*WatchResponse) String ¶
func (x *WatchResponse) String() string
type WatchResponse_Dropped ¶
type WatchResponse_Dropped struct {
// This topic has left the stream; see TopicDropped.
Dropped *TopicDropped `protobuf:"bytes,6,opt,name=dropped,proto3,oneof"`
}
type WatchResponse_Heartbeat ¶
type WatchResponse_Heartbeat struct {
// Liveness keepalive for the whole stream. Carries no topic and no
// payload.
Heartbeat bool `protobuf:"varint,7,opt,name=heartbeat,proto3,oneof"`
}
type WatchResponse_Left ¶
type WatchResponse_Left struct {
// The session that left, by session id. Sent when a session published
// a departure and when its record expired without being re-announced;
// the two are indistinguishable, and deliberately so.
Left string `protobuf:"bytes,4,opt,name=left,proto3,oneof"`
}
type WatchResponse_Message ¶
type WatchResponse_Message struct {
// A broadcast from another session, or from this one — the sender is
// not excluded, so an app that echoes locally must filter on
// sender_session_id.
Message *RoomMessage `protobuf:"bytes,5,opt,name=message,proto3,oneof"`
}
type WatchResponse_Snapshot ¶
type WatchResponse_Snapshot struct {
// The roster of this topic at join time. Sent once per topic, before
// any other frame for it; a client replaces whatever it held.
Snapshot *RoomSnapshot `protobuf:"bytes,2,opt,name=snapshot,proto3,oneof"`
}
type WatchResponse_Updated ¶
type WatchResponse_Updated struct {
// A participant joined, or changed its state. Apply it as
// last-writer-wins by PresenceUpdate.revision — a re-announcement of a
// record the client already holds arrives as one of these.
Updated *Participant `protobuf:"bytes,3,opt,name=updated,proto3,oneof"`
}
type Window ¶
type Window struct {
// Total order over the matched rows; ties break on row key, so the rank
// boundary is always well-defined. Mutually exclusive with by_recency.
OrderBy []*OrderKey `protobuf:"bytes,1,rep,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
// Maximum rows the window holds. Must be > 0 and <= the server's
// MaxWindowSize.
Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
// Order by the row's workspace sequence, descending — "the N most recently
// written matching rows". Needs no field decode to sort, so it is the
// cheap window to serve. Recency is a property of the STORED ROW rather
// than of the message, which is why it is a flag here instead of a magic
// order path: no field of an entity could express it, and a reserved path
// name would collide with a real field.
ByRecency bool `protobuf:"varint,3,opt,name=by_recency,json=byRecency,proto3" json:"by_recency,omitempty"`
// contains filtered or unexported fields
}
Window caps a subscription's scope by RANK rather than by attribute: "the N most recently updated open issues" instead of "every open issue".
Membership is a set, not a boundary value — the server carries the exact key-set on the cursor and diffs a freshly computed window against it on every pull, so a row that fell off the tail is dropped precisely. That is the same machinery reference-following already uses.
func (*Window) Descriptor
deprecated
func (*Window) GetByRecency ¶
func (*Window) GetOrderBy ¶
func (*Window) ProtoMessage ¶
func (*Window) ProtoMessage()
func (*Window) ProtoReflect ¶
func (x *Window) ProtoReflect() protoreflect.Message
type WorkspaceBatch ¶
type WorkspaceBatch struct {
// Identifies the workspace for this batch of mutations. Serves as the
// partition key for sequences, cursors, write exclusion, and access
// control.
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
Mutations []*Mutation `protobuf:"bytes,2,rep,name=mutations,proto3" json:"mutations,omitempty"`
// The highest `mutation_id` this client sent under its `client_id` to this
// workspace before this request, or 0 when it sent none. Count every id the
// client put in a request, answered or not. Unset means the client does not
// say. When it is set, every mutation in the batch must carry the same
// `client_id`, or the server refuses the batch with "invalid_argument".
//
// A watermark above this value means that another writer used the
// `client_id`: a second install that copied the client's store, a store
// that went back to an older copy of itself, or another caller. The ids at
// or below the watermark then name that writer's mutations, not this
// client's, and an ack for one would report a write that never applied.
// The server applies nothing and fails the batch with "client_id_in_use".
// The client then resends its unanswered mutations above `sent_through`
// after the watermark, or under a new `client_id` from `mutation_id` 1. It
// must not resend them under their old ids, where the server holds the
// other writer's mutations.
SentThrough *uint64 `protobuf:"varint,3,opt,name=sent_through,json=sentThrough,proto3,oneof" json:"sent_through,omitempty"`
// The opaque cursor the client held when it queued the batch's mutations,
// from a Pull, Bootstrap or Subscribe of this workspace. Empty means the
// client does not say, for example before its first sync.
//
// A cursor names the store history that issued it. When the workspace's
// history is another one, the queue was written against data the server no
// longer holds: the workspace was deleted and restored
// (`Server.DeleteWorkspace` and `Server.RestoreWorkspace`), or the server
// now serves another store. The server applies nothing and fails the batch
// with "workspace_replaced". The client drops the mutations it queued
// against that cursor and bootstraps again. A store restored from a backup
// of itself keeps its history, and a garbage-collection reset keeps it too.
Basis []byte `protobuf:"bytes,4,opt,name=basis,proto3" json:"basis,omitempty"`
// contains filtered or unexported fields
}
Contains mutations for one workspace in a `Push` request.
Mutation IDs are tracked per `(workspace, caller, client_id)`. The server maintains one watermark for each tuple. The contiguity rule (`id == watermark + 1`) applies within a batch, never across batches. A client that holds several workspaces must keep a separate mutation ID counter and pending queue per workspace.
The caller is the authenticated principal, identified by issuer and subject. All anonymous callers count as one caller. A push from another caller under the same `client_id` does not advance this caller's watermark. `Pull`, `Bootstrap`, and `Subscribe` report each caller their own watermark.
func (*WorkspaceBatch) Descriptor
deprecated
func (*WorkspaceBatch) Descriptor() ([]byte, []int)
Deprecated: Use WorkspaceBatch.ProtoReflect.Descriptor instead.
func (*WorkspaceBatch) GetBasis ¶ added in v0.8.0
func (x *WorkspaceBatch) GetBasis() []byte
func (*WorkspaceBatch) GetMutations ¶
func (x *WorkspaceBatch) GetMutations() []*Mutation
func (*WorkspaceBatch) GetSentThrough ¶ added in v0.8.0
func (x *WorkspaceBatch) GetSentThrough() uint64
func (*WorkspaceBatch) GetWorkspaceId ¶
func (x *WorkspaceBatch) GetWorkspaceId() string
func (*WorkspaceBatch) ProtoMessage ¶
func (*WorkspaceBatch) ProtoMessage()
func (*WorkspaceBatch) ProtoReflect ¶
func (x *WorkspaceBatch) ProtoReflect() protoreflect.Message
func (*WorkspaceBatch) Reset ¶
func (x *WorkspaceBatch) Reset()
func (*WorkspaceBatch) String ¶
func (x *WorkspaceBatch) String() string
type WorkspaceDropped ¶
type WorkspaceDropped struct {
// Identifies why the server dropped the workspace from the stream.
Reason WorkspaceDropped_Reason `protobuf:"varint,1,opt,name=reason,proto3,enum=syncplane.v1.WorkspaceDropped_Reason" json:"reason,omitempty"`
// Human-readable detail for logs. Do not parse it. Branch on `reason`.
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
WorkspaceDropped ends one workspace's participation in a stream. The server sends nothing further for that workspace; every other scope keeps streaming. The client acts on the reason and reopens the stream when it has a usable scope set again.
func (*WorkspaceDropped) Descriptor
deprecated
func (*WorkspaceDropped) Descriptor() ([]byte, []int)
Deprecated: Use WorkspaceDropped.ProtoReflect.Descriptor instead.
func (*WorkspaceDropped) GetMessage ¶
func (x *WorkspaceDropped) GetMessage() string
func (*WorkspaceDropped) GetReason ¶
func (x *WorkspaceDropped) GetReason() WorkspaceDropped_Reason
func (*WorkspaceDropped) ProtoMessage ¶
func (*WorkspaceDropped) ProtoMessage()
func (*WorkspaceDropped) ProtoReflect ¶
func (x *WorkspaceDropped) ProtoReflect() protoreflect.Message
func (*WorkspaceDropped) Reset ¶
func (x *WorkspaceDropped) Reset()
func (*WorkspaceDropped) String ¶
func (x *WorkspaceDropped) String() string
type WorkspaceDropped_Reason ¶
type WorkspaceDropped_Reason int32
const ( // Default value. The reason is unspecified. WorkspaceDropped_REASON_UNSPECIFIED WorkspaceDropped_Reason = 0 // The cursor is unusable. It predates the tombstone horizon, its scope // cannot be delta-resynced, or a different store lineage issued it. // Re-bootstrap this workspace, then reopen the stream. WorkspaceDropped_REASON_RESET WorkspaceDropped_Reason = 1 // The workspace-access gate refused this caller permanently. Stop // syncing the workspace and discard the local copy. Retrying will not // change the answer. WorkspaceDropped_REASON_ACCESS_REVOKED WorkspaceDropped_Reason = 2 // A failure scoped to this workspace that may not persist, such as a // storage error or a permission hook that could not decide. Reopen // with backoff. WorkspaceDropped_REASON_ERROR WorkspaceDropped_Reason = 3 // The caller holds no permission in the workspace's access model. A // grant written later lifts this restriction. Keep the local copy and // the queue, and retry with backoff. WorkspaceDropped_REASON_NO_ACCESS WorkspaceDropped_Reason = 4 )
func (WorkspaceDropped_Reason) Descriptor ¶
func (WorkspaceDropped_Reason) Descriptor() protoreflect.EnumDescriptor
func (WorkspaceDropped_Reason) Enum ¶
func (x WorkspaceDropped_Reason) Enum() *WorkspaceDropped_Reason
func (WorkspaceDropped_Reason) EnumDescriptor
deprecated
func (WorkspaceDropped_Reason) EnumDescriptor() ([]byte, []int)
Deprecated: Use WorkspaceDropped_Reason.Descriptor instead.
func (WorkspaceDropped_Reason) Number ¶
func (x WorkspaceDropped_Reason) Number() protoreflect.EnumNumber
func (WorkspaceDropped_Reason) String ¶
func (x WorkspaceDropped_Reason) String() string
func (WorkspaceDropped_Reason) Type ¶
func (WorkspaceDropped_Reason) Type() protoreflect.EnumType
type WorkspaceResults ¶
type WorkspaceResults struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
// One result per mutation in the batch, in submission order. Empty when
// error_code is set.
Results []*MutationResult `protobuf:"bytes,2,rep,name=results,proto3" json:"results,omitempty"`
// Set when the whole batch failed. Codes: "mutation_id_gap" (resend in
// order from the client's watermark), "client_id_in_use" (another writer
// used the client_id, see WorkspaceBatch.sent_through),
// "workspace_replaced" (the queue was written against another store
// history, see WorkspaceBatch.basis; drop it), "workspace_access_revoked"
// (permanent — stop syncing this workspace, see the client's purge path),
// "invalid_argument" (deterministic; the batch will never apply),
// "mutation_failed" (a custom mutator returned an error; retry, and drop
// the mutation after repeated identical failures), "internal" (transient;
// retry).
ErrorCode string `protobuf:"bytes,3,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"`
ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
// contains filtered or unexported fields
}
WorkspaceResults reports the outcome of one WorkspaceBatch.
A batch can fail as a whole — a mutation-id gap, a revoked workspace, a storage failure — without saying anything about the other workspaces in the same request. That failure is reported HERE, as error_code/error_message with empty results, instead of as an RPC error, so one bad partition cannot wedge the push path for every other workspace the client holds. RPC errors remain reserved for failures of the request itself (malformed, over limits, unauthenticated).
func (*WorkspaceResults) Descriptor
deprecated
func (*WorkspaceResults) Descriptor() ([]byte, []int)
Deprecated: Use WorkspaceResults.ProtoReflect.Descriptor instead.
func (*WorkspaceResults) GetErrorCode ¶
func (x *WorkspaceResults) GetErrorCode() string
func (*WorkspaceResults) GetErrorMessage ¶
func (x *WorkspaceResults) GetErrorMessage() string
func (*WorkspaceResults) GetResults ¶
func (x *WorkspaceResults) GetResults() []*MutationResult
func (*WorkspaceResults) GetWorkspaceId ¶
func (x *WorkspaceResults) GetWorkspaceId() string
func (*WorkspaceResults) ProtoMessage ¶
func (*WorkspaceResults) ProtoMessage()
func (*WorkspaceResults) ProtoReflect ¶
func (x *WorkspaceResults) ProtoReflect() protoreflect.Message
func (*WorkspaceResults) Reset ¶
func (x *WorkspaceResults) Reset()
func (*WorkspaceResults) String ¶
func (x *WorkspaceResults) String() string
type WorkspaceScope ¶
type WorkspaceScope struct {
WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"`
// Opaque cursor from a previous Pull/Bootstrap/Subscribe. Empty means "from
// the beginning", under the same bound as PullRequest.cursor: a workspace
// that has collected tombstones drops the scope with reason RESET instead.
Cursor []byte `protobuf:"bytes,2,opt,name=cursor,proto3" json:"cursor,omitempty"`
// Scopes this workspace's stream. Empty = full sync.
Subscriptions []*Subscription `protobuf:"bytes,3,rep,name=subscriptions,proto3" json:"subscriptions,omitempty"`
// PullRequest.min_seq, applied to every page this scope is served: the
// highest seq the client has seen a push acked at for this workspace.
MinSeq uint64 `protobuf:"varint,4,opt,name=min_seq,json=minSeq,proto3" json:"min_seq,omitempty"`
// PullRequest.caller_access_version, for the first page of this scope. A
// later page sends what changed since the CallerAccess or delta the scope
// sent last.
CallerAccessVersion *uint64 `` /* 128-byte string literal not displayed */
// contains filtered or unexported fields
}
WorkspaceScope is one workspace's slice of a Subscribe stream: where to resume from and what to sync. The subscription set is fixed for the life of the stream. A cursor issued under another subscription set or filter epoch delta-resyncs on the stream before the scope reports caught_up, and a filter epoch that moves while the stream is open delta-resyncs the scope then, both exactly as a Pull would. Where a Pull would reset, the scope is dropped with reason RESET.
func (*WorkspaceScope) Descriptor
deprecated
func (*WorkspaceScope) Descriptor() ([]byte, []int)
Deprecated: Use WorkspaceScope.ProtoReflect.Descriptor instead.
func (*WorkspaceScope) GetCallerAccessVersion ¶ added in v0.2.0
func (x *WorkspaceScope) GetCallerAccessVersion() uint64
func (*WorkspaceScope) GetCursor ¶
func (x *WorkspaceScope) GetCursor() []byte
func (*WorkspaceScope) GetMinSeq ¶
func (x *WorkspaceScope) GetMinSeq() uint64
func (*WorkspaceScope) GetSubscriptions ¶
func (x *WorkspaceScope) GetSubscriptions() []*Subscription
func (*WorkspaceScope) GetWorkspaceId ¶
func (x *WorkspaceScope) GetWorkspaceId() string
func (*WorkspaceScope) ProtoMessage ¶
func (*WorkspaceScope) ProtoMessage()
func (*WorkspaceScope) ProtoReflect ¶
func (x *WorkspaceScope) ProtoReflect() protoreflect.Message
func (*WorkspaceScope) Reset ¶
func (x *WorkspaceScope) Reset()
func (*WorkspaceScope) String ¶
func (x *WorkspaceScope) String() string