410 lines
24 KiB
Go
410 lines
24 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
const (
|
|
ObjectSyncCapabilityUnverified = "unverified"
|
|
ObjectSyncCapabilityCreateOnly = "create_only"
|
|
ObjectSyncCapabilityUpdateEnabled = "update_enabled"
|
|
ObjectSyncCapabilityDrifted = "drifted"
|
|
ObjectSyncCapabilityUnsupported = "unsupported"
|
|
ObjectSyncDefaultManifestPageMaxItems = 1000
|
|
)
|
|
|
|
type ObjectSyncSpacePolicy struct {
|
|
AllowedActions []string `json:"allowedActions" bson:"allowedActions"`
|
|
MaxObjectBytes int64 `json:"maxObjectBytes" bson:"maxObjectBytes"`
|
|
MaxSessionFiles int64 `json:"maxSessionFiles" bson:"maxSessionFiles"`
|
|
MaxSessionBytes int64 `json:"maxSessionBytes" bson:"maxSessionBytes"`
|
|
MaxConcurrentUploads int `json:"maxConcurrentUploads" bson:"maxConcurrentUploads"`
|
|
AllowDelete bool `json:"allowDelete" bson:"allowDelete"`
|
|
AllowConditionalUpdate bool `json:"allowConditionalUpdate" bson:"allowConditionalUpdate"`
|
|
DefaultConflictResolution string `json:"defaultConflictResolution" bson:"defaultConflictResolution"`
|
|
AllowForceOverwrite bool `json:"allowForceOverwrite" bson:"allowForceOverwrite"`
|
|
}
|
|
|
|
func DefaultObjectSyncSpacePolicy() ObjectSyncSpacePolicy {
|
|
return ObjectSyncSpacePolicy{
|
|
AllowedActions: []string{"plan", "list_metadata", "create", "keep_both"},
|
|
MaxObjectBytes: 1 << 40,
|
|
MaxSessionFiles: 1_000_000,
|
|
MaxSessionBytes: 20 << 40,
|
|
MaxConcurrentUploads: 16,
|
|
AllowDelete: false,
|
|
AllowConditionalUpdate: false,
|
|
DefaultConflictResolution: "keep_both",
|
|
AllowForceOverwrite: false,
|
|
}
|
|
}
|
|
|
|
type ObjectSyncCapabilityRecord struct {
|
|
State string `json:"state" bson:"state"`
|
|
ConditionalCreate bool `json:"conditionalCreate" bson:"conditionalCreate"`
|
|
ConditionalUpdate bool `json:"conditionalUpdate" bson:"conditionalUpdate"`
|
|
ConditionalMultipart bool `json:"conditionalMultipart" bson:"conditionalMultipart"`
|
|
MultipartCopy bool `json:"multipartCopy" bson:"multipartCopy"`
|
|
VersionID bool `json:"versionId" bson:"versionId"`
|
|
ExclusivePrefixConfirmed bool `json:"exclusivePrefixConfirmed" bson:"exclusivePrefixConfirmed"`
|
|
ProbedAt string `json:"probedAt,omitempty" bson:"probedAt,omitempty"`
|
|
ProbeError string `json:"probeError,omitempty" bson:"probeError,omitempty"`
|
|
}
|
|
|
|
type ObjectSyncSpaceRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
Name string `json:"name" bson:"name"`
|
|
Description string `json:"description,omitempty" bson:"description,omitempty"`
|
|
ConnectionID string `json:"connectionId" bson:"connectionId"`
|
|
Bucket string `json:"bucket" bson:"bucket"`
|
|
RootPrefix string `json:"rootPrefix" bson:"rootPrefix"`
|
|
Mode string `json:"mode" bson:"mode"`
|
|
Enabled bool `json:"enabled" bson:"enabled"`
|
|
Policy ObjectSyncSpacePolicy `json:"policy" bson:"policy"`
|
|
Capability ObjectSyncCapabilityRecord `json:"capability" bson:"capability"`
|
|
CreatedBy string `json:"createdBy,omitempty" bson:"createdBy,omitempty"`
|
|
UpdatedBy string `json:"updatedBy,omitempty" bson:"updatedBy,omitempty"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
}
|
|
|
|
type ObjectSyncCredentialScope struct {
|
|
SyncSpaceID string `json:"syncSpaceId" bson:"syncSpaceId"`
|
|
AllowedRelativePrefixes []string `json:"allowedRelativePrefixes" bson:"allowedRelativePrefixes"`
|
|
Actions []string `json:"actions" bson:"actions"`
|
|
}
|
|
|
|
type ObjectSyncDeviceRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
Name string `json:"name" bson:"name"`
|
|
Platform string `json:"platform,omitempty" bson:"platform,omitempty"`
|
|
Architecture string `json:"architecture,omitempty" bson:"architecture,omitempty"`
|
|
ClientVersion string `json:"clientVersion,omitempty" bson:"clientVersion,omitempty"`
|
|
Status string `json:"status" bson:"status"`
|
|
LastSeenAt string `json:"lastSeenAt,omitempty" bson:"lastSeenAt,omitempty"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
}
|
|
|
|
type ObjectSyncDeviceAuthorizationRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
|
|
DeviceID string `json:"deviceId" bson:"deviceId"`
|
|
DeviceName string `json:"deviceName" bson:"deviceName"`
|
|
Platform string `json:"platform,omitempty" bson:"platform,omitempty"`
|
|
Architecture string `json:"architecture,omitempty" bson:"architecture,omitempty"`
|
|
ClientVersion string `json:"clientVersion,omitempty" bson:"clientVersion,omitempty"`
|
|
DeviceCodeHash string `json:"-" bson:"deviceCodeHash"`
|
|
UserCode string `json:"userCode" bson:"userCode"`
|
|
Status string `json:"status" bson:"status"`
|
|
Scopes []ObjectSyncCredentialScope `json:"scopes,omitempty" bson:"scopes,omitempty"`
|
|
ApprovedBy string `json:"approvedBy,omitempty" bson:"approvedBy,omitempty"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
ExpiresAt string `json:"expiresAt" bson:"expiresAt"`
|
|
ExpiresAtTime time.Time `json:"-" bson:"expiresAtTime"`
|
|
}
|
|
|
|
type ObjectSyncCredentialRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
DeviceID string `json:"deviceId" bson:"deviceId"`
|
|
Name string `json:"name" bson:"name"`
|
|
Enabled bool `json:"enabled" bson:"enabled"`
|
|
TokenHash string `json:"-" bson:"tokenHash"`
|
|
TokenPreview string `json:"tokenPreview" bson:"tokenPreview"`
|
|
Scopes []ObjectSyncCredentialScope `json:"scopes" bson:"scopes"`
|
|
LastUsedAt string `json:"lastUsedAt,omitempty" bson:"lastUsedAt,omitempty"`
|
|
RevokedAt string `json:"revokedAt,omitempty" bson:"revokedAt,omitempty"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
}
|
|
|
|
type ObjectSyncRemoteBase struct {
|
|
Exists bool `json:"exists" bson:"exists"`
|
|
ETag string `json:"etag,omitempty" bson:"etag,omitempty"`
|
|
SizeBytes int64 `json:"sizeBytes,omitempty" bson:"sizeBytes,omitempty"`
|
|
LastModified string `json:"lastModified,omitempty" bson:"lastModified,omitempty"`
|
|
PlatformVersion int64 `json:"platformVersion,omitempty" bson:"platformVersion,omitempty"`
|
|
VersionID string `json:"versionId,omitempty" bson:"versionId,omitempty"`
|
|
}
|
|
|
|
type ObjectSyncSessionCounts struct {
|
|
Manifest int64 `json:"manifest" bson:"manifest"`
|
|
Unchanged int64 `json:"unchanged" bson:"unchanged"`
|
|
Create int64 `json:"create" bson:"create"`
|
|
Update int64 `json:"update" bson:"update"`
|
|
KeptBoth int64 `json:"keptBoth" bson:"keptBoth"`
|
|
Skipped int64 `json:"skipped" bson:"skipped"`
|
|
Denied int64 `json:"denied" bson:"denied"`
|
|
Failed int64 `json:"failed" bson:"failed"`
|
|
Committed int64 `json:"committed" bson:"committed"`
|
|
}
|
|
|
|
type ObjectSyncSessionRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
SyncSpaceID string `json:"syncSpaceId" bson:"syncSpaceId"`
|
|
CredentialID string `json:"credentialId" bson:"credentialId"`
|
|
DeviceID string `json:"deviceId" bson:"deviceId"`
|
|
MappingID string `json:"mappingId" bson:"mappingId"`
|
|
ClientVersion string `json:"clientVersion" bson:"clientVersion"`
|
|
ProtocolVersion string `json:"protocolVersion" bson:"protocolVersion"`
|
|
Status ObjectSyncSessionStatus `json:"status" bson:"status"`
|
|
PolicySnapshot ObjectSyncSpacePolicy `json:"policySnapshot" bson:"policySnapshot"`
|
|
ManifestDigest string `json:"manifestDigest,omitempty" bson:"manifestDigest,omitempty"`
|
|
ManifestFinalPage int `json:"manifestFinalPage,omitempty" bson:"manifestFinalPage,omitempty"`
|
|
Counts ObjectSyncSessionCounts `json:"counts" bson:"counts"`
|
|
TotalBytes int64 `json:"totalBytes" bson:"totalBytes"`
|
|
OperationID string `json:"operationId,omitempty" bson:"operationId,omitempty"`
|
|
ErrorSummary string `json:"errorSummary,omitempty" bson:"errorSummary,omitempty"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
CompletedAt string `json:"completedAt,omitempty" bson:"completedAt,omitempty"`
|
|
LastHeartbeatAt string `json:"lastHeartbeatAt,omitempty" bson:"lastHeartbeatAt,omitempty"`
|
|
ExpiresAt string `json:"expiresAt" bson:"expiresAt"`
|
|
PurgeAt time.Time `json:"-" bson:"purgeAt"`
|
|
}
|
|
|
|
type ObjectSyncManifestItemInput struct {
|
|
ClientItemID string `json:"clientItemId"`
|
|
RelativePath string `json:"relativePath"`
|
|
Kind string `json:"kind"`
|
|
SizeBytes int64 `json:"sizeBytes"`
|
|
ModifiedAt string `json:"modifiedAt"`
|
|
SHA256 string `json:"sha256"`
|
|
ContentType string `json:"contentType,omitempty"`
|
|
LastKnownRemote ObjectSyncRemoteBase `json:"lastKnownRemote,omitempty"`
|
|
}
|
|
|
|
type ObjectSyncItemRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
SessionID string `json:"sessionId" bson:"sessionId"`
|
|
ClientItemID string `json:"clientItemId" bson:"clientItemId"`
|
|
ManifestPage int `json:"manifestPage" bson:"manifestPage"`
|
|
RelativePath string `json:"relativePath" bson:"relativePath"`
|
|
NormalizedRelativePath string `json:"normalizedRelativePath" bson:"normalizedRelativePath"`
|
|
TargetKey string `json:"targetKey" bson:"targetKey"`
|
|
LogicalTargetKey string `json:"logicalTargetKey,omitempty" bson:"logicalTargetKey,omitempty"`
|
|
SizeBytes int64 `json:"sizeBytes" bson:"sizeBytes"`
|
|
ModifiedAt string `json:"modifiedAt" bson:"modifiedAt"`
|
|
SHA256 string `json:"sha256" bson:"sha256"`
|
|
ContentType string `json:"contentType,omitempty" bson:"contentType,omitempty"`
|
|
ExpectedBase ObjectSyncRemoteBase `json:"expectedBase" bson:"expectedBase"`
|
|
Action string `json:"action" bson:"action"`
|
|
Status ObjectSyncItemStatus `json:"status" bson:"status"`
|
|
StagingKey string `json:"stagingKey,omitempty" bson:"stagingKey,omitempty"`
|
|
UploadMode string `json:"uploadMode,omitempty" bson:"uploadMode,omitempty"`
|
|
UploadID string `json:"uploadId,omitempty" bson:"uploadId,omitempty"`
|
|
UploadedParts []ObjectStorageMultipartUploadPart `json:"uploadedParts,omitempty" bson:"uploadedParts,omitempty"`
|
|
LeaseID string `json:"leaseId,omitempty" bson:"leaseId,omitempty"`
|
|
FencingToken int64 `json:"fencingToken,omitempty" bson:"fencingToken,omitempty"`
|
|
CommittedVersion ObjectSyncRemoteBase `json:"committedVersion,omitempty" bson:"committedVersion,omitempty"`
|
|
ForceSourceKey string `json:"forceSourceKey,omitempty" bson:"forceSourceKey,omitempty"`
|
|
ForceActorID string `json:"forceActorId,omitempty" bson:"forceActorId,omitempty"`
|
|
OperationID string `json:"operationId,omitempty" bson:"operationId,omitempty"`
|
|
AttemptCount int `json:"attemptCount" bson:"attemptCount"`
|
|
LastError string `json:"lastError,omitempty" bson:"lastError,omitempty"`
|
|
CoordinatorOwner string `json:"-" bson:"coordinatorOwner,omitempty"`
|
|
CoordinatorLeaseUntil time.Time `json:"-" bson:"coordinatorLeaseUntil,omitempty"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
PurgeAt time.Time `json:"-" bson:"purgeAt"`
|
|
}
|
|
|
|
type ObjectSyncLeaseRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
ResourceHash string `json:"resourceHash" bson:"resourceHash"`
|
|
ResourceType string `json:"resourceType" bson:"resourceType"`
|
|
ConnectionID string `json:"connectionId" bson:"connectionId"`
|
|
Bucket string `json:"bucket" bson:"bucket"`
|
|
KeyOrPrefix string `json:"keyOrPrefix" bson:"keyOrPrefix"`
|
|
OwnerSessionID string `json:"ownerSessionId,omitempty" bson:"ownerSessionId,omitempty"`
|
|
OwnerItemID string `json:"ownerItemId,omitempty" bson:"ownerItemId,omitempty"`
|
|
FencingToken int64 `json:"fencingToken" bson:"fencingToken"`
|
|
ExpiresAt string `json:"expiresAt,omitempty" bson:"expiresAt,omitempty"`
|
|
ExpiresAtTime time.Time `json:"-" bson:"expiresAtTime,omitempty"`
|
|
LastHeartbeatAt string `json:"lastHeartbeatAt,omitempty" bson:"lastHeartbeatAt,omitempty"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
}
|
|
|
|
type ObjectSyncObjectHeadRecord struct {
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
SyncSpaceID string `json:"syncSpaceId" bson:"syncSpaceId"`
|
|
Key string `json:"key" bson:"key"`
|
|
PlatformVersion int64 `json:"platformVersion" bson:"platformVersion"`
|
|
RemoteETag string `json:"remoteETag" bson:"remoteETag"`
|
|
VersionID string `json:"versionId,omitempty" bson:"versionId,omitempty"`
|
|
SizeBytes int64 `json:"sizeBytes" bson:"sizeBytes"`
|
|
SHA256 string `json:"sha256" bson:"sha256"`
|
|
SessionID string `json:"sessionId" bson:"sessionId"`
|
|
ItemID string `json:"itemId" bson:"itemId"`
|
|
Drifted bool `json:"drifted" bson:"drifted"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
}
|
|
|
|
type ObjectSyncVersionRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
SyncSpaceID string `json:"syncSpaceId" bson:"syncSpaceId"`
|
|
Key string `json:"key" bson:"key"`
|
|
LogicalTargetKey string `json:"logicalTargetKey,omitempty" bson:"logicalTargetKey,omitempty"`
|
|
SourceKey string `json:"sourceKey,omitempty" bson:"sourceKey,omitempty"`
|
|
PlatformVersion int64 `json:"platformVersion" bson:"platformVersion"`
|
|
RemoteETag string `json:"remoteETag" bson:"remoteETag"`
|
|
VersionID string `json:"versionId,omitempty" bson:"versionId,omitempty"`
|
|
SizeBytes int64 `json:"sizeBytes" bson:"sizeBytes"`
|
|
SHA256 string `json:"sha256" bson:"sha256"`
|
|
SessionID string `json:"sessionId" bson:"sessionId"`
|
|
ItemID string `json:"itemId" bson:"itemId"`
|
|
ActorID string `json:"actorId" bson:"actorId"`
|
|
CommittedAt string `json:"committedAt" bson:"committedAt"`
|
|
PurgeAt time.Time `json:"-" bson:"purgeAt"`
|
|
}
|
|
|
|
type ObjectSyncAuditEvent struct {
|
|
ID string `json:"id" bson:"id"`
|
|
EventKey string `json:"eventKey" bson:"eventKey"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
ActorType string `json:"actorType" bson:"actorType"`
|
|
ActorID string `json:"actorId" bson:"actorId"`
|
|
CredentialID string `json:"credentialId,omitempty" bson:"credentialId,omitempty"`
|
|
DeviceID string `json:"deviceId,omitempty" bson:"deviceId,omitempty"`
|
|
RequestID string `json:"requestId,omitempty" bson:"requestId,omitempty"`
|
|
SessionID string `json:"sessionId,omitempty" bson:"sessionId,omitempty"`
|
|
ItemID string `json:"itemId,omitempty" bson:"itemId,omitempty"`
|
|
Action string `json:"action" bson:"action"`
|
|
Target map[string]any `json:"target,omitempty" bson:"target,omitempty"`
|
|
Before map[string]any `json:"before,omitempty" bson:"before,omitempty"`
|
|
After map[string]any `json:"after,omitempty" bson:"after,omitempty"`
|
|
Result string `json:"result" bson:"result"`
|
|
Reason string `json:"reason,omitempty" bson:"reason,omitempty"`
|
|
PreviousHash string `json:"previousHash,omitempty" bson:"previousHash,omitempty"`
|
|
EventHash string `json:"eventHash" bson:"eventHash"`
|
|
OccurredAt string `json:"occurredAt" bson:"occurredAt"`
|
|
PurgeAt time.Time `json:"-" bson:"purgeAt"`
|
|
}
|
|
|
|
type ObjectSyncAuditSealRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
DayUTC string `json:"dayUtc" bson:"dayUtc"`
|
|
EventCount int64 `json:"eventCount" bson:"eventCount"`
|
|
FirstEventHash string `json:"firstEventHash" bson:"firstEventHash"`
|
|
LastEventHash string `json:"lastEventHash" bson:"lastEventHash"`
|
|
AggregateHash string `json:"aggregateHash" bson:"aggregateHash"`
|
|
Signature string `json:"signature" bson:"signature"`
|
|
SigningKeyID string `json:"signingKeyId" bson:"signingKeyId"`
|
|
ObjectKey string `json:"objectKey" bson:"objectKey"`
|
|
ObjectETag string `json:"objectETag" bson:"objectETag"`
|
|
ObjectVersionID string `json:"objectVersionId,omitempty" bson:"objectVersionId,omitempty"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
PurgeAt time.Time `json:"-" bson:"purgeAt"`
|
|
}
|
|
|
|
type ObjectSyncReleaseRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
SyncSpaceID string `json:"syncSpaceId" bson:"syncSpaceId"`
|
|
Name string `json:"name" bson:"name"`
|
|
Description string `json:"description,omitempty" bson:"description,omitempty"`
|
|
SessionIDs []string `json:"sessionIds" bson:"sessionIds"`
|
|
ManifestKey string `json:"manifestKey" bson:"manifestKey"`
|
|
ManifestSHA256 string `json:"manifestSha256" bson:"manifestSha256"`
|
|
ObjectCount int64 `json:"objectCount" bson:"objectCount"`
|
|
TotalBytes int64 `json:"totalBytes" bson:"totalBytes"`
|
|
Status string `json:"status" bson:"status"`
|
|
CreatedBy string `json:"createdBy" bson:"createdBy"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
PublishedAt string `json:"publishedAt,omitempty" bson:"publishedAt,omitempty"`
|
|
CoordinatorOwner string `json:"-" bson:"coordinatorOwner,omitempty"`
|
|
CoordinatorLeaseUntil time.Time `json:"-" bson:"coordinatorLeaseUntil,omitempty"`
|
|
}
|
|
|
|
type ObjectSyncClientReleaseRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
Version string `json:"version" bson:"version"`
|
|
Channel string `json:"channel" bson:"channel"`
|
|
ProtocolVersion string `json:"protocolVersion" bson:"protocolVersion"`
|
|
MinimumServerVersion string `json:"minimumServerVersion" bson:"minimumServerVersion"`
|
|
Artifacts map[string]string `json:"artifacts" bson:"artifacts"`
|
|
SHA256 map[string]string `json:"sha256" bson:"sha256"`
|
|
Signature string `json:"signature" bson:"signature"`
|
|
RolloutPercent int `json:"rolloutPercent" bson:"rolloutPercent"`
|
|
Paused bool `json:"paused" bson:"paused"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
StageChangedAt string `json:"stageChangedAt" bson:"stageChangedAt"`
|
|
}
|
|
|
|
type ObjectSyncReconcileRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OperationID string `json:"operationId" bson:"operationId"`
|
|
OrganizationID string `json:"organizationId" bson:"organizationId"`
|
|
SyncSpaceID string `json:"syncSpaceId" bson:"syncSpaceId"`
|
|
Status string `json:"status" bson:"status"`
|
|
Scanned int64 `json:"scanned" bson:"scanned"`
|
|
Drifted int64 `json:"drifted" bson:"drifted"`
|
|
Error string `json:"error,omitempty" bson:"error,omitempty"`
|
|
CreatedBy string `json:"createdBy" bson:"createdBy"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
CompletedAt string `json:"completedAt,omitempty" bson:"completedAt,omitempty"`
|
|
CoordinatorOwner string `json:"-" bson:"coordinatorOwner,omitempty"`
|
|
CoordinatorLeaseUntil time.Time `json:"-" bson:"coordinatorLeaseUntil,omitempty"`
|
|
}
|
|
|
|
type ObjectSyncIdempotencyRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
OrganizationID string `json:"organizationId,omitempty" bson:"organizationId,omitempty"`
|
|
ActorID string `json:"actorId,omitempty" bson:"actorId,omitempty"`
|
|
Key string `json:"key" bson:"key"`
|
|
RequestMethod string `json:"requestMethod" bson:"requestMethod"`
|
|
RequestPath string `json:"requestPath" bson:"requestPath"`
|
|
RequestDigest string `json:"requestDigest" bson:"requestDigest"`
|
|
State string `json:"state" bson:"state"`
|
|
ResponseStatus int `json:"responseStatus,omitempty" bson:"responseStatus,omitempty"`
|
|
ResponseHeader map[string]string `json:"responseHeader,omitempty" bson:"responseHeader,omitempty"`
|
|
ResponseBody []byte `json:"responseBody,omitempty" bson:"responseBody,omitempty"`
|
|
CreatedAt string `json:"createdAt" bson:"createdAt"`
|
|
UpdatedAt string `json:"updatedAt" bson:"updatedAt"`
|
|
ExpiresAt time.Time `json:"-" bson:"expiresAt"`
|
|
}
|
|
|
|
type ObjectSyncRateLimitRecord struct {
|
|
ID string `json:"id" bson:"id"`
|
|
Subject string `json:"subject" bson:"subject"`
|
|
Window string `json:"window" bson:"window"`
|
|
Count int64 `json:"count" bson:"count"`
|
|
ExpiresAt time.Time `json:"-" bson:"expiresAt"`
|
|
}
|
|
|
|
type ObjectSyncListQuery struct {
|
|
OrganizationID string
|
|
SessionID string
|
|
Status string
|
|
Cursor string
|
|
Limit int
|
|
}
|
|
|
|
type ObjectSyncItemPage struct {
|
|
Items []ObjectSyncItemRecord `json:"items"`
|
|
NextCursor string `json:"nextCursor,omitempty"`
|
|
}
|
|
|
|
type ObjectSyncSessionPage struct {
|
|
Items []ObjectSyncSessionRecord `json:"items"`
|
|
NextCursor string `json:"nextCursor,omitempty"`
|
|
}
|
|
|
|
type ObjectSyncHeadPage struct {
|
|
Items []ObjectSyncObjectHeadRecord `json:"items"`
|
|
NextCursor string `json:"nextCursor,omitempty"`
|
|
}
|
|
|
|
type ObjectSyncAuditPage struct {
|
|
Items []ObjectSyncAuditEvent `json:"items"`
|
|
NextCursor string `json:"nextCursor,omitempty"`
|
|
}
|