sobject

package
v0.56.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxErrorDetailsSize is the maximum size in bytes for error details
	MaxErrorDetailsSize = 4096

	// MaxBlockRefSize is the maximum size in bytes for block references
	MaxBlockRefSize = 256

	// MaxInnerDataSize is the maximum size in bytes for inner data
	MaxInnerDataSize = 1024 * 1024 // 1 MB

	// MaxSignatureSize is the maximum size in bytes for signatures
	MaxSignatureSize = 512

	// MaxParticipants is the maximum number of participants in a shared object
	MaxParticipants = 100

	// MaxOperations is the maximum number of pending operations
	MaxOperations = 1000

	// MaxOperationRejections is the maximum number of operation rejections
	MaxOperationRejections = 1000

	// MaxValidatorSignatures is the maximum number of validator signatures
	MaxValidatorSignatures = 100

	// MaxStateDataSize is the maximum size in bytes for state data
	MaxStateDataSize = 10 * 1024 * 1024 // 10 MB
)
View Source
const (
	// MaxBodyTypeLength is the maximum length of a body_type string.
	MaxBodyTypeLength = 1024
	// MaxBodyMetaLength is the maximum length of body_meta bytes.
	MaxBodyMetaLength = 4096
)
View Source
const (
	// JournalFormatVersion is the durable journal payload and framing version.
	JournalFormatVersion uint32 = 1
)
View Source
const OwnerTypeAccount = "account"

OwnerTypeAccount is the owner type for account-owned shared objects.

View Source
const OwnerTypeOrganization = "organization"

OwnerTypeOrganization is the owner type for org-owned shared objects.

Variables

View Source
var (
	// ErrEmptySharedObjectID is returned if the shared object id was empty.
	ErrEmptySharedObjectID = errors.New("shared object id cannot be empty")

	// ErrInvalidSharedObjectID is returned if the shared object id was invalid.
	ErrInvalidSharedObjectID = errors.New("invalid shared object id")

	// ErrSharedObjectExists is returned if the shared object already exists.
	ErrSharedObjectExists = errors.New("shared object with that id already exists")

	// ErrSharedObjectNotFound is returned if the sobject was not found.
	ErrSharedObjectNotFound = errors.New("shared object not found")

	// ErrInvalidSOParticipantRole is returned if the shared object participant role is invalid.
	ErrInvalidSOParticipantRole = errors.New("invalid shared object participant role")

	// ErrEmptyParticipants is returned if no participants are specified in the SharedObjectConfig.
	ErrEmptyParticipants = errors.New("empty shared object participants list")

	// ErrEmptyBodyType is returned if the sobject body type was empty.
	ErrEmptyBodyType = errors.New("empty shared object body type")

	// ErrEmptyInnerData is returned if the inner data was empty.
	ErrEmptyInnerData = errors.New("empty inner data")

	// ErrInvalidSeqno is returned if the root seqno was unexpected.
	ErrInvalidSeqno = errors.New("invalid shared object root seqno")

	// ErrInvalidNonce is returned if the op nonce was unexpected.
	ErrInvalidNonce = errors.New("invalid shared object op nonce")

	// ErrEmptyValidatorSignatures is returned if there are no validator signatures.
	ErrEmptyValidatorSignatures = errors.New("at least one validator signature required")

	// ErrCannotDecode is returned if our local peer cannot decode the inner data (no valid grant).
	ErrCannotDecode = errors.New("access denied: no valid grant for our peer")

	// ErrNotParticipant is returned if the peer is not a participant in the shared object.
	ErrNotParticipant = errors.New("access denied: peer is not a participant")

	// ErrEmptyTransformConfig is returned if the transform config was empty.
	ErrEmptyTransformConfig = errors.New("transform config is required")

	// ErrMaxSizeExceeded is returned if a size limit is exceeded.
	ErrMaxSizeExceeded = errors.New("maximum size exceeded")

	// ErrMaxCountExceeded is returned if a count limit is exceeded.
	ErrMaxCountExceeded = errors.New("maximum count exceeded")

	// ErrInvalidLocalOpID is returned if the local op id is invalid.
	ErrInvalidLocalOpID = ulid.ErrInvalidULID

	// ErrRejectedOp is returned if the op was rejected.
	ErrRejectedOp = errors.New("rejected op")

	// ErrInvalidValidator is returned if the required validator peer is not in the set of signatures.
	ErrInvalidValidator = errors.New("required validator peer not in set of signatures")

	// ErrInvalidMeta is returned if the metadata is invalid.
	ErrInvalidMeta = errors.New("sobject: meta: invalid shared object metadata")

	// ErrSharedObjectRecoveryCredentialRequired is returned if recovery needs entity credentials.
	ErrSharedObjectRecoveryCredentialRequired = errors.New("shared object recovery requires entity credentials")

	// ErrSharedObjectRecoveryEntityMismatch is returned if recovery material does not match the current entity.
	ErrSharedObjectRecoveryEntityMismatch = errors.New("shared object recovery entity mismatch")

	// ErrJournalInvalidKey is returned for an incomplete or malformed mutation key.
	ErrJournalInvalidKey = errors.New("invalid shared object journal mutation key")

	// ErrJournalInvalidTransition is returned when a journal record violates the reducer state machine.
	ErrJournalInvalidTransition = errors.New("invalid shared object journal transition")

	// ErrJournalCorrupt is returned when a complete journal frame or payload is invalid.
	ErrJournalCorrupt = errors.New("corrupt shared object journal")

	// ErrJournalWriterPoisoned is returned after a journal writer fails and cannot accept more appends.
	ErrJournalWriterPoisoned = errors.New("shared object journal writer is poisoned")

	// ErrJournalKeyUnavailable is returned when the journal-at-rest key cannot be loaded.
	ErrJournalKeyUnavailable = errors.New("shared object journal key unavailable")

	// ErrJournalKeyAuthority is returned when the key authority rejects a journal key request.
	ErrJournalKeyAuthority = errors.New("shared object journal key authority failure")

	// ErrJournalStaleTransformEpoch is returned before sending an envelope recorded under an old epoch.
	ErrJournalStaleTransformEpoch = errors.New("stale shared object transform epoch")

	// ErrJournalRecoveryBlocked is returned when body or signing authority cannot continue recovery.
	ErrJournalRecoveryBlocked = errors.New("shared object journal recovery blocked")

	// ErrJournalSupersessionImmutable is returned when a lineage successor changes its predecessor.
	ErrJournalSupersessionImmutable = errors.New("shared object journal supersession is immutable")

	// ErrJournalStorageRequired is returned when a journal storage owner is missing.
	ErrJournalStorageRequired = errors.New("shared object journal storage is required")

	// ErrJournalScopeMismatch is returned when a key belongs to another journal scope.
	ErrJournalScopeMismatch = errors.New("shared object journal scope mismatch")

	// ErrJournalLookupRequired is returned before replaying an ambiguous send.
	ErrJournalLookupRequired = errors.New("shared object journal receipt lookup required")

	// ErrJournalLookupPending is returned when a lookup adopts an in-flight remote attempt.
	ErrJournalLookupPending = errors.New("shared object journal receipt is pending")

	// ErrJournalTerminalAdopted is returned when lookup adopts terminal receipt evidence.
	ErrJournalTerminalAdopted = errors.New("shared object journal terminal receipt adopted")

	// ErrJournalInsecureFileMode is returned when journal storage permissions are too broad.
	ErrJournalInsecureFileMode = errors.New("shared object journal file mode is insecure")

	// ErrJournalCheckpointCorrupt is returned when generation metadata cannot be validated.
	ErrJournalCheckpointCorrupt = errors.New("corrupt shared object journal checkpoint")

	// ErrJournalReceiptVerifierRequired is returned when receipt authority is not injected.
	ErrJournalReceiptVerifierRequired = errors.New("shared object journal receipt verifier is required")

	// ErrJournalReceiptVerification is returned when terminal receipt authentication fails.
	ErrJournalReceiptVerification = errors.New("shared object journal receipt verification failed")

	// ErrJournalLookupVerifierRequired is returned when lookup authority is not injected.
	ErrJournalLookupVerifierRequired = errors.New("shared object journal lookup verifier is required")

	// ErrJournalLookupVerification is returned when an opaque lookup response fails authentication.
	ErrJournalLookupVerification = errors.New("shared object journal lookup verification failed")
)
View Source
var (
	SharedObjectHealthStatus_name = map[int32]string{
		0: "SHARED_OBJECT_HEALTH_STATUS_UNKNOWN",
		1: "SHARED_OBJECT_HEALTH_STATUS_LOADING",
		2: "SHARED_OBJECT_HEALTH_STATUS_READY",
		3: "SHARED_OBJECT_HEALTH_STATUS_DEGRADED",
		4: "SHARED_OBJECT_HEALTH_STATUS_CLOSED",
	}
	SharedObjectHealthStatus_value = map[string]int32{
		"SHARED_OBJECT_HEALTH_STATUS_UNKNOWN":  0,
		"SHARED_OBJECT_HEALTH_STATUS_LOADING":  1,
		"SHARED_OBJECT_HEALTH_STATUS_READY":    2,
		"SHARED_OBJECT_HEALTH_STATUS_DEGRADED": 3,
		"SHARED_OBJECT_HEALTH_STATUS_CLOSED":   4,
	}
)

Enum value maps for SharedObjectHealthStatus.

View Source
var (
	SharedObjectHealthLayer_name = map[int32]string{
		0: "SHARED_OBJECT_HEALTH_LAYER_UNKNOWN",
		1: "SHARED_OBJECT_HEALTH_LAYER_SHARED_OBJECT",
		2: "SHARED_OBJECT_HEALTH_LAYER_BODY",
	}
	SharedObjectHealthLayer_value = map[string]int32{
		"SHARED_OBJECT_HEALTH_LAYER_UNKNOWN":       0,
		"SHARED_OBJECT_HEALTH_LAYER_SHARED_OBJECT": 1,
		"SHARED_OBJECT_HEALTH_LAYER_BODY":          2,
	}
)

Enum value maps for SharedObjectHealthLayer.

View Source
var (
	SharedObjectHealthCommonReason_name = map[int32]string{
		0: "SHARED_OBJECT_HEALTH_COMMON_REASON_UNKNOWN",
		1: "SHARED_OBJECT_HEALTH_COMMON_REASON_NOT_FOUND",
		2: "SHARED_OBJECT_HEALTH_COMMON_REASON_ACCESS_REVOKED",
		3: "SHARED_OBJECT_HEALTH_COMMON_REASON_INITIAL_STATE_REJECTED",
		4: "SHARED_OBJECT_HEALTH_COMMON_REASON_BLOCK_NOT_FOUND",
		5: "SHARED_OBJECT_HEALTH_COMMON_REASON_TRANSFORM_CONFIG_DECODE_FAILED",
		6: "SHARED_OBJECT_HEALTH_COMMON_REASON_BODY_CONFIG_DECODE_FAILED",
	}
	SharedObjectHealthCommonReason_value = map[string]int32{
		"SHARED_OBJECT_HEALTH_COMMON_REASON_UNKNOWN":                        0,
		"SHARED_OBJECT_HEALTH_COMMON_REASON_NOT_FOUND":                      1,
		"SHARED_OBJECT_HEALTH_COMMON_REASON_ACCESS_REVOKED":                 2,
		"SHARED_OBJECT_HEALTH_COMMON_REASON_INITIAL_STATE_REJECTED":         3,
		"SHARED_OBJECT_HEALTH_COMMON_REASON_BLOCK_NOT_FOUND":                4,
		"SHARED_OBJECT_HEALTH_COMMON_REASON_TRANSFORM_CONFIG_DECODE_FAILED": 5,
		"SHARED_OBJECT_HEALTH_COMMON_REASON_BODY_CONFIG_DECODE_FAILED":      6,
	}
)

Enum value maps for SharedObjectHealthCommonReason.

View Source
var (
	SharedObjectHealthRemediationHint_name = map[int32]string{
		0: "SHARED_OBJECT_HEALTH_REMEDIATION_HINT_UNKNOWN",
		1: "SHARED_OBJECT_HEALTH_REMEDIATION_HINT_NONE",
		2: "SHARED_OBJECT_HEALTH_REMEDIATION_HINT_RETRY",
		3: "SHARED_OBJECT_HEALTH_REMEDIATION_HINT_REQUEST_ACCESS",
		4: "SHARED_OBJECT_HEALTH_REMEDIATION_HINT_CONTACT_OWNER",
		5: "SHARED_OBJECT_HEALTH_REMEDIATION_HINT_REPAIR_SOURCE_DATA",
	}
	SharedObjectHealthRemediationHint_value = map[string]int32{
		"SHARED_OBJECT_HEALTH_REMEDIATION_HINT_UNKNOWN":            0,
		"SHARED_OBJECT_HEALTH_REMEDIATION_HINT_NONE":               1,
		"SHARED_OBJECT_HEALTH_REMEDIATION_HINT_RETRY":              2,
		"SHARED_OBJECT_HEALTH_REMEDIATION_HINT_REQUEST_ACCESS":     3,
		"SHARED_OBJECT_HEALTH_REMEDIATION_HINT_CONTACT_OWNER":      4,
		"SHARED_OBJECT_HEALTH_REMEDIATION_HINT_REPAIR_SOURCE_DATA": 5,
	}
)

Enum value maps for SharedObjectHealthRemediationHint.

View Source
var (
	SOParticipantRole_name = map[int32]string{
		0: "SOParticipantRole_UNKNOWN",
		1: "SOParticipantRole_READER",
		2: "SOParticipantRole_WRITER",
		3: "SOParticipantRole_VALIDATOR",
		4: "SOParticipantRole_OWNER",
	}
	SOParticipantRole_value = map[string]int32{
		"SOParticipantRole_UNKNOWN":   0,
		"SOParticipantRole_READER":    1,
		"SOParticipantRole_WRITER":    2,
		"SOParticipantRole_VALIDATOR": 3,
		"SOParticipantRole_OWNER":     4,
	}
)

Enum value maps for SOParticipantRole.

View Source
var (
	SOConsensusMode_name = map[int32]string{
		0: "SO_CONSENSUS_MODE_SINGLE_VALIDATOR",
	}
	SOConsensusMode_value = map[string]int32{
		"SO_CONSENSUS_MODE_SINGLE_VALIDATOR": 0,
	}
)

Enum value maps for SOConsensusMode.

View Source
var (
	SOConfigChangeType_name = map[int32]string{
		0: "SO_CONFIG_CHANGE_TYPE_UNKNOWN",
		1: "SO_CONFIG_CHANGE_TYPE_GENESIS",
		2: "SO_CONFIG_CHANGE_TYPE_ADD_PARTICIPANT",
		3: "SO_CONFIG_CHANGE_TYPE_REMOVE_PARTICIPANT",
		4: "SO_CONFIG_CHANGE_TYPE_ADD_INVITE",
		5: "SO_CONFIG_CHANGE_TYPE_REVOKE_INVITE",
		6: "SO_CONFIG_CHANGE_TYPE_INCREMENT_INVITE_USES",
		7: "SO_CONFIG_CHANGE_TYPE_SELF_ENROLL_PEER",
	}
	SOConfigChangeType_value = map[string]int32{
		"SO_CONFIG_CHANGE_TYPE_UNKNOWN":               0,
		"SO_CONFIG_CHANGE_TYPE_GENESIS":               1,
		"SO_CONFIG_CHANGE_TYPE_ADD_PARTICIPANT":       2,
		"SO_CONFIG_CHANGE_TYPE_REMOVE_PARTICIPANT":    3,
		"SO_CONFIG_CHANGE_TYPE_ADD_INVITE":            4,
		"SO_CONFIG_CHANGE_TYPE_REVOKE_INVITE":         5,
		"SO_CONFIG_CHANGE_TYPE_INCREMENT_INVITE_USES": 6,
		"SO_CONFIG_CHANGE_TYPE_SELF_ENROLL_PEER":      7,
	}
)

Enum value maps for SOConfigChangeType.

View Source
var (
	SORevocationReason_name = map[int32]string{
		0: "SO_REVOCATION_REASON_UNKNOWN",
		1: "SO_REVOCATION_REASON_SESSION_REVOKED",
		2: "SO_REVOCATION_REASON_ORG_REMOVED",
		3: "SO_REVOCATION_REASON_OWNER_REMOVED",
		4: "SO_REVOCATION_REASON_INVITE_REVOKED",
	}
	SORevocationReason_value = map[string]int32{
		"SO_REVOCATION_REASON_UNKNOWN":         0,
		"SO_REVOCATION_REASON_SESSION_REVOKED": 1,
		"SO_REVOCATION_REASON_ORG_REMOVED":     2,
		"SO_REVOCATION_REASON_OWNER_REMOVED":   3,
		"SO_REVOCATION_REASON_INVITE_REVOKED":  4,
	}
)

Enum value maps for SORevocationReason.

View Source
var (
	SOJournalRecordKind_name = map[int32]string{
		0:  "SO_JOURNAL_RECORD_KIND_UNSPECIFIED",
		1:  "SO_JOURNAL_RECORD_KIND_INTENT",
		2:  "SO_JOURNAL_RECORD_KIND_SIGNED_ENVELOPE",
		3:  "SO_JOURNAL_RECORD_KIND_SENT",
		4:  "SO_JOURNAL_RECORD_KIND_RECEIPT",
		5:  "SO_JOURNAL_RECORD_KIND_ACKNOWLEDGEMENT",
		6:  "SO_JOURNAL_RECORD_KIND_BODY_PROJECTION",
		7:  "SO_JOURNAL_RECORD_KIND_STALE_TRANSFORM_EPOCH",
		8:  "SO_JOURNAL_RECORD_KIND_RECOVERY_BLOCKED",
		9:  "SO_JOURNAL_RECORD_KIND_LINEAGE_RECOVERY_BLOCKED",
		10: "SO_JOURNAL_RECORD_KIND_RECEIPT_LOOKUP",
		11: "SO_JOURNAL_RECORD_KIND_RESEND_AUTHORIZED",
	}
	SOJournalRecordKind_value = map[string]int32{
		"SO_JOURNAL_RECORD_KIND_UNSPECIFIED":              0,
		"SO_JOURNAL_RECORD_KIND_INTENT":                   1,
		"SO_JOURNAL_RECORD_KIND_SIGNED_ENVELOPE":          2,
		"SO_JOURNAL_RECORD_KIND_SENT":                     3,
		"SO_JOURNAL_RECORD_KIND_RECEIPT":                  4,
		"SO_JOURNAL_RECORD_KIND_ACKNOWLEDGEMENT":          5,
		"SO_JOURNAL_RECORD_KIND_BODY_PROJECTION":          6,
		"SO_JOURNAL_RECORD_KIND_STALE_TRANSFORM_EPOCH":    7,
		"SO_JOURNAL_RECORD_KIND_RECOVERY_BLOCKED":         8,
		"SO_JOURNAL_RECORD_KIND_LINEAGE_RECOVERY_BLOCKED": 9,
		"SO_JOURNAL_RECORD_KIND_RECEIPT_LOOKUP":           10,
		"SO_JOURNAL_RECORD_KIND_RESEND_AUTHORIZED":        11,
	}
)

Enum value maps for SOJournalRecordKind.

View Source
var (
	SOJournalAttemptState_name = map[int32]string{
		0: "SO_JOURNAL_ATTEMPT_STATE_UNSPECIFIED",
		1: "SO_JOURNAL_ATTEMPT_STATE_INTENT_DURABLE",
		2: "SO_JOURNAL_ATTEMPT_STATE_ENVELOPE_DURABLE",
		3: "SO_JOURNAL_ATTEMPT_STATE_SENT",
		4: "SO_JOURNAL_ATTEMPT_STATE_RECEIPT_DURABLE",
		5: "SO_JOURNAL_ATTEMPT_STATE_STALE_TRANSFORM_EPOCH",
		6: "SO_JOURNAL_ATTEMPT_STATE_RECOVERY_BLOCKED",
	}
	SOJournalAttemptState_value = map[string]int32{
		"SO_JOURNAL_ATTEMPT_STATE_UNSPECIFIED":           0,
		"SO_JOURNAL_ATTEMPT_STATE_INTENT_DURABLE":        1,
		"SO_JOURNAL_ATTEMPT_STATE_ENVELOPE_DURABLE":      2,
		"SO_JOURNAL_ATTEMPT_STATE_SENT":                  3,
		"SO_JOURNAL_ATTEMPT_STATE_RECEIPT_DURABLE":       4,
		"SO_JOURNAL_ATTEMPT_STATE_STALE_TRANSFORM_EPOCH": 5,
		"SO_JOURNAL_ATTEMPT_STATE_RECOVERY_BLOCKED":      6,
	}
)

Enum value maps for SOJournalAttemptState.

View Source
var (
	SOJournalOutcome_name = map[int32]string{
		0: "SO_JOURNAL_OUTCOME_UNSPECIFIED",
		1: "SO_JOURNAL_OUTCOME_ACCEPTED",
		2: "SO_JOURNAL_OUTCOME_REJECTED",
	}
	SOJournalOutcome_value = map[string]int32{
		"SO_JOURNAL_OUTCOME_UNSPECIFIED": 0,
		"SO_JOURNAL_OUTCOME_ACCEPTED":    1,
		"SO_JOURNAL_OUTCOME_REJECTED":    2,
	}
)

Enum value maps for SOJournalOutcome.

View Source
var (
	SOJournalReadiness_name = map[int32]string{
		0: "SO_JOURNAL_READINESS_UNSPECIFIED",
		1: "SO_JOURNAL_READINESS_READY",
		2: "SO_JOURNAL_READINESS_MISSING",
		3: "SO_JOURNAL_READINESS_CORRUPT",
		4: "SO_JOURNAL_READINESS_OBSOLETE",
	}
	SOJournalReadiness_value = map[string]int32{
		"SO_JOURNAL_READINESS_UNSPECIFIED": 0,
		"SO_JOURNAL_READINESS_READY":       1,
		"SO_JOURNAL_READINESS_MISSING":     2,
		"SO_JOURNAL_READINESS_CORRUPT":     3,
		"SO_JOURNAL_READINESS_OBSOLETE":    4,
	}
)

Enum value maps for SOJournalReadiness.

View Source
var (
	SOJournalRecoveryReason_name = map[int32]string{
		0: "SO_JOURNAL_RECOVERY_REASON_UNSPECIFIED",
		1: "SO_JOURNAL_RECOVERY_REASON_STALE_TRANSFORM_EPOCH",
		2: "SO_JOURNAL_RECOVERY_REASON_KEY_UNAVAILABLE",
		3: "SO_JOURNAL_RECOVERY_REASON_AUTHORITY_FAILURE",
		4: "SO_JOURNAL_RECOVERY_REASON_BODY_MISSING",
		5: "SO_JOURNAL_RECOVERY_REASON_BODY_CORRUPT",
		6: "SO_JOURNAL_RECOVERY_REASON_BODY_OBSOLETE",
	}
	SOJournalRecoveryReason_value = map[string]int32{
		"SO_JOURNAL_RECOVERY_REASON_UNSPECIFIED":           0,
		"SO_JOURNAL_RECOVERY_REASON_STALE_TRANSFORM_EPOCH": 1,
		"SO_JOURNAL_RECOVERY_REASON_KEY_UNAVAILABLE":       2,
		"SO_JOURNAL_RECOVERY_REASON_AUTHORITY_FAILURE":     3,
		"SO_JOURNAL_RECOVERY_REASON_BODY_MISSING":          4,
		"SO_JOURNAL_RECOVERY_REASON_BODY_CORRUPT":          5,
		"SO_JOURNAL_RECOVERY_REASON_BODY_OBSOLETE":         6,
	}
)

Enum value maps for SOJournalRecoveryReason.

View Source
var (
	SOReceiptState_name = map[int32]string{
		0: "SO_RECEIPT_STATE_UNSPECIFIED",
		1: "SO_RECEIPT_STATE_NO_RECORD",
		2: "SO_RECEIPT_STATE_PENDING",
		3: "SO_RECEIPT_STATE_ACCEPTED",
		4: "SO_RECEIPT_STATE_REJECTED",
	}
	SOReceiptState_value = map[string]int32{
		"SO_RECEIPT_STATE_UNSPECIFIED": 0,
		"SO_RECEIPT_STATE_NO_RECORD":   1,
		"SO_RECEIPT_STATE_PENDING":     2,
		"SO_RECEIPT_STATE_ACCEPTED":    3,
		"SO_RECEIPT_STATE_REJECTED":    4,
	}
)

Enum value maps for SOReceiptState.

Functions

func BuildSOClearOperationResultSignatureContext

func BuildSOClearOperationResultSignatureContext(sharedObjectID string, peerID string, localID string) string

BuildSOClearOperationResultSignatureContext builds the context string for a signature on a clear operation result.

func BuildSOGrantEncContext

func BuildSOGrantEncContext(sharedObjectID string, fromPeerID string, recipientPeerID string) string

BuildSOGrantEncContext builds the context string for a encrypt inner on a SOGrant.

func BuildSOGrantSignatureContext

func BuildSOGrantSignatureContext(sharedObjectID string, signerPeerID, recipientPeerID string) string

BuildSOGrantSignatureContext builds the context string for a signature on a SOGrant.

func BuildSOInviteMessage

func BuildSOInviteMessage(
	sharedObjectID string,
	ownerPrivKey crypto.PrivKey,
	role SOParticipantRole,
	providerID string,
	targetPeerID string,
	maxUses uint32,
	expiresAt *timestamppb.Timestamp,
) (*SOInviteMessage, *SOInvite, error)

BuildSOInviteMessage builds and signs the SOInviteMessage for out-of-band distribution along with the on-chain SOInvite metadata.

Generates a random 32-byte token and SHA256 hashes it for on-chain storage. The returned SOInvite is stored separately via a signed config chain entry.

func BuildSOOperationRejectionErrorDetailsContext

func BuildSOOperationRejectionErrorDetailsContext(sharedObjectID string, validatorPeerID, submitterPeerID string, opNonce uint64, localID string) string

BuildSOOperationRejectionErrorDetailsEncContext builds the context string for error details on a shared object operation rejection.

func BuildSOOperationRejectionSignatureContext

func BuildSOOperationRejectionSignatureContext(sharedObjectID string, validatorPeerID, submitterPeerID string, opNonce uint64, localID string) string

BuildSOOperationRejectionSignatureContext builds the context string for a validator signature on a shared object operation rejection.

func BuildSOOperationSignatureContext

func BuildSOOperationSignatureContext(sharedObjectID string, peerID string, nonce uint64, localID string) string

BuildSOOperationSignatureContext builds the context string for a participant signature on a shared object operation.

func BuildSOReceiptAcknowledgementSignatureContext added in v0.56.1

func BuildSOReceiptAcknowledgementSignatureContext(sharedObjectID, participantPeerID, localID string) string

BuildSOReceiptAcknowledgementSignatureContext builds the context for a participant signature on an exact-key receipt acknowledgement.

func BuildSOReceiptLookupSignatureContext added in v0.56.1

func BuildSOReceiptLookupSignatureContext(sharedObjectID, participantPeerID, localID string) string

BuildSOReceiptLookupSignatureContext builds the context for a participant signature on an exact-key receipt lookup.

func BuildSOTerminalReceiptSignatureContext added in v0.56.1

func BuildSOTerminalReceiptSignatureContext(sharedObjectID, participantPeerID, localID string, authoritativeRootSeqno uint64) string

BuildSOTerminalReceiptSignatureContext builds the context for a validator signature on a terminal receipt.

func BuildTargetedAccountSOInviteMessage added in v0.51.2

func BuildTargetedAccountSOInviteMessage(
	sharedObjectID string,
	ownerPrivKey crypto.PrivKey,
	role SOParticipantRole,
	providerID string,
	targetAccountID string,
	maxUses uint32,
	expiresAt *timestamppb.Timestamp,
) (*SOInviteMessage, *SOInvite, error)

BuildTargetedAccountSOInviteMessage builds an invite that requires a targeted provider-account proof before a cloud owner may accept the mailbox entry.

func BuildValidatorRootSignatureContext

func BuildValidatorRootSignatureContext(sharedObjectID string, seqno uint64) string

BuildValidatorRootSignatureContext builds the context string for a validator signature on shared object root.

func CanReadState

func CanReadState(role SOParticipantRole) bool

CanReadState checks if the given role has read access to the state.

func CanWriteOps

func CanWriteOps(role SOParticipantRole) bool

CanWriteOps checks if the given role has access to write ops.

func CheckConsensusAcceptance

func CheckConsensusAcceptance(mode SOConsensusMode, validSigs int) error

CheckConsensusAcceptance checks whether the given number of valid signatures satisfies the consensus mode. Returns an error if consensus is not met.

func CurrentEpochNumber

func CurrentEpochNumber(epochs []*SOKeyEpoch) uint64

CurrentEpochNumber returns the highest epoch number from the list, or 0 if empty.

func DigestSOAuthoritativeRoot added in v0.56.1

func DigestSOAuthoritativeRoot(root *SORoot) ([]byte, error)

DigestSOAuthoritativeRoot hashes the domain- and length-framed root signature preimage. BuildSignatureData excludes root validator signatures and includes the deterministic inner bytes followed by account nonces in their canonical order.

func DigestSOOperationEnvelope added in v0.56.1

func DigestSOOperationEnvelope(exactEnvelope []byte) []byte

DigestSOOperationEnvelope hashes the exact serialized signed SOOperation envelope. The caller must pass the original wire bytes without decoding or reserializing.

func DigestSOTerminalReceipt added in v0.56.1

func DigestSOTerminalReceipt(receipt *SOTerminalReceipt) ([]byte, error)

DigestSOTerminalReceipt hashes the deterministic serialized terminal receipt, including its validator signatures.

func DigestSOValidatorSet added in v0.56.1

func DigestSOValidatorSet(config *SharedObjectConfig) ([]byte, error)

DigestSOValidatorSet hashes a versioned, count- and length-framed validator set. Eligible participants have role VALIDATOR or OWNER; peer IDs are sorted lexicographically and each eligible ID must be unique and non-empty.

func HashSOConfigChange

func HashSOConfigChange(entry *SOConfigChange) ([]byte, error)

HashSOConfigChange computes the SHA-256 hash of a serialized SOConfigChange. The signature field is excluded from the hash by zeroing it before marshaling.

func IsOwner

func IsOwner(role SOParticipantRole) bool

IsOwner checks if the given role is the OWNER role.

func IsValidatorOrOwner

func IsValidatorOrOwner(role SOParticipantRole) bool

IsValidatorOrOwner checks if the given role is VALIDATOR or OWNER.

func MutationKeyDigest added in v0.56.1

func MutationKeyDigest(k *SOMutationKey) ([]byte, error)

MutationKeyDigest returns the stable digest used to identify an exact key in indexes. Only the four semantic identity fields participate; protobuf unknown fields do not.

func NewLocalStateStoreRefcount

func NewLocalStateStoreRefcount(
	storeID string,
	access AccessLocalStateStoreFunc,
) *refcount.RefCount[kvtx.Store]

NewLocalStateStoreRefcount constructs a refcount with the LocalStateStore access func.

ctx, target and targetErr can be empty

keepUnref sets if the value should be kept if there are zero references. resolver is the resolver function returns the value and a release function call the released callback if the value is no longer valid.

func NewSOOperationLocalID

func NewSOOperationLocalID() string

NewSOOperationLocalID constructs a new randomized local ID for a op.

func NewSOStateBlock

func NewSOStateBlock() block.Block

NewSOStateBlock constructs a new SOState block.

func NewSharedObjectHealthError added in v0.51.8

func NewSharedObjectHealthError(health *SharedObjectHealth, cause error) error

NewSharedObjectHealthError wraps an explicit SharedObjectHealth snapshot in an error.

func NewSharedObjectRefBlock

func NewSharedObjectRefBlock() block.Block

NewSharedObjectRefBlock constructs a new SharedObjectRef block.

func ParseSOOperationLocalID

func ParseSOOperationLocalID(id string) (ulid.ULID, error)

ParseSOOperationLocalID parses and validates the local id is the correct format.

func RedactStepConfig

func RedactStepConfig(step *block_transform.StepConfig) *block_transform.StepConfig

RedactStepConfig returns a copy of the StepConfig with sensitive fields (encryption keys) zeroed. The algorithm and other non-sensitive fields are preserved. Returns the original step unchanged for non-blockenc steps.

func RedactStepConfigs

func RedactStepConfigs(steps []*block_transform.StepConfig) []*block_transform.StepConfig

RedactStepConfigs returns redacted copies of all step configs.

func RemoveSOParticipant

func RemoveSOParticipant(
	ctx context.Context,
	host *SOHost,
	targetPeerIDStr string,
	signerPriv crypto.PrivKey,
	revInfo *SORevocationInfo,
) (bool, error)

RemoveSOParticipant removes a target peer's participant config and grant from a single shared object.

Returns true if the participant was found and removed, false if they were not a participant. Builds a signed SOConfigChange removing the participant and atomically removes the corresponding SOGrant from RootGrants. Does not rotate the transform key; control-plane revocation (P2P block DEX and cloud block exchange denial) handles access removal.

signerPriv must be the private key of an OWNER in the current config.

func RotateTransformKey

func RotateTransformKey(
	privKey crypto.PrivKey,
	sharedObjectID string,
	participants []*SOParticipantConfig,
	currentEpoch uint64,
	currentSeqno uint64,
) (*block_transform.Config, []*SOGrant, *SOKeyEpoch, error)

RotateTransformKey generates a new transform key and creates grants for the given participants. Returns the new transform config, the grants, and the new epoch number. The caller (an OWNER) provides their private key for signing grants and the list of remaining participants (after revocation).

func ValidateInviteUsable

func ValidateInviteUsable(inv *SOInvite) error

ValidateInviteUsable checks whether an invite is currently usable. Returns nil if the invite can accept another use.

func ValidateSOParticipantRole

func ValidateSOParticipantRole(role SOParticipantRole, allowUnknown bool) error

ValidateSOParticipantRole ensures the enum value is within the expected set. If allowUnknown is true, it will allow SOParticipantRole_UNKNOWN as a valid role.

func VerifyConfigChain

func VerifyConfigChain(entries []*SOConfigChange) error

VerifyConfigChain verifies a config change chain from genesis to current. Each entry must have: 1. Monotonically increasing config_seqno (starting from 0) 2. previous_hash matching the hash of the prior entry (genesis has zero previous_hash) 3. Valid authorization according to the change type

func WrapSharedObjectHealthError

func WrapSharedObjectHealthError(
	layer SharedObjectHealthLayer,
	err error,
) error

WrapSharedObjectHealthError wraps err with an attached SharedObjectHealth snapshot.

Types

type AccessLocalStateStoreFunc

type AccessLocalStateStoreFunc func(ctx context.Context, storeID string, released func()) (kvtx.Store, func(), error)

AccessLocalStateStoreFunc implements AccessLocalStateStore.

type FileJournalStorage added in v0.56.1

type FileJournalStorage struct {
	// contains filtered or unexported fields
}

FileJournalStorage stores journal frames in a mode-0600 file.

func OpenFileJournalStorage added in v0.56.1

func OpenFileJournalStorage(path string) (*FileJournalStorage, error)

OpenFileJournalStorage opens or creates a journal storage file.

func (*FileJournalStorage) Close added in v0.56.1

func (s *FileJournalStorage) Close() error

Close closes the journal file.

func (*FileJournalStorage) JournalGenerationFloor added in v0.56.1

func (s *FileJournalStorage) JournalGenerationFloor() (uint64, error)

func (*FileJournalStorage) JournalIdentity added in v0.56.1

func (s *FileJournalStorage) JournalIdentity() []byte

func (*FileJournalStorage) ReadAt added in v0.56.1

func (s *FileJournalStorage) ReadAt(p []byte, offset int64) (int, error)

ReadAt reads journal bytes at an absolute offset.

func (*FileJournalStorage) ReadJournalCheckpointGeneration added in v0.56.1

func (s *FileJournalStorage) ReadJournalCheckpointGeneration(generation uint64) ([]byte, error)

func (*FileJournalStorage) ReadJournalGeneration added in v0.56.1

func (s *FileJournalStorage) ReadJournalGeneration() ([]byte, error)

func (*FileJournalStorage) Size added in v0.56.1

func (s *FileJournalStorage) Size() (int64, error)

Size reports the current journal byte length.

func (*FileJournalStorage) Sync added in v0.56.1

func (s *FileJournalStorage) Sync() error

Sync flushes journal bytes and metadata.

func (*FileJournalStorage) Truncate added in v0.56.1

func (s *FileJournalStorage) Truncate(size int64) error

Truncate removes bytes after the validated journal prefix.

func (*FileJournalStorage) WriteAt added in v0.56.1

func (s *FileJournalStorage) WriteAt(p []byte, offset int64) (int, error)

WriteAt writes journal bytes at an absolute offset.

func (*FileJournalStorage) WriteJournalCheckpointGeneration added in v0.56.1

func (s *FileJournalStorage) WriteJournalCheckpointGeneration(generation uint64, data []byte) error

func (*FileJournalStorage) WriteJournalGeneration added in v0.56.1

func (s *FileJournalStorage) WriteJournalGeneration(data []byte) error

func (*FileJournalStorage) WriteJournalGenerationFloor added in v0.56.1

func (s *FileJournalStorage) WriteJournalGenerationFloor(generation uint64) error

WriteJournalGenerationFloor durably advances the rollback-prevention floor. It is intentionally separate from marker publication so marker is the recoverable publication event.

type InviteHost

type InviteHost interface {
	InviteMutator

	// GetSOHost returns the SOHost for invite operations.
	GetSOHost() *SOHost
	// GetPrivKey returns the private key for signing invite messages.
	GetPrivKey() crypto.PrivKey
	// GetProviderID returns the provider identifier for the invite message.
	GetProviderID() string
}

InviteHost is an optional interface on SharedObject implementations that support invite creation and management. Both local and spacewave providers implement this.

type InviteMutator

type InviteMutator interface {
	// CreateSOInviteOp creates a new invite and returns the signed invite message.
	CreateSOInviteOp(
		ctx context.Context,
		ownerPrivKey crypto.PrivKey,
		role SOParticipantRole,
		providerID string,
		targetPeerID string,
		maxUses uint32,
		expiresAt *timestamppb.Timestamp,
	) (*SOInviteMessage, error)
	// RevokeInvite revokes an invite by ID.
	RevokeInvite(ctx context.Context, signerPrivKey crypto.PrivKey, inviteID string) error
	// IncrementInviteUses increments the use counter for an invite by ID.
	IncrementInviteUses(ctx context.Context, signerPrivKey crypto.PrivKey, inviteID string) error
}

InviteMutator mutates shared-object invite state.

type JournalAttemptSnapshot added in v0.56.1

type JournalAttemptSnapshot struct {
	Key                    *SOMutationKey
	Lineage                *SOJournalLineage
	Version                *SOJournalVersionTuple
	State                  SOJournalAttemptState
	Readiness              SOJournalReadiness
	IntentSequence         uint64
	EnvelopeSequence       uint64
	Intent                 *SOJournalEncryptedPayload
	Envelope               *SOJournalEncryptedPayload
	EnvelopeDigest         []byte
	Receipt                *SOJournalReceipt
	Acknowledgement        *SOJournalAcknowledgement
	Projection             *SOJournalProjection
	Lookup                 *SOJournalLookup
	LookupHistory          []*SOJournalLookup
	SendAttempted          bool
	ResendAuthorized       bool
	LineageRecoveryBlocked bool
	CheckpointEligible     bool
}

JournalAttemptSnapshot is the reducer's durable evidence for one exact key.

type JournalCrypto added in v0.56.1

type JournalCrypto struct {
	// contains filtered or unexported fields
}

JournalCrypto encrypts staged journal material with domain-separated keys. Every staged payload is authenticated against the persisted journal identity.

func NewJournalCrypto added in v0.56.1

func NewJournalCrypto(scopeID []byte, authority JournalKeyAuthority) (*JournalCrypto, error)

NewJournalCrypto constructs an at-rest crypto owner for one journal scope. The scope identifier is fixed-width so derived keys cannot cross domains.

func (*JournalCrypto) OpenCheckpointGeneration added in v0.56.1

func (c *JournalCrypto) OpenCheckpointGeneration(data, identity []byte, generation, nextSequence uint64, snapshotLength int, snapshotDigest []byte) ([]byte, error)

OpenCheckpointGeneration authenticates a checkpoint against the published identity, generation, sequence, length, and digest tuple.

func (*JournalCrypto) OpenWithIdentity added in v0.56.1

func (c *JournalCrypto) OpenWithIdentity(kind SOJournalRecordKind, sequence uint64, key *SOMutationKey, identity []byte, encrypted *SOJournalEncryptedPayload) ([]byte, error)

OpenWithIdentity authenticates staged ciphertext against one persisted journal identity.

func (*JournalCrypto) SealCheckpointGeneration added in v0.56.1

func (c *JournalCrypto) SealCheckpointGeneration(identity []byte, generation, nextSequence uint64, plaintext []byte) ([]byte, error)

SealCheckpointGeneration encrypts a compact snapshot with generation-bound authenticated metadata. The active marker supplies the same tuple on reopen.

func (*JournalCrypto) SealWithIdentity added in v0.56.1

func (c *JournalCrypto) SealWithIdentity(kind SOJournalRecordKind, sequence uint64, key *SOMutationKey, identity, plaintext []byte) (*SOJournalEncryptedPayload, error)

SealWithIdentity encrypts canonical intent or immutable signed-envelope bytes and binds them to one persisted journal identity.

type JournalGenerationStore added in v0.56.1

type JournalGenerationStore interface {
	JournalIdentity() []byte
	ReadJournalGeneration() ([]byte, error)
	WriteJournalGeneration([]byte) error
	ReadJournalCheckpointGeneration(generation uint64) ([]byte, error)
	WriteJournalCheckpointGeneration(generation uint64, data []byte) error
	// WriteJournalGenerationFloor durably advances the monotonic publication
	// floor after the active marker has been atomically published.
	WriteJournalGenerationFloor(uint64) error
}

JournalGenerationStore owns the stable journal identity, compact snapshot generations, and the active-generation publication marker. The marker is external to the candidate snapshot so a crash before publication leaves the prior generation selected.

type JournalKeyAuthority added in v0.56.1

type JournalKeyAuthority interface {
	JournalMasterKey(scopeID []byte) ([]byte, error)
}

JournalKeyAuthority supplies the journal master key without transferring ownership. Implementations must derive the key from account or volume custody and never persist it in journal records.

type JournalKeyAuthorityFunc added in v0.56.1

type JournalKeyAuthorityFunc func(scopeID []byte) ([]byte, error)

JournalKeyAuthorityFunc adapts a function to JournalKeyAuthority.

func (JournalKeyAuthorityFunc) JournalMasterKey added in v0.56.1

func (f JournalKeyAuthorityFunc) JournalMasterKey(scopeID []byte) ([]byte, error)

JournalMasterKey implements JournalKeyAuthority.

type JournalLookupVerifier added in v0.56.1

type JournalLookupVerifier interface {
	VerifyJournalLookup(lookup *SOJournalLookup, version *SOJournalVersionTuple) error
}

JournalLookupVerifier authenticates every opaque receipt lookup response.

type JournalLookupVerifierFunc added in v0.56.1

type JournalLookupVerifierFunc func(*SOJournalLookup, *SOJournalVersionTuple) error

JournalLookupVerifierFunc adapts a lookup verification function.

func (JournalLookupVerifierFunc) VerifyJournalLookup added in v0.56.1

func (f JournalLookupVerifierFunc) VerifyJournalLookup(lookup *SOJournalLookup, version *SOJournalVersionTuple) error

VerifyJournalLookup implements JournalLookupVerifier.

type JournalPipeline added in v0.56.1

type JournalPipeline struct {
	// contains filtered or unexported fields
}

JournalPipeline couples durable framing with the deterministic reducer.

func OpenJournalPipeline added in v0.56.1

func OpenJournalPipeline(storage JournalStorage) (*JournalPipeline, error)

OpenJournalPipeline opens and replays a journal before admitting new transitions. A writable pipeline requires both at-rest crypto and receipt authority.

func OpenJournalPipelineWithCrypto added in v0.56.1

func OpenJournalPipelineWithCrypto(storage JournalStorage, crypto *JournalCrypto, verifier JournalReceiptVerifier, lookupVerifier JournalLookupVerifier) (*JournalPipeline, error)

OpenJournalPipelineWithCrypto authenticates retained encrypted stages, terminal receipts, and lookup responses before returning a writable pipeline.

func (*JournalPipeline) AppendAcknowledgement added in v0.56.1

func (p *JournalPipeline) AppendAcknowledgement(key *SOMutationKey, acknowledgement *SOJournalAcknowledgement) error

AppendAcknowledgement records an acknowledgement bound to the live receipt.

func (*JournalPipeline) AppendEnvelope added in v0.56.1

func (p *JournalPipeline) AppendEnvelope(intent *SOJournalIntent, envelope []byte) error

AppendEnvelope allocates the next writer-owned sequence while holding the pipeline lock, then durably records an encrypted immutable envelope.

func (*JournalPipeline) AppendIntent added in v0.56.1

func (p *JournalPipeline) AppendIntent(intent *SOJournalIntent, readiness SOJournalReadiness) error

AppendIntent allocates the next writer-owned sequence while holding the pipeline lock, then durably records an encrypted canonical intent.

func (*JournalPipeline) AppendLineageRecoveryBlocked added in v0.56.1

func (p *JournalPipeline) AppendLineageRecoveryBlocked(key *SOMutationKey, reason SOJournalRecoveryReason) error

AppendLineageRecoveryBlocked parks a stale attempt whose body successor is unavailable.

func (*JournalPipeline) AppendLookup added in v0.56.1

func (p *JournalPipeline) AppendLookup(key *SOMutationKey, lookup *SOJournalLookup) error

AppendLookup is the concise alias for AppendReceiptLookup.

func (*JournalPipeline) AppendProjection added in v0.56.1

func (p *JournalPipeline) AppendProjection(key *SOMutationKey, projection *SOJournalProjection) error

AppendProjection records the body projection bound to the live receipt root.

func (*JournalPipeline) AppendReceipt added in v0.56.1

func (p *JournalPipeline) AppendReceipt(key *SOMutationKey, receipt *SOJournalReceipt) error

AppendReceipt records verified terminal remote evidence for the live attempt.

func (*JournalPipeline) AppendReceiptLookup added in v0.56.1

func (p *JournalPipeline) AppendReceiptLookup(key *SOMutationKey, lookup *SOJournalLookup) error

AppendReceiptLookup records an exact-key remote lookup for the live attempt.

func (*JournalPipeline) AppendRecoveryBlocked added in v0.56.1

func (p *JournalPipeline) AppendRecoveryBlocked(key *SOMutationKey, reason SOJournalRecoveryReason) error

AppendRecoveryBlocked records a typed authority or body recovery stop.

func (*JournalPipeline) AppendResendAuthorization added in v0.56.1

func (p *JournalPipeline) AppendResendAuthorization(key *SOMutationKey) error

AppendResendAuthorization records an authoritative no-record lookup result.

func (*JournalPipeline) BeforeSend added in v0.56.1

func (p *JournalPipeline) BeforeSend(key *SOMutationKey, currentTransformEpoch uint64, send func() error) error

BeforeSend enforces Q3a's pre-send epoch check and records the send boundary. The callback runs after releasing the pipeline lock so transport code can safely re-enter observation APIs.

func (*JournalPipeline) Checkpoint added in v0.56.1

Checkpoint publishes the retained journal generation only after the exact receipt and body projection are both durable.

func (*JournalPipeline) NewSuccessor added in v0.56.1

func (p *JournalPipeline) NewSuccessor(key *SOMutationKey, successorKey *SOMutationKey, version *SOJournalVersionTuple, operation []byte) (*SOJournalIntent, error)

NewSuccessor constructs a fresh-key body-authorized successor lineage.

func (*JournalPipeline) Recover added in v0.56.1

Recover decrypts retained staged material for one exact attempt after reopen.

func (*JournalPipeline) Replay added in v0.56.1

func (p *JournalPipeline) Replay() []*SOJournalRecord

Replay returns the durable journal prefix.

func (*JournalPipeline) Snapshot added in v0.56.1

func (p *JournalPipeline) Snapshot() []*JournalAttemptSnapshot

Snapshot returns deterministic reducer state with receipt and projection separate.

type JournalReceiptVerifier added in v0.56.1

type JournalReceiptVerifier interface {
	VerifyJournalReceipt(receipt *SOJournalReceipt, version *SOJournalVersionTuple) error
}

JournalReceiptVerifier authenticates opaque terminal receipt bytes and their recorded config/consensus/signature-set identity before durable append.

type JournalReceiptVerifierFunc added in v0.56.1

type JournalReceiptVerifierFunc func(*SOJournalReceipt, *SOJournalVersionTuple) error

JournalReceiptVerifierFunc adapts a receipt verification function.

func (JournalReceiptVerifierFunc) VerifyJournalReceipt added in v0.56.1

func (f JournalReceiptVerifierFunc) VerifyJournalReceipt(receipt *SOJournalReceipt, version *SOJournalVersionTuple) error

VerifyJournalReceipt implements JournalReceiptVerifier.

type JournalRecoveryMaterial added in v0.56.1

type JournalRecoveryMaterial struct {
	Intent   *SOJournalIntent
	Envelope []byte
}

JournalRecoveryMaterial is the retained canonical intent and immutable envelope.

type JournalReducer added in v0.56.1

type JournalReducer struct {
	// contains filtered or unexported fields
}

JournalReducer owns live and replay state for body-neutral mutation attempts.

func NewJournalReducer added in v0.56.1

func NewJournalReducer() *JournalReducer

NewJournalReducer constructs an empty deterministic reducer.

func ReduceJournal added in v0.56.1

func ReduceJournal(records []*SOJournalRecord) (*JournalReducer, error)

ReduceJournal replays a validated record sequence into one deterministic reducer.

func (*JournalReducer) Apply added in v0.56.1

func (r *JournalReducer) Apply(record *SOJournalRecord) error

Apply applies one journal transition and commits it to reducer state.

func (*JournalReducer) Attempt added in v0.56.1

Attempt returns a copy of one exact participant-scoped attempt.

func (*JournalReducer) Checkpoint added in v0.56.1

func (r *JournalReducer) Checkpoint(key *SOMutationKey) (*JournalAttemptSnapshot, error)

Checkpoint returns retained evidence only after the exact receipt root is projected.

func (*JournalReducer) Clone added in v0.56.1

func (r *JournalReducer) Clone() *JournalReducer

Clone returns an independent reducer candidate for transactional append validation.

func (*JournalReducer) Snapshot added in v0.56.1

func (r *JournalReducer) Snapshot() []*JournalAttemptSnapshot

Snapshot returns all attempts sorted by their exact mutation-key digest.

type JournalStorage added in v0.56.1

type JournalStorage interface {
	io.ReaderAt
	io.WriterAt
	Truncate(size int64) error
	Sync() error
	Size() (int64, error)
}

JournalStorage is the bounded append/replay storage contract.

type MountSharedObject

type MountSharedObject interface {
	// Directive indicates MountSharedObject is a directive.
	directive.Directive

	// MountSharedObjectRef returns the shared object ref to mount.
	MountSharedObjectRef() *SharedObjectRef
}

MountSharedObject is a directive to mount a shared object with a provider account.

func NewMountSharedObject

func NewMountSharedObject(ref *SharedObjectRef) MountSharedObject

NewMountSharedObject constructs a new MountSharedObject directive.

type MountSharedObjectBody

type MountSharedObjectBody interface {
	// Directive indicates MountSharedObjectBody is a directive.
	directive.Directive

	// MountSharedObjectBodyRef returns the shared object ref to mount.
	MountSharedObjectBodyRef() *SharedObjectRef
	// MountSharedObjectBodyType returns the shared object body type.
	MountSharedObjectBodyType() string
	// MountSharedObjectBodySource returns an already-mounted source object, if one exists.
	MountSharedObjectBodySource() SharedObject
}

MountSharedObjectBody is a directive to mount the body of a shared object. This typically signals to start a controller which validates + processes the sobject ops.

func NewMountSharedObjectBody

func NewMountSharedObjectBody(ref *SharedObjectRef, bodyType string) MountSharedObjectBody

NewMountSharedObjectBody constructs a new MountSharedObjectBody directive.

func NewMountSharedObjectBodyWithSource added in v0.51.8

func NewMountSharedObjectBodyWithSource(ref *SharedObjectRef, bodyType string, source SharedObject) MountSharedObjectBody

NewMountSharedObjectBodyWithSource constructs a MountSharedObjectBody directive with an already-mounted source object available to body-specific resolvers.

type MountSharedObjectBodyValue

type MountSharedObjectBodyValue[T comparable] interface {
	// GetSharedObjectRef returns the shared object handle.
	GetSharedObjectRef() *SharedObjectRef
	// GetSharedObjectBodyType returns the shared object handle.
	GetSharedObjectBodyType() string
	// GetSharedObject returns the shared object handle.
	GetSharedObject() SharedObject
	// GetSharedObjectBody returns the shared object body handle.
	GetSharedObjectBody() T
}

MountSharedObjectBodyValue is the result type for MountSharedObjectBody.

This is the interface exposed by the shared object body handler on the "client side."

func ExMountSharedObjectBody

func ExMountSharedObjectBody[T comparable](
	ctx context.Context,
	b bus.Bus,
	ref *SharedObjectRef,
	bodyType string,
	returnIfIdle bool,
	valDisposeCb func(),
) (MountSharedObjectBodyValue[T], directive.Reference, error)

ExMountSharedObjectBody executes a directive to mount the body of a shared object.

If returnIfIdle is set, returns when the directive becomes idle.

func ExMountSharedObjectBodyWithSource added in v0.51.8

func ExMountSharedObjectBodyWithSource[T comparable](
	ctx context.Context,
	b bus.Bus,
	ref *SharedObjectRef,
	bodyType string,
	source SharedObject,
	returnIfIdle bool,
	valDisposeCb func(),
) (MountSharedObjectBodyValue[T], directive.Reference, error)

ExMountSharedObjectBodyWithSource executes a mount directive with an already-mounted source object available to body-specific resolvers.

func NewMountSharedObjectBodyValue

func NewMountSharedObjectBodyValue[T comparable](
	ref *SharedObjectRef,
	bodyType string,
	obj SharedObject,
	body T,
) MountSharedObjectBodyValue[T]

NewMountSharedObjectBodyValue constructs a new MountSharedObjectBodyValue.

type MountSharedObjectValue

type MountSharedObjectValue = SharedObject

MountSharedObjectValue is the result type for MountSharedObject.

type ProcessOpsFunc

type ProcessOpsFunc = func(
	ctx context.Context,
	snap SharedObjectStateSnapshot,
	currentStateData []byte,
	ops []*SOOperationInner,
) (rawNextStateData *[]byte, opResults []*SOOperationResult, err error)

ProcessOpsFunc is a function which processes operations against a state. cb is called with the state snapshot and the decoded inner state. If rawNextStateData is nil, no changes will be applied to the state (no-op).

type QueuedSOOperation

type QueuedSOOperation struct {

	// LocalId is the local operation id, must be a valid ulid.
	LocalId string `protobuf:"bytes,1,opt,name=local_id,json=localId,proto3" json:"localId,omitempty"`
	// OpData is the operation data, not transformed.
	OpData []byte `protobuf:"bytes,2,opt,name=op_data,json=opData,proto3" json:"opData,omitempty"`
	// contains filtered or unexported fields
}

QueuedSOOperation is a queued SOOperation which does not yet have an nonce.

func (*QueuedSOOperation) CloneMessageVT

func (m *QueuedSOOperation) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*QueuedSOOperation) CloneVT

func (m *QueuedSOOperation) CloneVT() *QueuedSOOperation

func (*QueuedSOOperation) EqualMessageVT

func (this *QueuedSOOperation) EqualMessageVT(thatMsg any) bool

func (*QueuedSOOperation) EqualVT

func (this *QueuedSOOperation) EqualVT(that *QueuedSOOperation) bool

func (*QueuedSOOperation) GetLocalId

func (x *QueuedSOOperation) GetLocalId() string

func (*QueuedSOOperation) GetOpData

func (x *QueuedSOOperation) GetOpData() []byte

func (*QueuedSOOperation) MarshalJSON

func (x *QueuedSOOperation) MarshalJSON() ([]byte, error)

MarshalJSON marshals the QueuedSOOperation to JSON.

func (*QueuedSOOperation) MarshalProtoJSON

func (x *QueuedSOOperation) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the QueuedSOOperation message to JSON.

func (*QueuedSOOperation) MarshalProtoText

func (x *QueuedSOOperation) MarshalProtoText() string

func (*QueuedSOOperation) MarshalToSizedBufferVT

func (m *QueuedSOOperation) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*QueuedSOOperation) MarshalToVT

func (m *QueuedSOOperation) MarshalToVT(dAtA []byte) (int, error)

func (*QueuedSOOperation) MarshalVT

func (m *QueuedSOOperation) MarshalVT() (dAtA []byte, err error)

func (*QueuedSOOperation) ProtoMessage

func (*QueuedSOOperation) ProtoMessage()

func (*QueuedSOOperation) Reset

func (x *QueuedSOOperation) Reset()

func (*QueuedSOOperation) SizeVT

func (m *QueuedSOOperation) SizeVT() (n int)

func (*QueuedSOOperation) String

func (x *QueuedSOOperation) String() string

func (*QueuedSOOperation) UnmarshalJSON

func (x *QueuedSOOperation) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the QueuedSOOperation from JSON.

func (*QueuedSOOperation) UnmarshalProtoJSON

func (x *QueuedSOOperation) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the QueuedSOOperation message from JSON.

func (*QueuedSOOperation) UnmarshalVT

func (m *QueuedSOOperation) UnmarshalVT(dAtA []byte) error

func (*QueuedSOOperation) Validate

func (q *QueuedSOOperation) Validate() error

Validate performs cursory checks on the QueuedSOOperation.

type SOAccountNonce

type SOAccountNonce struct {

	// PeerId is the identifier of the account.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// Nonce is the current nonce for the account.
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

SOAccountNonce contains the current nonce for an account. The accounts are sorted lexicographically by peer_id.

func (*SOAccountNonce) CloneMessageVT

func (m *SOAccountNonce) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOAccountNonce) CloneVT

func (m *SOAccountNonce) CloneVT() *SOAccountNonce

func (*SOAccountNonce) EqualMessageVT

func (this *SOAccountNonce) EqualMessageVT(thatMsg any) bool

func (*SOAccountNonce) EqualVT

func (this *SOAccountNonce) EqualVT(that *SOAccountNonce) bool

func (*SOAccountNonce) GetNonce

func (x *SOAccountNonce) GetNonce() uint64

func (*SOAccountNonce) GetPeerId

func (x *SOAccountNonce) GetPeerId() string

func (*SOAccountNonce) MarshalJSON

func (x *SOAccountNonce) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOAccountNonce to JSON.

func (*SOAccountNonce) MarshalProtoJSON

func (x *SOAccountNonce) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOAccountNonce message to JSON.

func (*SOAccountNonce) MarshalProtoText

func (x *SOAccountNonce) MarshalProtoText() string

func (*SOAccountNonce) MarshalToSizedBufferVT

func (m *SOAccountNonce) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOAccountNonce) MarshalToVT

func (m *SOAccountNonce) MarshalToVT(dAtA []byte) (int, error)

func (*SOAccountNonce) MarshalVT

func (m *SOAccountNonce) MarshalVT() (dAtA []byte, err error)

func (*SOAccountNonce) ParsePeerID

func (n *SOAccountNonce) ParsePeerID() (peer.ID, error)

ParsePeerID parses the peer ID.

func (*SOAccountNonce) ProtoMessage

func (*SOAccountNonce) ProtoMessage()

func (*SOAccountNonce) Reset

func (x *SOAccountNonce) Reset()

func (*SOAccountNonce) SizeVT

func (m *SOAccountNonce) SizeVT() (n int)

func (*SOAccountNonce) String

func (x *SOAccountNonce) String() string

func (*SOAccountNonce) UnmarshalJSON

func (x *SOAccountNonce) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOAccountNonce from JSON.

func (*SOAccountNonce) UnmarshalProtoJSON

func (x *SOAccountNonce) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOAccountNonce message from JSON.

func (*SOAccountNonce) UnmarshalVT

func (m *SOAccountNonce) UnmarshalVT(dAtA []byte) error

type SOClearOperationResult

type SOClearOperationResult struct {

	// Inner is the encoded SOClearOperationResultInner object.
	Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"`
	// Signature is the signature of inner by the operation submitter.
	// The pub key must match the peer id that submitted the original operation.
	Signature *peer.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SOClearOperationResult represents a request to clear a rejected operation result.

func BuildSOClearOperationResult

func BuildSOClearOperationResult(
	sharedObjectID string,
	privKey crypto.PrivKey,
	localID string,
) (*SOClearOperationResult, error)

BuildSOClearOperationResult constructs a new SOClearOperationResult. The privKey must belong to the peer that submitted the original operation.

func (*SOClearOperationResult) CloneMessageVT

func (*SOClearOperationResult) CloneVT

func (*SOClearOperationResult) EqualMessageVT

func (this *SOClearOperationResult) EqualMessageVT(thatMsg any) bool

func (*SOClearOperationResult) EqualVT

func (this *SOClearOperationResult) EqualVT(that *SOClearOperationResult) bool

func (*SOClearOperationResult) GetInner

func (x *SOClearOperationResult) GetInner() []byte

func (*SOClearOperationResult) GetSignature

func (x *SOClearOperationResult) GetSignature() *peer.Signature

func (*SOClearOperationResult) MarshalJSON

func (x *SOClearOperationResult) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOClearOperationResult to JSON.

func (*SOClearOperationResult) MarshalProtoJSON

func (x *SOClearOperationResult) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOClearOperationResult message to JSON.

func (*SOClearOperationResult) MarshalProtoText

func (x *SOClearOperationResult) MarshalProtoText() string

func (*SOClearOperationResult) MarshalToSizedBufferVT

func (m *SOClearOperationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOClearOperationResult) MarshalToVT

func (m *SOClearOperationResult) MarshalToVT(dAtA []byte) (int, error)

func (*SOClearOperationResult) MarshalVT

func (m *SOClearOperationResult) MarshalVT() (dAtA []byte, err error)

func (*SOClearOperationResult) ProtoMessage

func (*SOClearOperationResult) ProtoMessage()

func (*SOClearOperationResult) Reset

func (x *SOClearOperationResult) Reset()

func (*SOClearOperationResult) SizeVT

func (m *SOClearOperationResult) SizeVT() (n int)

func (*SOClearOperationResult) String

func (x *SOClearOperationResult) String() string

func (*SOClearOperationResult) UnmarshalInner

UnmarshalInner unmarshals and verifies the SOClearOperationResultInner.

func (*SOClearOperationResult) UnmarshalJSON

func (x *SOClearOperationResult) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOClearOperationResult from JSON.

func (*SOClearOperationResult) UnmarshalProtoJSON

func (x *SOClearOperationResult) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOClearOperationResult message from JSON.

func (*SOClearOperationResult) UnmarshalVT

func (m *SOClearOperationResult) UnmarshalVT(dAtA []byte) error

func (*SOClearOperationResult) Validate

func (c *SOClearOperationResult) Validate() error

Validate performs cursory checks on the SOClearOperationResult.

type SOClearOperationResultInner

type SOClearOperationResultInner struct {

	// PeerId is the identifier of the participant that submitted the operation.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// LocalId is the locally-assigned ulid for the operation.
	// Must be a valid ulid.
	// Must be lower-case.
	LocalId string `protobuf:"bytes,2,opt,name=local_id,json=localId,proto3" json:"localId,omitempty"`
	// contains filtered or unexported fields
}

SOClearOperationResultInner is the inner message of SOClearOperationResult.

func (*SOClearOperationResultInner) CloneMessageVT

func (*SOClearOperationResultInner) CloneVT

func (*SOClearOperationResultInner) EqualMessageVT

func (this *SOClearOperationResultInner) EqualMessageVT(thatMsg any) bool

func (*SOClearOperationResultInner) EqualVT

func (*SOClearOperationResultInner) GetLocalId

func (x *SOClearOperationResultInner) GetLocalId() string

func (*SOClearOperationResultInner) GetPeerId

func (x *SOClearOperationResultInner) GetPeerId() string

func (*SOClearOperationResultInner) MarshalJSON

func (x *SOClearOperationResultInner) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOClearOperationResultInner to JSON.

func (*SOClearOperationResultInner) MarshalProtoJSON

func (x *SOClearOperationResultInner) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOClearOperationResultInner message to JSON.

func (*SOClearOperationResultInner) MarshalProtoText

func (x *SOClearOperationResultInner) MarshalProtoText() string

func (*SOClearOperationResultInner) MarshalToSizedBufferVT

func (m *SOClearOperationResultInner) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOClearOperationResultInner) MarshalToVT

func (m *SOClearOperationResultInner) MarshalToVT(dAtA []byte) (int, error)

func (*SOClearOperationResultInner) MarshalVT

func (m *SOClearOperationResultInner) MarshalVT() (dAtA []byte, err error)

func (*SOClearOperationResultInner) ParsePeerID

func (i *SOClearOperationResultInner) ParsePeerID() (peer.ID, error)

ParsePeerID parses the peer ID.

func (*SOClearOperationResultInner) ProtoMessage

func (*SOClearOperationResultInner) ProtoMessage()

func (*SOClearOperationResultInner) Reset

func (x *SOClearOperationResultInner) Reset()

func (*SOClearOperationResultInner) SizeVT

func (m *SOClearOperationResultInner) SizeVT() (n int)

func (*SOClearOperationResultInner) String

func (x *SOClearOperationResultInner) String() string

func (*SOClearOperationResultInner) UnmarshalJSON

func (x *SOClearOperationResultInner) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOClearOperationResultInner from JSON.

func (*SOClearOperationResultInner) UnmarshalProtoJSON

func (x *SOClearOperationResultInner) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOClearOperationResultInner message from JSON.

func (*SOClearOperationResultInner) UnmarshalVT

func (m *SOClearOperationResultInner) UnmarshalVT(dAtA []byte) error

func (*SOClearOperationResultInner) Validate

func (i *SOClearOperationResultInner) Validate() error

Validate performs cursory checks on the SOClearOperationResultInner.

type SOConfigChainResponse

type SOConfigChainResponse struct {

	// ConfigChanges is the full config change chain from genesis.
	ConfigChanges []*SOConfigChange `protobuf:"bytes,1,rep,name=config_changes,json=configChanges,proto3" json:"configChanges,omitempty"`
	// KeyEpochs are the key epochs with grants for each period.
	KeyEpochs []*SOKeyEpoch `protobuf:"bytes,2,rep,name=key_epochs,json=keyEpochs,proto3" json:"keyEpochs,omitempty"`
	// contains filtered or unexported fields
}

SOConfigChainResponse is returned by GET /sobject/{id}/config-chain.

func (*SOConfigChainResponse) CloneMessageVT

func (*SOConfigChainResponse) CloneVT

func (*SOConfigChainResponse) EqualMessageVT

func (this *SOConfigChainResponse) EqualMessageVT(thatMsg any) bool

func (*SOConfigChainResponse) EqualVT

func (this *SOConfigChainResponse) EqualVT(that *SOConfigChainResponse) bool

func (*SOConfigChainResponse) GetConfigChanges

func (x *SOConfigChainResponse) GetConfigChanges() []*SOConfigChange

func (*SOConfigChainResponse) GetKeyEpochs

func (x *SOConfigChainResponse) GetKeyEpochs() []*SOKeyEpoch

func (*SOConfigChainResponse) MarshalJSON

func (x *SOConfigChainResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOConfigChainResponse to JSON.

func (*SOConfigChainResponse) MarshalProtoJSON

func (x *SOConfigChainResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOConfigChainResponse message to JSON.

func (*SOConfigChainResponse) MarshalProtoText

func (x *SOConfigChainResponse) MarshalProtoText() string

func (*SOConfigChainResponse) MarshalToSizedBufferVT

func (m *SOConfigChainResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOConfigChainResponse) MarshalToVT

func (m *SOConfigChainResponse) MarshalToVT(dAtA []byte) (int, error)

func (*SOConfigChainResponse) MarshalVT

func (m *SOConfigChainResponse) MarshalVT() (dAtA []byte, err error)

func (*SOConfigChainResponse) ProtoMessage

func (*SOConfigChainResponse) ProtoMessage()

func (*SOConfigChainResponse) Reset

func (x *SOConfigChainResponse) Reset()

func (*SOConfigChainResponse) SizeVT

func (m *SOConfigChainResponse) SizeVT() (n int)

func (*SOConfigChainResponse) String

func (x *SOConfigChainResponse) String() string

func (*SOConfigChainResponse) UnmarshalJSON

func (x *SOConfigChainResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOConfigChainResponse from JSON.

func (*SOConfigChainResponse) UnmarshalProtoJSON

func (x *SOConfigChainResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOConfigChainResponse message from JSON.

func (*SOConfigChainResponse) UnmarshalVT

func (m *SOConfigChainResponse) UnmarshalVT(dAtA []byte) error

type SOConfigChange

type SOConfigChange struct {

	// ConfigSeqno is the sequence number of this config change.
	ConfigSeqno uint64 `protobuf:"varint,1,opt,name=config_seqno,json=configSeqno,proto3" json:"configSeqno,omitempty"`
	// Config is the new config after this change.
	Config *SharedObjectConfig `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
	// SignedBy is the peer_id of the OWNER who signed this change.
	SignedBy []byte `protobuf:"bytes,4,opt,name=signed_by,json=signedBy,proto3" json:"signedBy,omitempty"`
	// Signature is the signature over the serialized SOConfigChange (without this field).
	Signature *peer.Signature `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"`
	// PreviousHash is the hash of the previous SOConfigChange entry in the chain.
	PreviousHash []byte `protobuf:"bytes,6,opt,name=previous_hash,json=previousHash,proto3" json:"previousHash,omitempty"`
	// ChangeType describes the kind of mutation in this config chain entry.
	ChangeType SOConfigChangeType `protobuf:"varint,7,opt,name=change_type,json=changeType,proto3" json:"changeType,omitempty"`
	// RevocationInfo contains metadata about why a participant was removed.
	// Only populated when change_type is REMOVE_PARTICIPANT.
	RevocationInfo *SORevocationInfo `protobuf:"bytes,8,opt,name=revocation_info,json=revocationInfo,proto3" json:"revocationInfo,omitempty"`
	// contains filtered or unexported fields
}

SOConfigChange represents a signed config change in the config chain.

func BuildSOConfigChange

func BuildSOConfigChange(
	currentConfig *SharedObjectConfig,
	nextConfig *SharedObjectConfig,
	changeType SOConfigChangeType,
	signerPrivKey crypto.PrivKey,
	revInfo *SORevocationInfo,
) (*SOConfigChange, error)

BuildSOConfigChange constructs and signs a SOConfigChange entry.

currentConfig is the config before the change (used for previous_hash and seqno). nextConfig is the desired config after the change. changeType describes the kind of mutation in this entry. signerPrivKey is the private key of an OWNER in the current config, or the self-enrolling peer for SELF_ENROLL_PEER changes. revInfo is optional revocation metadata (only for REMOVE_PARTICIPANT changes).

func BuildSelfEnrollPeerConfigChange

func BuildSelfEnrollPeerConfigChange(
	currentCfg *SharedObjectConfig,
	signerPriv bifrost_crypto.PrivKey,
	signerPeerID string,
	entityID string,
	role SOParticipantRole,
) (*SOConfigChange, error)

BuildSelfEnrollPeerConfigChange builds a SELF_ENROLL_PEER config change for a missing same-entity session peer.

func (*SOConfigChange) CloneMessageVT

func (m *SOConfigChange) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOConfigChange) CloneVT

func (m *SOConfigChange) CloneVT() *SOConfigChange

func (*SOConfigChange) EqualMessageVT

func (this *SOConfigChange) EqualMessageVT(thatMsg any) bool

func (*SOConfigChange) EqualVT

func (this *SOConfigChange) EqualVT(that *SOConfigChange) bool

func (*SOConfigChange) GetChangeType

func (x *SOConfigChange) GetChangeType() SOConfigChangeType

func (*SOConfigChange) GetConfig

func (x *SOConfigChange) GetConfig() *SharedObjectConfig

func (*SOConfigChange) GetConfigSeqno

func (x *SOConfigChange) GetConfigSeqno() uint64

func (*SOConfigChange) GetPreviousHash

func (x *SOConfigChange) GetPreviousHash() []byte

func (*SOConfigChange) GetRevocationInfo

func (x *SOConfigChange) GetRevocationInfo() *SORevocationInfo

func (*SOConfigChange) GetSignature

func (x *SOConfigChange) GetSignature() *peer.Signature

func (*SOConfigChange) GetSignedBy

func (x *SOConfigChange) GetSignedBy() []byte

func (*SOConfigChange) MarshalJSON

func (x *SOConfigChange) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOConfigChange to JSON.

func (*SOConfigChange) MarshalProtoJSON

func (x *SOConfigChange) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOConfigChange message to JSON.

func (*SOConfigChange) MarshalProtoText

func (x *SOConfigChange) MarshalProtoText() string

func (*SOConfigChange) MarshalToSizedBufferVT

func (m *SOConfigChange) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOConfigChange) MarshalToVT

func (m *SOConfigChange) MarshalToVT(dAtA []byte) (int, error)

func (*SOConfigChange) MarshalVT

func (m *SOConfigChange) MarshalVT() (dAtA []byte, err error)

func (*SOConfigChange) ProtoMessage

func (*SOConfigChange) ProtoMessage()

func (*SOConfigChange) Reset

func (x *SOConfigChange) Reset()

func (*SOConfigChange) SizeVT

func (m *SOConfigChange) SizeVT() (n int)

func (*SOConfigChange) String

func (x *SOConfigChange) String() string

func (*SOConfigChange) UnmarshalJSON

func (x *SOConfigChange) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOConfigChange from JSON.

func (*SOConfigChange) UnmarshalProtoJSON

func (x *SOConfigChange) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOConfigChange message from JSON.

func (*SOConfigChange) UnmarshalVT

func (m *SOConfigChange) UnmarshalVT(dAtA []byte) error

type SOConfigChangeType

type SOConfigChangeType int32

SOConfigChangeType describes the kind of mutation in a config chain entry.

const (
	// SO_CONFIG_CHANGE_TYPE_UNKNOWN is the zero value.
	SOConfigChangeType_SO_CONFIG_CHANGE_TYPE_UNKNOWN SOConfigChangeType = 0
	// SO_CONFIG_CHANGE_TYPE_GENESIS is the initial config chain entry.
	SOConfigChangeType_SO_CONFIG_CHANGE_TYPE_GENESIS SOConfigChangeType = 1
	// SO_CONFIG_CHANGE_TYPE_ADD_PARTICIPANT adds a participant to the config.
	SOConfigChangeType_SO_CONFIG_CHANGE_TYPE_ADD_PARTICIPANT SOConfigChangeType = 2
	// SO_CONFIG_CHANGE_TYPE_REMOVE_PARTICIPANT removes a participant from the config.
	SOConfigChangeType_SO_CONFIG_CHANGE_TYPE_REMOVE_PARTICIPANT SOConfigChangeType = 3
	// SO_CONFIG_CHANGE_TYPE_ADD_INVITE creates a new invite.
	SOConfigChangeType_SO_CONFIG_CHANGE_TYPE_ADD_INVITE SOConfigChangeType = 4
	// SO_CONFIG_CHANGE_TYPE_REVOKE_INVITE revokes an existing invite.
	SOConfigChangeType_SO_CONFIG_CHANGE_TYPE_REVOKE_INVITE SOConfigChangeType = 5
	// SO_CONFIG_CHANGE_TYPE_INCREMENT_INVITE_USES records an invite usage.
	SOConfigChangeType_SO_CONFIG_CHANGE_TYPE_INCREMENT_INVITE_USES SOConfigChangeType = 6
	// SO_CONFIG_CHANGE_TYPE_SELF_ENROLL_PEER lets a same-entity session add itself.
	SOConfigChangeType_SO_CONFIG_CHANGE_TYPE_SELF_ENROLL_PEER SOConfigChangeType = 7
)

func (SOConfigChangeType) Enum

func (SOConfigChangeType) MarshalJSON

func (x SOConfigChangeType) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOConfigChangeType to JSON.

func (SOConfigChangeType) MarshalProtoJSON

func (x SOConfigChangeType) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOConfigChangeType to JSON.

func (SOConfigChangeType) MarshalProtoText

func (x SOConfigChangeType) MarshalProtoText() string

func (SOConfigChangeType) MarshalText

func (x SOConfigChangeType) MarshalText() ([]byte, error)

MarshalText marshals the SOConfigChangeType to text.

func (SOConfigChangeType) String

func (x SOConfigChangeType) String() string

func (*SOConfigChangeType) UnmarshalJSON

func (x *SOConfigChangeType) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOConfigChangeType from JSON.

func (*SOConfigChangeType) UnmarshalProtoJSON

func (x *SOConfigChangeType) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOConfigChangeType from JSON.

func (*SOConfigChangeType) UnmarshalText

func (x *SOConfigChangeType) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOConfigChangeType from text.

type SOConsensusMode

type SOConsensusMode int32

SOConsensusMode defines the consensus mechanism for validating root state updates.

const (
	// SO_CONSENSUS_MODE_SINGLE_VALIDATOR requires at least one valid validator signature.
	// This is the default mode and matches the existing behavior.
	SOConsensusMode_SO_CONSENSUS_MODE_SINGLE_VALIDATOR SOConsensusMode = 0
)

func (SOConsensusMode) Enum

func (x SOConsensusMode) Enum() *SOConsensusMode

func (SOConsensusMode) MarshalJSON

func (x SOConsensusMode) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOConsensusMode to JSON.

func (SOConsensusMode) MarshalProtoJSON

func (x SOConsensusMode) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOConsensusMode to JSON.

func (SOConsensusMode) MarshalProtoText

func (x SOConsensusMode) MarshalProtoText() string

func (SOConsensusMode) MarshalText

func (x SOConsensusMode) MarshalText() ([]byte, error)

MarshalText marshals the SOConsensusMode to text.

func (SOConsensusMode) String

func (x SOConsensusMode) String() string

func (*SOConsensusMode) UnmarshalJSON

func (x *SOConsensusMode) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOConsensusMode from JSON.

func (*SOConsensusMode) UnmarshalProtoJSON

func (x *SOConsensusMode) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOConsensusMode from JSON.

func (*SOConsensusMode) UnmarshalText

func (x *SOConsensusMode) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOConsensusMode from text.

type SOEntityRecoveryEnvelope

type SOEntityRecoveryEnvelope struct {

	// EntityId is the stable entity identifier the envelope is for.
	EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entityId,omitempty"`
	// KeyEpoch is the current readable key epoch for this envelope.
	KeyEpoch uint64 `protobuf:"varint,2,opt,name=key_epoch,json=keyEpoch,proto3" json:"keyEpoch,omitempty"`
	// ConfigChainSeqno is the config-chain seqno the envelope matches.
	ConfigChainSeqno uint64 `protobuf:"varint,3,opt,name=config_chain_seqno,json=configChainSeqno,proto3" json:"configChainSeqno,omitempty"`
	// ConfigChainHash is the config-chain hash the envelope matches.
	ConfigChainHash []byte `protobuf:"bytes,4,opt,name=config_chain_hash,json=configChainHash,proto3" json:"configChainHash,omitempty"`
	// EnvelopeData is a bifrost/envelope payload encrypted to entity keypairs.
	EnvelopeData []byte `protobuf:"bytes,5,opt,name=envelope_data,json=envelopeData,proto3" json:"envelopeData,omitempty"`
	// contains filtered or unexported fields
}

SOEntityRecoveryEnvelope stores recovery material for one entity on an SO.

func BuildSOEntityRecoveryEnvelope

func BuildSOEntityRecoveryEnvelope(
	entityID string,
	keyEpoch uint64,
	cfg *SharedObjectConfig,
	material *SOEntityRecoveryMaterial,
	recipientPubs []bifrost_crypto.PubKey,
) (*SOEntityRecoveryEnvelope, error)

BuildSOEntityRecoveryEnvelope builds an entity recovery envelope for the current SO grant material.

func (*SOEntityRecoveryEnvelope) CloneMessageVT

func (*SOEntityRecoveryEnvelope) CloneVT

func (*SOEntityRecoveryEnvelope) EqualMessageVT

func (this *SOEntityRecoveryEnvelope) EqualMessageVT(thatMsg any) bool

func (*SOEntityRecoveryEnvelope) EqualVT

func (*SOEntityRecoveryEnvelope) GetConfigChainHash

func (x *SOEntityRecoveryEnvelope) GetConfigChainHash() []byte

func (*SOEntityRecoveryEnvelope) GetConfigChainSeqno

func (x *SOEntityRecoveryEnvelope) GetConfigChainSeqno() uint64

func (*SOEntityRecoveryEnvelope) GetEntityId

func (x *SOEntityRecoveryEnvelope) GetEntityId() string

func (*SOEntityRecoveryEnvelope) GetEnvelopeData

func (x *SOEntityRecoveryEnvelope) GetEnvelopeData() []byte

func (*SOEntityRecoveryEnvelope) GetKeyEpoch

func (x *SOEntityRecoveryEnvelope) GetKeyEpoch() uint64

func (*SOEntityRecoveryEnvelope) MarshalJSON

func (x *SOEntityRecoveryEnvelope) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOEntityRecoveryEnvelope to JSON.

func (*SOEntityRecoveryEnvelope) MarshalProtoJSON

func (x *SOEntityRecoveryEnvelope) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOEntityRecoveryEnvelope message to JSON.

func (*SOEntityRecoveryEnvelope) MarshalProtoText

func (x *SOEntityRecoveryEnvelope) MarshalProtoText() string

func (*SOEntityRecoveryEnvelope) MarshalToSizedBufferVT

func (m *SOEntityRecoveryEnvelope) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOEntityRecoveryEnvelope) MarshalToVT

func (m *SOEntityRecoveryEnvelope) MarshalToVT(dAtA []byte) (int, error)

func (*SOEntityRecoveryEnvelope) MarshalVT

func (m *SOEntityRecoveryEnvelope) MarshalVT() (dAtA []byte, err error)

func (*SOEntityRecoveryEnvelope) ProtoMessage

func (*SOEntityRecoveryEnvelope) ProtoMessage()

func (*SOEntityRecoveryEnvelope) Reset

func (x *SOEntityRecoveryEnvelope) Reset()

func (*SOEntityRecoveryEnvelope) SizeVT

func (m *SOEntityRecoveryEnvelope) SizeVT() (n int)

func (*SOEntityRecoveryEnvelope) String

func (x *SOEntityRecoveryEnvelope) String() string

func (*SOEntityRecoveryEnvelope) UnmarshalJSON

func (x *SOEntityRecoveryEnvelope) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOEntityRecoveryEnvelope from JSON.

func (*SOEntityRecoveryEnvelope) UnmarshalProtoJSON

func (x *SOEntityRecoveryEnvelope) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOEntityRecoveryEnvelope message from JSON.

func (*SOEntityRecoveryEnvelope) UnmarshalVT

func (m *SOEntityRecoveryEnvelope) UnmarshalVT(dAtA []byte) error

type SOEntityRecoveryMaterial

type SOEntityRecoveryMaterial struct {

	// EntityId is the stable entity identifier this material is for.
	EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entityId,omitempty"`
	// Role is the maximum role the entity may self-rejoin with.
	Role SOParticipantRole `protobuf:"varint,2,opt,name=role,proto3" json:"role,omitempty"`
	// GrantInner is the current grant material used to mint a peer grant.
	GrantInner *SOGrantInner `protobuf:"bytes,3,opt,name=grant_inner,json=grantInner,proto3" json:"grantInner,omitempty"`
	// contains filtered or unexported fields
}

SOEntityRecoveryMaterial is the decrypted recovery material for one entity.

func ResolveSharedObjectRecoveryMaterial

func ResolveSharedObjectRecoveryMaterial(
	ctx context.Context,
	provAcc provider.ProviderAccount,
	ref *SharedObjectRef,
) (*SOEntityRecoveryMaterial, error)

ResolveSharedObjectRecoveryMaterial resolves the recovery material for an SO using the provider feature surface.

func UnlockSOEntityRecoveryEnvelope

func UnlockSOEntityRecoveryEnvelope(entityPrivKeys []bifrost_crypto.PrivKey, env *SOEntityRecoveryEnvelope) (*SOEntityRecoveryMaterial, error)

UnlockSOEntityRecoveryEnvelope decrypts a recovery envelope into recovery material.

func (*SOEntityRecoveryMaterial) CloneMessageVT

func (*SOEntityRecoveryMaterial) CloneVT

func (*SOEntityRecoveryMaterial) EqualMessageVT

func (this *SOEntityRecoveryMaterial) EqualMessageVT(thatMsg any) bool

func (*SOEntityRecoveryMaterial) EqualVT

func (*SOEntityRecoveryMaterial) GetEntityId

func (x *SOEntityRecoveryMaterial) GetEntityId() string

func (*SOEntityRecoveryMaterial) GetGrantInner

func (x *SOEntityRecoveryMaterial) GetGrantInner() *SOGrantInner

func (*SOEntityRecoveryMaterial) GetRole

func (*SOEntityRecoveryMaterial) MarshalJSON

func (x *SOEntityRecoveryMaterial) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOEntityRecoveryMaterial to JSON.

func (*SOEntityRecoveryMaterial) MarshalProtoJSON

func (x *SOEntityRecoveryMaterial) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOEntityRecoveryMaterial message to JSON.

func (*SOEntityRecoveryMaterial) MarshalProtoText

func (x *SOEntityRecoveryMaterial) MarshalProtoText() string

func (*SOEntityRecoveryMaterial) MarshalToSizedBufferVT

func (m *SOEntityRecoveryMaterial) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOEntityRecoveryMaterial) MarshalToVT

func (m *SOEntityRecoveryMaterial) MarshalToVT(dAtA []byte) (int, error)

func (*SOEntityRecoveryMaterial) MarshalVT

func (m *SOEntityRecoveryMaterial) MarshalVT() (dAtA []byte, err error)

func (*SOEntityRecoveryMaterial) ProtoMessage

func (*SOEntityRecoveryMaterial) ProtoMessage()

func (*SOEntityRecoveryMaterial) Reset

func (x *SOEntityRecoveryMaterial) Reset()

func (*SOEntityRecoveryMaterial) SizeVT

func (m *SOEntityRecoveryMaterial) SizeVT() (n int)

func (*SOEntityRecoveryMaterial) String

func (x *SOEntityRecoveryMaterial) String() string

func (*SOEntityRecoveryMaterial) UnmarshalJSON

func (x *SOEntityRecoveryMaterial) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOEntityRecoveryMaterial from JSON.

func (*SOEntityRecoveryMaterial) UnmarshalProtoJSON

func (x *SOEntityRecoveryMaterial) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOEntityRecoveryMaterial message from JSON.

func (*SOEntityRecoveryMaterial) UnmarshalVT

func (m *SOEntityRecoveryMaterial) UnmarshalVT(dAtA []byte) error

type SOGrant

type SOGrant struct {

	// PeerId is the peer id of the target of the grant.
	// Must match a peer id of a participant on the shared object.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// InnerData is the inner SOGrantInner encrypted to the peer id.
	InnerData []byte `protobuf:"bytes,2,opt,name=inner_data,json=innerData,proto3" json:"innerData,omitempty"`
	// Signature is the signature of inner_data by the peer that issued the grant.
	Signature *peer.Signature `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SOGrant is a grant of a transform configuration to a peer.

func AddSOParticipant

func AddSOParticipant(
	ctx context.Context,
	host *SOHost,
	soID string,
	localPriv crypto.PrivKey,
	localPeerIDStr string,
	targetPeerIDStr string,
	targetPub crypto.PubKey,
	role SOParticipantRole,
	entityID string,
) (*SOGrant, error)

AddSOParticipant adds a target peer as a participant on a single shared object and issues an encrypted grant for the peer.

Reads the current SOState, checks for duplicate participant, builds a signed SOConfigChange adding the participant, and applies it atomically with a new SOGrant encrypted to the target's public key.

Returns the newly created SOGrant for the target peer, or nil if the participant already existed (no-op).

localPriv must be the private key of an OWNER in the current config. localPeerIDStr is the base58 peer ID corresponding to localPriv.

func BuildSelfEnrollPeerGrant

func BuildSelfEnrollPeerGrant(
	signerPriv bifrost_crypto.PrivKey,
	peerID bifrost_peer.ID,
	sharedObjectID string,
	material *SOEntityRecoveryMaterial,
) (*SOGrant, error)

BuildSelfEnrollPeerGrant builds a self-issued grant for the newly enrolled peer using recovered grant material.

func EncryptSOGrant

func EncryptSOGrant(privKey crypto.PrivKey, toPubKey crypto.PubKey, sharedObjectID string, nextInner *SOGrantInner) (*SOGrant, error)

EncryptSOGrant encrypts the inner data of a SOGrant. The privKey is also used to sign the inner data.

func (*SOGrant) CloneMessageVT

func (m *SOGrant) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOGrant) CloneVT

func (m *SOGrant) CloneVT() *SOGrant

func (*SOGrant) DecryptInnerData

func (g *SOGrant) DecryptInnerData(privKey crypto.PrivKey, sharedObjectID string) (*SOGrantInner, error)

DecryptInnerData decrypts the inner data of a SOGrant.

func (*SOGrant) EqualMessageVT

func (this *SOGrant) EqualMessageVT(thatMsg any) bool

func (*SOGrant) EqualVT

func (this *SOGrant) EqualVT(that *SOGrant) bool

func (*SOGrant) GetInnerData

func (x *SOGrant) GetInnerData() []byte

func (*SOGrant) GetPeerId

func (x *SOGrant) GetPeerId() string

func (*SOGrant) GetSignature

func (x *SOGrant) GetSignature() *peer.Signature

func (*SOGrant) MarshalJSON

func (x *SOGrant) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOGrant to JSON.

func (*SOGrant) MarshalProtoJSON

func (x *SOGrant) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOGrant message to JSON.

func (*SOGrant) MarshalProtoText

func (x *SOGrant) MarshalProtoText() string

func (*SOGrant) MarshalToSizedBufferVT

func (m *SOGrant) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOGrant) MarshalToVT

func (m *SOGrant) MarshalToVT(dAtA []byte) (int, error)

func (*SOGrant) MarshalVT

func (m *SOGrant) MarshalVT() (dAtA []byte, err error)

func (*SOGrant) ParsePeerID

func (g *SOGrant) ParsePeerID() (peer.ID, error)

ParsePeerID parses the peer ID.

func (*SOGrant) ProtoMessage

func (*SOGrant) ProtoMessage()

func (*SOGrant) Reset

func (x *SOGrant) Reset()

func (*SOGrant) SizeVT

func (m *SOGrant) SizeVT() (n int)

func (*SOGrant) String

func (x *SOGrant) String() string

func (*SOGrant) UnmarshalJSON

func (x *SOGrant) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOGrant from JSON.

func (*SOGrant) UnmarshalProtoJSON

func (x *SOGrant) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOGrant message from JSON.

func (*SOGrant) UnmarshalVT

func (m *SOGrant) UnmarshalVT(dAtA []byte) error

func (*SOGrant) Validate

func (g *SOGrant) Validate() error

Validate performs cursory checks on the SOGrant.

func (*SOGrant) ValidateSignature

func (g *SOGrant) ValidateSignature(sharedObjectID string, participants []*SOParticipantConfig) error

ValidateSignature validates the signature on a SOGrant.

type SOGrantInner

type SOGrantInner struct {

	// TransformConf is the transform config within the grant.
	// Usually contains a crypto key.
	TransformConf *transform.Config `protobuf:"bytes,1,opt,name=transform_conf,json=transformConf,proto3" json:"transformConf,omitempty"`
	// contains filtered or unexported fields
}

SOGrantInner is the inner encrypted body of the SOGrant.

func (*SOGrantInner) CloneMessageVT

func (m *SOGrantInner) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOGrantInner) CloneVT

func (m *SOGrantInner) CloneVT() *SOGrantInner

func (*SOGrantInner) EqualMessageVT

func (this *SOGrantInner) EqualMessageVT(thatMsg any) bool

func (*SOGrantInner) EqualVT

func (this *SOGrantInner) EqualVT(that *SOGrantInner) bool

func (*SOGrantInner) GetTransformConf

func (x *SOGrantInner) GetTransformConf() *transform.Config

func (*SOGrantInner) MarshalJSON

func (x *SOGrantInner) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOGrantInner to JSON.

func (*SOGrantInner) MarshalProtoJSON

func (x *SOGrantInner) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOGrantInner message to JSON.

func (*SOGrantInner) MarshalProtoText

func (x *SOGrantInner) MarshalProtoText() string

func (*SOGrantInner) MarshalToSizedBufferVT

func (m *SOGrantInner) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOGrantInner) MarshalToVT

func (m *SOGrantInner) MarshalToVT(dAtA []byte) (int, error)

func (*SOGrantInner) MarshalVT

func (m *SOGrantInner) MarshalVT() (dAtA []byte, err error)

func (*SOGrantInner) ProtoMessage

func (*SOGrantInner) ProtoMessage()

func (*SOGrantInner) Reset

func (x *SOGrantInner) Reset()

func (*SOGrantInner) SizeVT

func (m *SOGrantInner) SizeVT() (n int)

func (*SOGrantInner) String

func (x *SOGrantInner) String() string

func (*SOGrantInner) UnmarshalJSON

func (x *SOGrantInner) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOGrantInner from JSON.

func (*SOGrantInner) UnmarshalProtoJSON

func (x *SOGrantInner) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOGrantInner message from JSON.

func (*SOGrantInner) UnmarshalVT

func (m *SOGrantInner) UnmarshalVT(dAtA []byte) error

func (*SOGrantInner) Validate

func (g *SOGrantInner) Validate() error

Validate performs cursory checks on the SOGrantInner.

type SOHost

type SOHost struct {
	// contains filtered or unexported fields
}

SOHost is the implementation of the shared object host logic for a SOState container.

func NewSOHost

func NewSOHost(ctx context.Context, watchFn SOStateWatchFunc, lockFn SOStateLockFunc, sharedObjectID string) *SOHost

NewSOHost constructs a new shared object host.

ctx can be nil

func (*SOHost) ApplyConfigChange

func (s *SOHost) ApplyConfigChange(ctx context.Context, entry *SOConfigChange, fn func(state *SOState) error) error

ApplyConfigChange applies a signed SOConfigChange to the shared object state.

Verifies chain integrity (previous_hash matches current config_chain_hash, authorization from the current config), then replaces the config with the entry's config and updates the config_chain_hash.

If fn is non-nil it is called after the config is applied but before the state is written, allowing additional atomic mutations (e.g. grant issuance).

func (*SOHost) CanWatchSOState added in v0.51.8

func (s *SOHost) CanWatchSOState() bool

CanWatchSOState returns true if the host can watch shared object state.

func (*SOHost) ClearContext

func (s *SOHost) ClearContext()

ClearContext clears the context and shuts down all routines.

func (*SOHost) ClearRejectedOperation

func (s *SOHost) ClearRejectedOperation(ctx context.Context, clearOp *SOClearOperationResult) error

ClearRejectedOperation clears a rejected operation from the state. The clear operation must be signed by the peer that submitted the original operation.

func (*SOHost) CreateInvite

func (s *SOHost) CreateInvite(
	ctx context.Context,
	signerPrivKey crypto.PrivKey,
	invite *SOInvite,
) error

CreateInvite creates a new invite on the shared object via a signed config chain entry. The invite is appended to SOState.invites. The config itself does not change; the chain entry records the authorized operation.

func (*SOHost) CreateSOInviteOp

func (s *SOHost) CreateSOInviteOp(
	ctx context.Context,
	ownerPrivKey crypto.PrivKey,
	role SOParticipantRole,
	providerID string,
	targetPeerID string,
	maxUses uint32,
	expiresAt *timestamppb.Timestamp,
) (*SOInviteMessage, error)

CreateSOInviteOp creates an invite on the shared object and returns the signed SOInviteMessage for out-of-band distribution.

Generates a random 32-byte token, SHA256 hashes it for on-chain storage, builds and signs the SOInviteMessage, then stores the invite metadata in SOState.invites via a signed config chain entry.

func (*SOHost) CreateTargetedAccountSOInviteOp added in v0.51.2

func (s *SOHost) CreateTargetedAccountSOInviteOp(
	ctx context.Context,
	ownerPrivKey crypto.PrivKey,
	role SOParticipantRole,
	providerID string,
	targetAccountID string,
	maxUses uint32,
	expiresAt *timestamppb.Timestamp,
) (*SOInviteMessage, error)

CreateTargetedAccountSOInviteOp creates an invite that requires a targeted provider-account proof before a cloud owner may accept the mailbox entry.

func (*SOHost) GetHostState

func (s *SOHost) GetHostState(ctx context.Context) (*SOState, error)

GetHostState returns a snapshot of the current SOState.

func (*SOHost) GetRootInnerState

func (s *SOHost) GetRootInnerState(ctx context.Context) (*SORootInner, *SORoot, error)

GetRootInnerState returns a snapshot of the SORoot and unmarshals the SORootInner.

func (*SOHost) GetRootState

func (s *SOHost) GetRootState(ctx context.Context) (*SORoot, error)

GetRootState returns a snapshot of the current root state.

func (*SOHost) GetSOStateCtr

func (s *SOHost) GetSOStateCtr(ctx context.Context, released func()) (ccontainer.Watchable[*SOState], func(), error)

GetSOStateCtr watches the shared object state with the refcount container.

func (*SOHost) GetSharedObjectID

func (s *SOHost) GetSharedObjectID() string

GetSharedObjectID returns the sharedObjectID for the SOHost.

func (*SOHost) IncrementInviteUses

func (s *SOHost) IncrementInviteUses(
	ctx context.Context,
	signerPrivKey crypto.PrivKey,
	inviteID string,
) error

IncrementInviteUses increments the uses counter on an invite via a signed config chain entry. Returns an error if the invite is invalid, revoked, expired, or has reached max_uses.

func (*SOHost) QueueOperation

func (s *SOHost) QueueOperation(
	ctx context.Context,
	peerID peer.ID,
	cb func(nonce uint64) (*SOOperation, error),
) error

QueueOperation locks the host state and applies the QueueOperation operation.

Calls the callback to build the SOOperation with the given nonce.

Returns an error if the operation cannot be queued or if the nonce doesn't match the expected value.

func (*SOHost) RevokeInvite

func (s *SOHost) RevokeInvite(
	ctx context.Context,
	signerPrivKey crypto.PrivKey,
	inviteID string,
) error

RevokeInvite revokes an existing invite on the shared object via a signed config chain entry. Sets revoked=true on the matching invite.

func (*SOHost) SetContext

func (s *SOHost) SetContext(ctx context.Context) bool

SetContext updates the context on the refcount.

Returns if the context was updated.

func (*SOHost) UpdateRootState

func (s *SOHost) UpdateRootState(
	ctx context.Context,
	nextRootState *SORoot,
	enforceValidatorPeerID string,
	rejectedOps []*SOOperationRejection,
	acceptedOps []*SOOperation,
) error

UpdateRootState locks the host state and applies the UpdateRootState operation.

If an error is returned the SOState should be considered invalid. If enforceValidatorPeerID is non-empty, ensures the given validator is in the set of signatures.

func (*SOHost) UpdateSOState

func (s *SOHost) UpdateSOState(ctx context.Context, fn func(state *SOState) error) error

UpdateSOState locks the SO state, clones it, calls the provided function to mutate the clone, then writes the updated state.

type SOInvite

type SOInvite struct {

	// InviteId is the unique identifier for this invite.
	InviteId string `protobuf:"bytes,1,opt,name=invite_id,json=inviteId,proto3" json:"inviteId,omitempty"`
	// TokenHash is the SHA256 hash of the invite token.
	// The raw token is never stored on-chain.
	TokenHash []byte `protobuf:"bytes,2,opt,name=token_hash,json=tokenHash,proto3" json:"tokenHash,omitempty"`
	// Role is the role granted to the invitee on acceptance.
	Role SOParticipantRole `protobuf:"varint,3,opt,name=role,proto3" json:"role,omitempty"`
	// TargetPeerId is the optional peer ID of the intended invitee.
	// Empty means open invite (anyone with the token can join).
	TargetPeerId string `protobuf:"bytes,4,opt,name=target_peer_id,json=targetPeerId,proto3" json:"targetPeerId,omitempty"`
	// MaxUses is the maximum number of times the invite can be used.
	// 0 means unlimited.
	MaxUses uint32 `protobuf:"varint,5,opt,name=max_uses,json=maxUses,proto3" json:"maxUses,omitempty"`
	// Uses is the current number of times the invite has been used.
	Uses uint32 `protobuf:"varint,6,opt,name=uses,proto3" json:"uses,omitempty"`
	// ExpiresAt is the time after which the invite is invalid.
	// Unset means no expiry.
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=expires_at,json=expiresAt,proto3" json:"expiresAt,omitempty"`
	// Revoked indicates the invite has been revoked by the owner.
	Revoked bool `protobuf:"varint,8,opt,name=revoked,proto3" json:"revoked,omitempty"`
	// TargetAccountId is the optional provider account id required to submit a
	// targeted invitation proof for this invite. Empty means bearer invite.
	TargetAccountId string `protobuf:"bytes,9,opt,name=target_account_id,json=targetAccountId,proto3" json:"targetAccountId,omitempty"`
	// contains filtered or unexported fields
}

SOInvite is a pending invite on a SharedObject. Stored in plaintext on SOState (not in encrypted SORoot).

func FindInvite

func FindInvite(state *SOState, inviteID string) *SOInvite

FindInvite returns the invite with the given ID from the state, or nil.

func (*SOInvite) CloneMessageVT

func (m *SOInvite) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOInvite) CloneVT

func (m *SOInvite) CloneVT() *SOInvite

func (*SOInvite) EqualMessageVT

func (this *SOInvite) EqualMessageVT(thatMsg any) bool

func (*SOInvite) EqualVT

func (this *SOInvite) EqualVT(that *SOInvite) bool

func (*SOInvite) GetExpiresAt

func (x *SOInvite) GetExpiresAt() *timestamppb.Timestamp

func (*SOInvite) GetInviteId

func (x *SOInvite) GetInviteId() string

func (*SOInvite) GetMaxUses

func (x *SOInvite) GetMaxUses() uint32

func (*SOInvite) GetRevoked

func (x *SOInvite) GetRevoked() bool

func (*SOInvite) GetRole

func (x *SOInvite) GetRole() SOParticipantRole

func (*SOInvite) GetTargetAccountId added in v0.51.2

func (x *SOInvite) GetTargetAccountId() string

func (*SOInvite) GetTargetPeerId

func (x *SOInvite) GetTargetPeerId() string

func (*SOInvite) GetTokenHash

func (x *SOInvite) GetTokenHash() []byte

func (*SOInvite) GetUses

func (x *SOInvite) GetUses() uint32

func (*SOInvite) MarshalJSON

func (x *SOInvite) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOInvite to JSON.

func (*SOInvite) MarshalProtoJSON

func (x *SOInvite) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOInvite message to JSON.

func (*SOInvite) MarshalProtoText

func (x *SOInvite) MarshalProtoText() string

func (*SOInvite) MarshalToSizedBufferVT

func (m *SOInvite) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOInvite) MarshalToVT

func (m *SOInvite) MarshalToVT(dAtA []byte) (int, error)

func (*SOInvite) MarshalVT

func (m *SOInvite) MarshalVT() (dAtA []byte, err error)

func (*SOInvite) ProtoMessage

func (*SOInvite) ProtoMessage()

func (*SOInvite) Reset

func (x *SOInvite) Reset()

func (*SOInvite) SizeVT

func (m *SOInvite) SizeVT() (n int)

func (*SOInvite) String

func (x *SOInvite) String() string

func (*SOInvite) UnmarshalJSON

func (x *SOInvite) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOInvite from JSON.

func (*SOInvite) UnmarshalProtoJSON

func (x *SOInvite) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOInvite message from JSON.

func (*SOInvite) UnmarshalVT

func (m *SOInvite) UnmarshalVT(dAtA []byte) error

type SOInviteMessage

type SOInviteMessage struct {

	// InviteId is the unique identifier for this invite.
	InviteId string `protobuf:"bytes,1,opt,name=invite_id,json=inviteId,proto3" json:"inviteId,omitempty"`
	// SharedObjectId is the ID of the shared object being shared.
	SharedObjectId string `protobuf:"bytes,2,opt,name=shared_object_id,json=sharedObjectId,proto3" json:"sharedObjectId,omitempty"`
	// OwnerPeerId is the peer ID of the invite creator (b58).
	OwnerPeerId string `protobuf:"bytes,3,opt,name=owner_peer_id,json=ownerPeerId,proto3" json:"ownerPeerId,omitempty"`
	// ProviderId is the provider to use for signaling (not a raw URL).
	ProviderId string `protobuf:"bytes,4,opt,name=provider_id,json=providerId,proto3" json:"providerId,omitempty"`
	// Token is the raw invite token. The SHA256 hash is stored on-chain.
	Token []byte `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"`
	// Role is the role granted to the invitee on acceptance.
	Role SOParticipantRole `protobuf:"varint,6,opt,name=role,proto3" json:"role,omitempty"`
	// TargetPeerId is the optional peer ID of the intended invitee (b58).
	// Empty means open invite.
	TargetPeerId string `protobuf:"bytes,7,opt,name=target_peer_id,json=targetPeerId,proto3" json:"targetPeerId,omitempty"`
	// ExpiresAt is the time after which the invite is invalid.
	// Unset means no expiry.
	ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=expires_at,json=expiresAt,proto3" json:"expiresAt,omitempty"`
	// MaxUses is the maximum number of times the invite can be used.
	// 0 means unlimited.
	MaxUses uint32 `protobuf:"varint,9,opt,name=max_uses,json=maxUses,proto3" json:"maxUses,omitempty"`
	// Signature is the owner's signature over this message (without this field).
	Signature *peer.Signature `protobuf:"bytes,10,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SOInviteMessage is a signed invite distributed out-of-band to an invitee. The raw token is included (unlike SOInvite which stores only the hash).

func (*SOInviteMessage) CloneMessageVT

func (m *SOInviteMessage) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOInviteMessage) CloneVT

func (m *SOInviteMessage) CloneVT() *SOInviteMessage

func (*SOInviteMessage) EqualMessageVT

func (this *SOInviteMessage) EqualMessageVT(thatMsg any) bool

func (*SOInviteMessage) EqualVT

func (this *SOInviteMessage) EqualVT(that *SOInviteMessage) bool

func (*SOInviteMessage) GetExpiresAt

func (x *SOInviteMessage) GetExpiresAt() *timestamppb.Timestamp

func (*SOInviteMessage) GetInviteId

func (x *SOInviteMessage) GetInviteId() string

func (*SOInviteMessage) GetMaxUses

func (x *SOInviteMessage) GetMaxUses() uint32

func (*SOInviteMessage) GetOwnerPeerId

func (x *SOInviteMessage) GetOwnerPeerId() string

func (*SOInviteMessage) GetProviderId

func (x *SOInviteMessage) GetProviderId() string

func (*SOInviteMessage) GetRole

func (x *SOInviteMessage) GetRole() SOParticipantRole

func (*SOInviteMessage) GetSharedObjectId

func (x *SOInviteMessage) GetSharedObjectId() string

func (*SOInviteMessage) GetSignature

func (x *SOInviteMessage) GetSignature() *peer.Signature

func (*SOInviteMessage) GetTargetPeerId

func (x *SOInviteMessage) GetTargetPeerId() string

func (*SOInviteMessage) GetToken

func (x *SOInviteMessage) GetToken() []byte

func (*SOInviteMessage) MarshalJSON

func (x *SOInviteMessage) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOInviteMessage to JSON.

func (*SOInviteMessage) MarshalProtoJSON

func (x *SOInviteMessage) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOInviteMessage message to JSON.

func (*SOInviteMessage) MarshalProtoText

func (x *SOInviteMessage) MarshalProtoText() string

func (*SOInviteMessage) MarshalToSizedBufferVT

func (m *SOInviteMessage) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOInviteMessage) MarshalToVT

func (m *SOInviteMessage) MarshalToVT(dAtA []byte) (int, error)

func (*SOInviteMessage) MarshalVT

func (m *SOInviteMessage) MarshalVT() (dAtA []byte, err error)

func (*SOInviteMessage) ProtoMessage

func (*SOInviteMessage) ProtoMessage()

func (*SOInviteMessage) Reset

func (x *SOInviteMessage) Reset()

func (*SOInviteMessage) SizeVT

func (m *SOInviteMessage) SizeVT() (n int)

func (*SOInviteMessage) String

func (x *SOInviteMessage) String() string

func (*SOInviteMessage) UnmarshalJSON

func (x *SOInviteMessage) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOInviteMessage from JSON.

func (*SOInviteMessage) UnmarshalProtoJSON

func (x *SOInviteMessage) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOInviteMessage message from JSON.

func (*SOInviteMessage) UnmarshalVT

func (m *SOInviteMessage) UnmarshalVT(dAtA []byte) error

type SOJoinResponse

type SOJoinResponse struct {

	// InviteId is the invite being accepted.
	InviteId string `protobuf:"bytes,1,opt,name=invite_id,json=inviteId,proto3" json:"inviteId,omitempty"`
	// ResponderPeerId is the peer ID of the responder (b58).
	ResponderPeerId string `protobuf:"bytes,2,opt,name=responder_peer_id,json=responderPeerId,proto3" json:"responderPeerId,omitempty"`
	// ResponderPubkey is the DER-encoded public key of the responder.
	ResponderPubkey []byte `protobuf:"bytes,3,opt,name=responder_pubkey,json=responderPubkey,proto3" json:"responderPubkey,omitempty"`
	// Signature is the responder's signature over this message (without this field).
	Signature *peer.Signature `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SOJoinResponse is a signed response from an invitee requesting to join.

func (*SOJoinResponse) CloneMessageVT

func (m *SOJoinResponse) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOJoinResponse) CloneVT

func (m *SOJoinResponse) CloneVT() *SOJoinResponse

func (*SOJoinResponse) EqualMessageVT

func (this *SOJoinResponse) EqualMessageVT(thatMsg any) bool

func (*SOJoinResponse) EqualVT

func (this *SOJoinResponse) EqualVT(that *SOJoinResponse) bool

func (*SOJoinResponse) GetInviteId

func (x *SOJoinResponse) GetInviteId() string

func (*SOJoinResponse) GetResponderPeerId

func (x *SOJoinResponse) GetResponderPeerId() string

func (*SOJoinResponse) GetResponderPubkey

func (x *SOJoinResponse) GetResponderPubkey() []byte

func (*SOJoinResponse) GetSignature

func (x *SOJoinResponse) GetSignature() *peer.Signature

func (*SOJoinResponse) MarshalJSON

func (x *SOJoinResponse) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJoinResponse to JSON.

func (*SOJoinResponse) MarshalProtoJSON

func (x *SOJoinResponse) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJoinResponse message to JSON.

func (*SOJoinResponse) MarshalProtoText

func (x *SOJoinResponse) MarshalProtoText() string

func (*SOJoinResponse) MarshalToSizedBufferVT

func (m *SOJoinResponse) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJoinResponse) MarshalToVT

func (m *SOJoinResponse) MarshalToVT(dAtA []byte) (int, error)

func (*SOJoinResponse) MarshalVT

func (m *SOJoinResponse) MarshalVT() (dAtA []byte, err error)

func (*SOJoinResponse) ProtoMessage

func (*SOJoinResponse) ProtoMessage()

func (*SOJoinResponse) Reset

func (x *SOJoinResponse) Reset()

func (*SOJoinResponse) SizeVT

func (m *SOJoinResponse) SizeVT() (n int)

func (*SOJoinResponse) String

func (x *SOJoinResponse) String() string

func (*SOJoinResponse) UnmarshalJSON

func (x *SOJoinResponse) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJoinResponse from JSON.

func (*SOJoinResponse) UnmarshalProtoJSON

func (x *SOJoinResponse) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJoinResponse message from JSON.

func (*SOJoinResponse) UnmarshalVT

func (m *SOJoinResponse) UnmarshalVT(dAtA []byte) error

type SOJournalAcknowledgement added in v0.56.1

type SOJournalAcknowledgement struct {

	// Key identifies the exact acknowledged attempt.
	Key *SOMutationKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// ReceiptDigest binds acknowledgement to one terminal receipt using DigestSOTerminalReceipt.
	ReceiptDigest []byte `protobuf:"bytes,2,opt,name=receipt_digest,json=receiptDigest,proto3" json:"receiptDigest,omitempty"`
	// AcknowledgedUnixMillis records when acknowledgement became durable.
	AcknowledgedUnixMillis uint64 `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

SOJournalAcknowledgement records remote receipt acknowledgement.

func (*SOJournalAcknowledgement) CloneMessageVT added in v0.56.1

func (*SOJournalAcknowledgement) CloneVT added in v0.56.1

func (*SOJournalAcknowledgement) EqualMessageVT added in v0.56.1

func (this *SOJournalAcknowledgement) EqualMessageVT(thatMsg any) bool

func (*SOJournalAcknowledgement) EqualVT added in v0.56.1

func (*SOJournalAcknowledgement) GetAcknowledgedUnixMillis added in v0.56.1

func (x *SOJournalAcknowledgement) GetAcknowledgedUnixMillis() uint64

func (*SOJournalAcknowledgement) GetKey added in v0.56.1

func (*SOJournalAcknowledgement) GetReceiptDigest added in v0.56.1

func (x *SOJournalAcknowledgement) GetReceiptDigest() []byte

func (*SOJournalAcknowledgement) MarshalJSON added in v0.56.1

func (x *SOJournalAcknowledgement) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalAcknowledgement to JSON.

func (*SOJournalAcknowledgement) MarshalProtoJSON added in v0.56.1

func (x *SOJournalAcknowledgement) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalAcknowledgement message to JSON.

func (*SOJournalAcknowledgement) MarshalProtoText added in v0.56.1

func (x *SOJournalAcknowledgement) MarshalProtoText() string

func (*SOJournalAcknowledgement) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalAcknowledgement) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalAcknowledgement) MarshalToVT added in v0.56.1

func (m *SOJournalAcknowledgement) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalAcknowledgement) MarshalVT added in v0.56.1

func (m *SOJournalAcknowledgement) MarshalVT() (dAtA []byte, err error)

func (*SOJournalAcknowledgement) ProtoMessage added in v0.56.1

func (*SOJournalAcknowledgement) ProtoMessage()

func (*SOJournalAcknowledgement) Reset added in v0.56.1

func (x *SOJournalAcknowledgement) Reset()

func (*SOJournalAcknowledgement) SizeVT added in v0.56.1

func (m *SOJournalAcknowledgement) SizeVT() (n int)

func (*SOJournalAcknowledgement) String added in v0.56.1

func (x *SOJournalAcknowledgement) String() string

func (*SOJournalAcknowledgement) UnmarshalJSON added in v0.56.1

func (x *SOJournalAcknowledgement) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalAcknowledgement from JSON.

func (*SOJournalAcknowledgement) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalAcknowledgement) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalAcknowledgement message from JSON.

func (*SOJournalAcknowledgement) UnmarshalVT added in v0.56.1

func (m *SOJournalAcknowledgement) UnmarshalVT(dAtA []byte) error

type SOJournalAttemptState added in v0.56.1

type SOJournalAttemptState int32

SOJournalAttemptState identifies the attempt lifecycle state.

const (
	SOJournalAttemptState_SO_JOURNAL_ATTEMPT_STATE_UNSPECIFIED           SOJournalAttemptState = 0
	SOJournalAttemptState_SO_JOURNAL_ATTEMPT_STATE_INTENT_DURABLE        SOJournalAttemptState = 1
	SOJournalAttemptState_SO_JOURNAL_ATTEMPT_STATE_ENVELOPE_DURABLE      SOJournalAttemptState = 2
	SOJournalAttemptState_SO_JOURNAL_ATTEMPT_STATE_SENT                  SOJournalAttemptState = 3
	SOJournalAttemptState_SO_JOURNAL_ATTEMPT_STATE_RECEIPT_DURABLE       SOJournalAttemptState = 4
	SOJournalAttemptState_SO_JOURNAL_ATTEMPT_STATE_STALE_TRANSFORM_EPOCH SOJournalAttemptState = 5
	SOJournalAttemptState_SO_JOURNAL_ATTEMPT_STATE_RECOVERY_BLOCKED      SOJournalAttemptState = 6
)

func (SOJournalAttemptState) Enum added in v0.56.1

func (SOJournalAttemptState) MarshalJSON added in v0.56.1

func (x SOJournalAttemptState) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalAttemptState to JSON.

func (SOJournalAttemptState) MarshalProtoJSON added in v0.56.1

func (x SOJournalAttemptState) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalAttemptState to JSON.

func (SOJournalAttemptState) MarshalProtoText added in v0.56.1

func (x SOJournalAttemptState) MarshalProtoText() string

func (SOJournalAttemptState) MarshalText added in v0.56.1

func (x SOJournalAttemptState) MarshalText() ([]byte, error)

MarshalText marshals the SOJournalAttemptState to text.

func (SOJournalAttemptState) String added in v0.56.1

func (x SOJournalAttemptState) String() string

func (*SOJournalAttemptState) UnmarshalJSON added in v0.56.1

func (x *SOJournalAttemptState) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalAttemptState from JSON.

func (*SOJournalAttemptState) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalAttemptState) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalAttemptState from JSON.

func (*SOJournalAttemptState) UnmarshalText added in v0.56.1

func (x *SOJournalAttemptState) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOJournalAttemptState from text.

type SOJournalCheckpoint added in v0.56.1

type SOJournalCheckpoint struct {

	// JournalIdentity is the stable identity of the journal storage.
	JournalIdentity []byte `protobuf:"bytes,1,opt,name=journal_identity,json=journalIdentity,proto3" json:"journalIdentity,omitempty"`
	// Generation identifies this compact snapshot publication.
	Generation uint64 `protobuf:"varint,2,opt,name=generation,proto3" json:"generation,omitempty"`
	// NextSequence is the first sequence expected in the append tail.
	NextSequence uint64 `protobuf:"varint,3,opt,name=next_sequence,json=nextSequence,proto3" json:"nextSequence,omitempty"`
	// Attempts contains one bounded state snapshot per exact mutation key.
	Attempts []*SOJournalCheckpointAttempt `protobuf:"bytes,4,rep,name=attempts,proto3" json:"attempts,omitempty"`
	// contains filtered or unexported fields
}

SOJournalCheckpoint is a deterministic compact reducer snapshot.

func (*SOJournalCheckpoint) CloneMessageVT added in v0.56.1

func (*SOJournalCheckpoint) CloneVT added in v0.56.1

func (*SOJournalCheckpoint) EqualMessageVT added in v0.56.1

func (this *SOJournalCheckpoint) EqualMessageVT(thatMsg any) bool

func (*SOJournalCheckpoint) EqualVT added in v0.56.1

func (this *SOJournalCheckpoint) EqualVT(that *SOJournalCheckpoint) bool

func (*SOJournalCheckpoint) GetAttempts added in v0.56.1

func (x *SOJournalCheckpoint) GetAttempts() []*SOJournalCheckpointAttempt

func (*SOJournalCheckpoint) GetGeneration added in v0.56.1

func (x *SOJournalCheckpoint) GetGeneration() uint64

func (*SOJournalCheckpoint) GetJournalIdentity added in v0.56.1

func (x *SOJournalCheckpoint) GetJournalIdentity() []byte

func (*SOJournalCheckpoint) GetNextSequence added in v0.56.1

func (x *SOJournalCheckpoint) GetNextSequence() uint64

func (*SOJournalCheckpoint) MarshalJSON added in v0.56.1

func (x *SOJournalCheckpoint) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalCheckpoint to JSON.

func (*SOJournalCheckpoint) MarshalProtoJSON added in v0.56.1

func (x *SOJournalCheckpoint) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalCheckpoint message to JSON.

func (*SOJournalCheckpoint) MarshalProtoText added in v0.56.1

func (x *SOJournalCheckpoint) MarshalProtoText() string

func (*SOJournalCheckpoint) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalCheckpoint) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalCheckpoint) MarshalToVT added in v0.56.1

func (m *SOJournalCheckpoint) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalCheckpoint) MarshalVT added in v0.56.1

func (m *SOJournalCheckpoint) MarshalVT() (dAtA []byte, err error)

func (*SOJournalCheckpoint) ProtoMessage added in v0.56.1

func (*SOJournalCheckpoint) ProtoMessage()

func (*SOJournalCheckpoint) Reset added in v0.56.1

func (x *SOJournalCheckpoint) Reset()

func (*SOJournalCheckpoint) SizeVT added in v0.56.1

func (m *SOJournalCheckpoint) SizeVT() (n int)

func (*SOJournalCheckpoint) String added in v0.56.1

func (x *SOJournalCheckpoint) String() string

func (*SOJournalCheckpoint) UnmarshalJSON added in v0.56.1

func (x *SOJournalCheckpoint) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalCheckpoint from JSON.

func (*SOJournalCheckpoint) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalCheckpoint) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalCheckpoint message from JSON.

func (*SOJournalCheckpoint) UnmarshalVT added in v0.56.1

func (m *SOJournalCheckpoint) UnmarshalVT(dAtA []byte) error

type SOJournalCheckpointAttempt added in v0.56.1

type SOJournalCheckpointAttempt struct {

	// Key identifies the exact checkpointed mutation attempt.
	Key *SOMutationKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Lineage carries the immutable supersession relation.
	Lineage *SOJournalLineage `protobuf:"bytes,2,opt,name=lineage,proto3" json:"lineage,omitempty"`
	// Version carries local/remote and transform observations.
	Version *SOJournalVersionTuple `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// State is the legal lifecycle state at checkpoint publication.
	State SOJournalAttemptState `protobuf:"varint,4,opt,name=state,proto3" json:"state,omitempty"`
	// Readiness records body-owned preparation status.
	Readiness SOJournalReadiness `protobuf:"varint,5,opt,name=readiness,proto3" json:"readiness,omitempty"`
	// Intent is the retained encrypted canonical operation.
	Intent *SOJournalEncryptedPayload `protobuf:"bytes,6,opt,name=intent,proto3" json:"intent,omitempty"`
	// Envelope is the retained encrypted immutable signed bytes.
	Envelope *SOJournalEncryptedPayload `protobuf:"bytes,7,opt,name=envelope,proto3" json:"envelope,omitempty"`
	// EnvelopeDigest binds the retained envelope plaintext.
	EnvelopeDigest []byte `protobuf:"bytes,8,opt,name=envelope_digest,json=envelopeDigest,proto3" json:"envelopeDigest,omitempty"`
	// Receipt is terminal remote evidence kept separate from projection.
	Receipt *SOJournalReceipt `protobuf:"bytes,9,opt,name=receipt,proto3" json:"receipt,omitempty"`
	// Acknowledgement records remote acknowledgement of the receipt.
	Acknowledgement *SOJournalAcknowledgement `protobuf:"bytes,10,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"`
	// Projection records the body's exact authoritative-root observation.
	Projection *SOJournalProjection `protobuf:"bytes,11,opt,name=projection,proto3" json:"projection,omitempty"`
	// Lookup records the retained exact-key receipt lookup.
	Lookup *SOJournalLookup `protobuf:"bytes,12,opt,name=lookup,proto3" json:"lookup,omitempty"`
	// SendAttempted records that transport crossed the durable send boundary.
	SendAttempted bool `protobuf:"varint,13,opt,name=send_attempted,json=sendAttempted,proto3" json:"sendAttempted,omitempty"`
	// ResendAuthorized records authoritative no-record resend permission.
	ResendAuthorized bool `protobuf:"varint,14,opt,name=resend_authorized,json=resendAuthorized,proto3" json:"resendAuthorized,omitempty"`
	// LineageRecoveryBlocked records that successor recovery is blocked.
	LineageRecoveryBlocked bool `` /* 129-byte string literal not displayed */
	// IntentSequence is the exact journal sequence used by the retained intent ciphertext.
	IntentSequence uint64 `protobuf:"varint,16,opt,name=intent_sequence,json=intentSequence,proto3" json:"intentSequence,omitempty"`
	// EnvelopeSequence is the exact journal sequence used by the retained envelope ciphertext.
	EnvelopeSequence uint64 `protobuf:"varint,17,opt,name=envelope_sequence,json=envelopeSequence,proto3" json:"envelopeSequence,omitempty"`
	// CheckpointEligible is the derived receipt-plus-projection eligibility bit.
	CheckpointEligible bool `protobuf:"varint,18,opt,name=checkpoint_eligible,json=checkpointEligible,proto3" json:"checkpointEligible,omitempty"`
	// contains filtered or unexported fields
}

SOJournalCheckpointAttempt is the bounded reducer state for one exact key.

func (*SOJournalCheckpointAttempt) CloneMessageVT added in v0.56.1

func (*SOJournalCheckpointAttempt) CloneVT added in v0.56.1

func (*SOJournalCheckpointAttempt) EqualMessageVT added in v0.56.1

func (this *SOJournalCheckpointAttempt) EqualMessageVT(thatMsg any) bool

func (*SOJournalCheckpointAttempt) EqualVT added in v0.56.1

func (*SOJournalCheckpointAttempt) GetAcknowledgement added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetAcknowledgement() *SOJournalAcknowledgement

func (*SOJournalCheckpointAttempt) GetCheckpointEligible added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetCheckpointEligible() bool

func (*SOJournalCheckpointAttempt) GetEnvelope added in v0.56.1

func (*SOJournalCheckpointAttempt) GetEnvelopeDigest added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetEnvelopeDigest() []byte

func (*SOJournalCheckpointAttempt) GetEnvelopeSequence added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetEnvelopeSequence() uint64

func (*SOJournalCheckpointAttempt) GetIntent added in v0.56.1

func (*SOJournalCheckpointAttempt) GetIntentSequence added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetIntentSequence() uint64

func (*SOJournalCheckpointAttempt) GetKey added in v0.56.1

func (*SOJournalCheckpointAttempt) GetLineage added in v0.56.1

func (*SOJournalCheckpointAttempt) GetLineageRecoveryBlocked added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetLineageRecoveryBlocked() bool

func (*SOJournalCheckpointAttempt) GetLookup added in v0.56.1

func (*SOJournalCheckpointAttempt) GetProjection added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetProjection() *SOJournalProjection

func (*SOJournalCheckpointAttempt) GetReadiness added in v0.56.1

func (*SOJournalCheckpointAttempt) GetReceipt added in v0.56.1

func (*SOJournalCheckpointAttempt) GetResendAuthorized added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetResendAuthorized() bool

func (*SOJournalCheckpointAttempt) GetSendAttempted added in v0.56.1

func (x *SOJournalCheckpointAttempt) GetSendAttempted() bool

func (*SOJournalCheckpointAttempt) GetState added in v0.56.1

func (*SOJournalCheckpointAttempt) GetVersion added in v0.56.1

func (*SOJournalCheckpointAttempt) MarshalJSON added in v0.56.1

func (x *SOJournalCheckpointAttempt) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalCheckpointAttempt to JSON.

func (*SOJournalCheckpointAttempt) MarshalProtoJSON added in v0.56.1

func (x *SOJournalCheckpointAttempt) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalCheckpointAttempt message to JSON.

func (*SOJournalCheckpointAttempt) MarshalProtoText added in v0.56.1

func (x *SOJournalCheckpointAttempt) MarshalProtoText() string

func (*SOJournalCheckpointAttempt) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalCheckpointAttempt) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalCheckpointAttempt) MarshalToVT added in v0.56.1

func (m *SOJournalCheckpointAttempt) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalCheckpointAttempt) MarshalVT added in v0.56.1

func (m *SOJournalCheckpointAttempt) MarshalVT() (dAtA []byte, err error)

func (*SOJournalCheckpointAttempt) ProtoMessage added in v0.56.1

func (*SOJournalCheckpointAttempt) ProtoMessage()

func (*SOJournalCheckpointAttempt) Reset added in v0.56.1

func (x *SOJournalCheckpointAttempt) Reset()

func (*SOJournalCheckpointAttempt) SizeVT added in v0.56.1

func (m *SOJournalCheckpointAttempt) SizeVT() (n int)

func (*SOJournalCheckpointAttempt) String added in v0.56.1

func (x *SOJournalCheckpointAttempt) String() string

func (*SOJournalCheckpointAttempt) UnmarshalJSON added in v0.56.1

func (x *SOJournalCheckpointAttempt) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalCheckpointAttempt from JSON.

func (*SOJournalCheckpointAttempt) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalCheckpointAttempt) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalCheckpointAttempt message from JSON.

func (*SOJournalCheckpointAttempt) UnmarshalVT added in v0.56.1

func (m *SOJournalCheckpointAttempt) UnmarshalVT(dAtA []byte) error

type SOJournalEncryptedPayload added in v0.56.1

type SOJournalEncryptedPayload struct {

	// Nonce is unique within the derived journal key domain.
	Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Ciphertext contains the encrypted staged payload and authentication tag.
	Ciphertext []byte `protobuf:"bytes,2,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
	// contains filtered or unexported fields
}

SOJournalEncryptedPayload contains authenticated ciphertext and its nonce.

func (*SOJournalEncryptedPayload) CloneMessageVT added in v0.56.1

func (*SOJournalEncryptedPayload) CloneVT added in v0.56.1

func (*SOJournalEncryptedPayload) EqualMessageVT added in v0.56.1

func (this *SOJournalEncryptedPayload) EqualMessageVT(thatMsg any) bool

func (*SOJournalEncryptedPayload) EqualVT added in v0.56.1

func (*SOJournalEncryptedPayload) GetCiphertext added in v0.56.1

func (x *SOJournalEncryptedPayload) GetCiphertext() []byte

func (*SOJournalEncryptedPayload) GetNonce added in v0.56.1

func (x *SOJournalEncryptedPayload) GetNonce() []byte

func (*SOJournalEncryptedPayload) MarshalJSON added in v0.56.1

func (x *SOJournalEncryptedPayload) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalEncryptedPayload to JSON.

func (*SOJournalEncryptedPayload) MarshalProtoJSON added in v0.56.1

func (x *SOJournalEncryptedPayload) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalEncryptedPayload message to JSON.

func (*SOJournalEncryptedPayload) MarshalProtoText added in v0.56.1

func (x *SOJournalEncryptedPayload) MarshalProtoText() string

func (*SOJournalEncryptedPayload) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalEncryptedPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalEncryptedPayload) MarshalToVT added in v0.56.1

func (m *SOJournalEncryptedPayload) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalEncryptedPayload) MarshalVT added in v0.56.1

func (m *SOJournalEncryptedPayload) MarshalVT() (dAtA []byte, err error)

func (*SOJournalEncryptedPayload) ProtoMessage added in v0.56.1

func (*SOJournalEncryptedPayload) ProtoMessage()

func (*SOJournalEncryptedPayload) Reset added in v0.56.1

func (x *SOJournalEncryptedPayload) Reset()

func (*SOJournalEncryptedPayload) SizeVT added in v0.56.1

func (m *SOJournalEncryptedPayload) SizeVT() (n int)

func (*SOJournalEncryptedPayload) String added in v0.56.1

func (x *SOJournalEncryptedPayload) String() string

func (*SOJournalEncryptedPayload) UnmarshalJSON added in v0.56.1

func (x *SOJournalEncryptedPayload) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalEncryptedPayload from JSON.

func (*SOJournalEncryptedPayload) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalEncryptedPayload) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalEncryptedPayload message from JSON.

func (*SOJournalEncryptedPayload) UnmarshalVT added in v0.56.1

func (m *SOJournalEncryptedPayload) UnmarshalVT(dAtA []byte) error

type SOJournalIntent added in v0.56.1

type SOJournalIntent struct {

	// Key identifies the exact operation attempt.
	Key *SOMutationKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Lineage records the immutable predecessor relation.
	Lineage *SOJournalLineage `protobuf:"bytes,2,opt,name=lineage,proto3" json:"lineage,omitempty"`
	// Version records the observations used to construct the operation.
	Version *SOJournalVersionTuple `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// CanonicalOperation contains operation input without body-specific metadata.
	CanonicalOperation []byte `protobuf:"bytes,4,opt,name=canonical_operation,json=canonicalOperation,proto3" json:"canonicalOperation,omitempty"`
	// contains filtered or unexported fields
}

SOJournalIntent is the canonical body-neutral operation before signing.

func NewJournalIntent added in v0.56.1

func NewJournalIntent(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple, operation []byte) (*SOJournalIntent, error)

NewJournalIntent constructs the canonical body-neutral intent payload.

func (*SOJournalIntent) CloneMessageVT added in v0.56.1

func (m *SOJournalIntent) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOJournalIntent) CloneVT added in v0.56.1

func (m *SOJournalIntent) CloneVT() *SOJournalIntent

func (*SOJournalIntent) EqualMessageVT added in v0.56.1

func (this *SOJournalIntent) EqualMessageVT(thatMsg any) bool

func (*SOJournalIntent) EqualVT added in v0.56.1

func (this *SOJournalIntent) EqualVT(that *SOJournalIntent) bool

func (*SOJournalIntent) GetCanonicalOperation added in v0.56.1

func (x *SOJournalIntent) GetCanonicalOperation() []byte

func (*SOJournalIntent) GetKey added in v0.56.1

func (x *SOJournalIntent) GetKey() *SOMutationKey

func (*SOJournalIntent) GetLineage added in v0.56.1

func (x *SOJournalIntent) GetLineage() *SOJournalLineage

func (*SOJournalIntent) GetVersion added in v0.56.1

func (x *SOJournalIntent) GetVersion() *SOJournalVersionTuple

func (*SOJournalIntent) MarshalJSON added in v0.56.1

func (x *SOJournalIntent) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalIntent to JSON.

func (*SOJournalIntent) MarshalProtoJSON added in v0.56.1

func (x *SOJournalIntent) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalIntent message to JSON.

func (*SOJournalIntent) MarshalProtoText added in v0.56.1

func (x *SOJournalIntent) MarshalProtoText() string

func (*SOJournalIntent) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalIntent) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalIntent) MarshalToVT added in v0.56.1

func (m *SOJournalIntent) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalIntent) MarshalVT added in v0.56.1

func (m *SOJournalIntent) MarshalVT() (dAtA []byte, err error)

func (*SOJournalIntent) ProtoMessage added in v0.56.1

func (*SOJournalIntent) ProtoMessage()

func (*SOJournalIntent) Reset added in v0.56.1

func (x *SOJournalIntent) Reset()

func (*SOJournalIntent) SizeVT added in v0.56.1

func (m *SOJournalIntent) SizeVT() (n int)

func (*SOJournalIntent) String added in v0.56.1

func (x *SOJournalIntent) String() string

func (*SOJournalIntent) UnmarshalJSON added in v0.56.1

func (x *SOJournalIntent) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalIntent from JSON.

func (*SOJournalIntent) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalIntent) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalIntent message from JSON.

func (*SOJournalIntent) UnmarshalVT added in v0.56.1

func (m *SOJournalIntent) UnmarshalVT(dAtA []byte) error

type SOJournalLineage added in v0.56.1

type SOJournalLineage struct {

	// RootKey is the exact key carried by this lineage record.
	RootKey *SOMutationKey `protobuf:"bytes,1,opt,name=root_key,json=rootKey,proto3" json:"rootKey,omitempty"`
	// Supersedes links a changed attempt to its predecessor.
	Supersedes *SOMutationKey `protobuf:"bytes,2,opt,name=supersedes,proto3" json:"supersedes,omitempty"`
	// contains filtered or unexported fields
}

SOJournalLineage links an immutable attempt to an optional predecessor.

func (*SOJournalLineage) CloneMessageVT added in v0.56.1

func (m *SOJournalLineage) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOJournalLineage) CloneVT added in v0.56.1

func (m *SOJournalLineage) CloneVT() *SOJournalLineage

func (*SOJournalLineage) EqualMessageVT added in v0.56.1

func (this *SOJournalLineage) EqualMessageVT(thatMsg any) bool

func (*SOJournalLineage) EqualVT added in v0.56.1

func (this *SOJournalLineage) EqualVT(that *SOJournalLineage) bool

func (*SOJournalLineage) GetRootKey added in v0.56.1

func (x *SOJournalLineage) GetRootKey() *SOMutationKey

func (*SOJournalLineage) GetSupersedes added in v0.56.1

func (x *SOJournalLineage) GetSupersedes() *SOMutationKey

func (*SOJournalLineage) MarshalJSON added in v0.56.1

func (x *SOJournalLineage) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalLineage to JSON.

func (*SOJournalLineage) MarshalProtoJSON added in v0.56.1

func (x *SOJournalLineage) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalLineage message to JSON.

func (*SOJournalLineage) MarshalProtoText added in v0.56.1

func (x *SOJournalLineage) MarshalProtoText() string

func (*SOJournalLineage) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalLineage) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalLineage) MarshalToVT added in v0.56.1

func (m *SOJournalLineage) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalLineage) MarshalVT added in v0.56.1

func (m *SOJournalLineage) MarshalVT() (dAtA []byte, err error)

func (*SOJournalLineage) ProtoMessage added in v0.56.1

func (*SOJournalLineage) ProtoMessage()

func (*SOJournalLineage) Reset added in v0.56.1

func (x *SOJournalLineage) Reset()

func (*SOJournalLineage) SizeVT added in v0.56.1

func (m *SOJournalLineage) SizeVT() (n int)

func (*SOJournalLineage) String added in v0.56.1

func (x *SOJournalLineage) String() string

func (*SOJournalLineage) UnmarshalJSON added in v0.56.1

func (x *SOJournalLineage) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalLineage from JSON.

func (*SOJournalLineage) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalLineage) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalLineage message from JSON.

func (*SOJournalLineage) UnmarshalVT added in v0.56.1

func (m *SOJournalLineage) UnmarshalVT(dAtA []byte) error

type SOJournalLookup added in v0.56.1

type SOJournalLookup struct {

	// Key identifies the exact lookup attempt.
	Key *SOMutationKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// State is the authoritative lookup result.
	State SOReceiptState `protobuf:"varint,2,opt,name=state,proto3" json:"state,omitempty"`
	// Receipt carries terminal evidence when state is accepted or rejected.
	Receipt *SOJournalReceipt `protobuf:"bytes,3,opt,name=receipt,proto3" json:"receipt,omitempty"`
	// Response contains the opaque authenticated lookup response bytes.
	Response []byte `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
	// ResponseDigest binds the retained response bytes.
	ResponseDigest []byte `protobuf:"bytes,5,opt,name=response_digest,json=responseDigest,proto3" json:"responseDigest,omitempty"`
	// ConfigChainDigest identifies the verified lookup configuration.
	ConfigChainDigest []byte `protobuf:"bytes,6,opt,name=config_chain_digest,json=configChainDigest,proto3" json:"configChainDigest,omitempty"`
	// contains filtered or unexported fields
}

SOJournalLookup records one serialized exact-key receipt lookup.

func (*SOJournalLookup) CloneMessageVT added in v0.56.1

func (m *SOJournalLookup) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOJournalLookup) CloneVT added in v0.56.1

func (m *SOJournalLookup) CloneVT() *SOJournalLookup

func (*SOJournalLookup) EqualMessageVT added in v0.56.1

func (this *SOJournalLookup) EqualMessageVT(thatMsg any) bool

func (*SOJournalLookup) EqualVT added in v0.56.1

func (this *SOJournalLookup) EqualVT(that *SOJournalLookup) bool

func (*SOJournalLookup) GetConfigChainDigest added in v0.56.1

func (x *SOJournalLookup) GetConfigChainDigest() []byte

func (*SOJournalLookup) GetKey added in v0.56.1

func (x *SOJournalLookup) GetKey() *SOMutationKey

func (*SOJournalLookup) GetReceipt added in v0.56.1

func (x *SOJournalLookup) GetReceipt() *SOJournalReceipt

func (*SOJournalLookup) GetResponse added in v0.56.1

func (x *SOJournalLookup) GetResponse() []byte

func (*SOJournalLookup) GetResponseDigest added in v0.56.1

func (x *SOJournalLookup) GetResponseDigest() []byte

func (*SOJournalLookup) GetState added in v0.56.1

func (x *SOJournalLookup) GetState() SOReceiptState

func (*SOJournalLookup) MarshalJSON added in v0.56.1

func (x *SOJournalLookup) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalLookup to JSON.

func (*SOJournalLookup) MarshalProtoJSON added in v0.56.1

func (x *SOJournalLookup) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalLookup message to JSON.

func (*SOJournalLookup) MarshalProtoText added in v0.56.1

func (x *SOJournalLookup) MarshalProtoText() string

func (*SOJournalLookup) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalLookup) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalLookup) MarshalToVT added in v0.56.1

func (m *SOJournalLookup) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalLookup) MarshalVT added in v0.56.1

func (m *SOJournalLookup) MarshalVT() (dAtA []byte, err error)

func (*SOJournalLookup) ProtoMessage added in v0.56.1

func (*SOJournalLookup) ProtoMessage()

func (*SOJournalLookup) Reset added in v0.56.1

func (x *SOJournalLookup) Reset()

func (*SOJournalLookup) SizeVT added in v0.56.1

func (m *SOJournalLookup) SizeVT() (n int)

func (*SOJournalLookup) String added in v0.56.1

func (x *SOJournalLookup) String() string

func (*SOJournalLookup) UnmarshalJSON added in v0.56.1

func (x *SOJournalLookup) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalLookup from JSON.

func (*SOJournalLookup) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalLookup) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalLookup message from JSON.

func (*SOJournalLookup) UnmarshalVT added in v0.56.1

func (m *SOJournalLookup) UnmarshalVT(dAtA []byte) error

type SOJournalOutcome added in v0.56.1

type SOJournalOutcome int32

SOJournalOutcome identifies the authenticated terminal result of an attempt.

const (
	SOJournalOutcome_SO_JOURNAL_OUTCOME_UNSPECIFIED SOJournalOutcome = 0
	SOJournalOutcome_SO_JOURNAL_OUTCOME_ACCEPTED    SOJournalOutcome = 1
	SOJournalOutcome_SO_JOURNAL_OUTCOME_REJECTED    SOJournalOutcome = 2
)

func (SOJournalOutcome) Enum added in v0.56.1

func (SOJournalOutcome) MarshalJSON added in v0.56.1

func (x SOJournalOutcome) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalOutcome to JSON.

func (SOJournalOutcome) MarshalProtoJSON added in v0.56.1

func (x SOJournalOutcome) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalOutcome to JSON.

func (SOJournalOutcome) MarshalProtoText added in v0.56.1

func (x SOJournalOutcome) MarshalProtoText() string

func (SOJournalOutcome) MarshalText added in v0.56.1

func (x SOJournalOutcome) MarshalText() ([]byte, error)

MarshalText marshals the SOJournalOutcome to text.

func (SOJournalOutcome) String added in v0.56.1

func (x SOJournalOutcome) String() string

func (*SOJournalOutcome) UnmarshalJSON added in v0.56.1

func (x *SOJournalOutcome) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalOutcome from JSON.

func (*SOJournalOutcome) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalOutcome) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalOutcome from JSON.

func (*SOJournalOutcome) UnmarshalText added in v0.56.1

func (x *SOJournalOutcome) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOJournalOutcome from text.

type SOJournalProjection added in v0.56.1

type SOJournalProjection struct {

	// Key identifies the projected attempt.
	Key *SOMutationKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// ReceiptDigest binds projection to the terminal receipt.
	ReceiptDigest []byte `protobuf:"bytes,2,opt,name=receipt_digest,json=receiptDigest,proto3" json:"receiptDigest,omitempty"`
	// AuthoritativeRootSeqno is the exact root sequence projected by the body.
	AuthoritativeRootSeqno uint64 `` /* 128-byte string literal not displayed */
	// AuthoritativeRootDigest is the exact root identity projected by the body.
	AuthoritativeRootDigest []byte `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

SOJournalProjection records the body's exact authoritative-root observation.

func (*SOJournalProjection) CloneMessageVT added in v0.56.1

func (*SOJournalProjection) CloneVT added in v0.56.1

func (*SOJournalProjection) EqualMessageVT added in v0.56.1

func (this *SOJournalProjection) EqualMessageVT(thatMsg any) bool

func (*SOJournalProjection) EqualVT added in v0.56.1

func (this *SOJournalProjection) EqualVT(that *SOJournalProjection) bool

func (*SOJournalProjection) GetAuthoritativeRootDigest added in v0.56.1

func (x *SOJournalProjection) GetAuthoritativeRootDigest() []byte

func (*SOJournalProjection) GetAuthoritativeRootSeqno added in v0.56.1

func (x *SOJournalProjection) GetAuthoritativeRootSeqno() uint64

func (*SOJournalProjection) GetKey added in v0.56.1

func (x *SOJournalProjection) GetKey() *SOMutationKey

func (*SOJournalProjection) GetReceiptDigest added in v0.56.1

func (x *SOJournalProjection) GetReceiptDigest() []byte

func (*SOJournalProjection) MarshalJSON added in v0.56.1

func (x *SOJournalProjection) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalProjection to JSON.

func (*SOJournalProjection) MarshalProtoJSON added in v0.56.1

func (x *SOJournalProjection) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalProjection message to JSON.

func (*SOJournalProjection) MarshalProtoText added in v0.56.1

func (x *SOJournalProjection) MarshalProtoText() string

func (*SOJournalProjection) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalProjection) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalProjection) MarshalToVT added in v0.56.1

func (m *SOJournalProjection) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalProjection) MarshalVT added in v0.56.1

func (m *SOJournalProjection) MarshalVT() (dAtA []byte, err error)

func (*SOJournalProjection) ProtoMessage added in v0.56.1

func (*SOJournalProjection) ProtoMessage()

func (*SOJournalProjection) Reset added in v0.56.1

func (x *SOJournalProjection) Reset()

func (*SOJournalProjection) SizeVT added in v0.56.1

func (m *SOJournalProjection) SizeVT() (n int)

func (*SOJournalProjection) String added in v0.56.1

func (x *SOJournalProjection) String() string

func (*SOJournalProjection) UnmarshalJSON added in v0.56.1

func (x *SOJournalProjection) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalProjection from JSON.

func (*SOJournalProjection) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalProjection) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalProjection message from JSON.

func (*SOJournalProjection) UnmarshalVT added in v0.56.1

func (m *SOJournalProjection) UnmarshalVT(dAtA []byte) error

type SOJournalReadiness added in v0.56.1

type SOJournalReadiness int32

SOJournalReadiness identifies whether the body owner can supply dependencies.

const (
	SOJournalReadiness_SO_JOURNAL_READINESS_UNSPECIFIED SOJournalReadiness = 0
	SOJournalReadiness_SO_JOURNAL_READINESS_READY       SOJournalReadiness = 1
	SOJournalReadiness_SO_JOURNAL_READINESS_MISSING     SOJournalReadiness = 2
	SOJournalReadiness_SO_JOURNAL_READINESS_CORRUPT     SOJournalReadiness = 3
	SOJournalReadiness_SO_JOURNAL_READINESS_OBSOLETE    SOJournalReadiness = 4
)

func (SOJournalReadiness) Enum added in v0.56.1

func (SOJournalReadiness) MarshalJSON added in v0.56.1

func (x SOJournalReadiness) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalReadiness to JSON.

func (SOJournalReadiness) MarshalProtoJSON added in v0.56.1

func (x SOJournalReadiness) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalReadiness to JSON.

func (SOJournalReadiness) MarshalProtoText added in v0.56.1

func (x SOJournalReadiness) MarshalProtoText() string

func (SOJournalReadiness) MarshalText added in v0.56.1

func (x SOJournalReadiness) MarshalText() ([]byte, error)

MarshalText marshals the SOJournalReadiness to text.

func (SOJournalReadiness) String added in v0.56.1

func (x SOJournalReadiness) String() string

func (*SOJournalReadiness) UnmarshalJSON added in v0.56.1

func (x *SOJournalReadiness) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalReadiness from JSON.

func (*SOJournalReadiness) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalReadiness) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalReadiness from JSON.

func (*SOJournalReadiness) UnmarshalText added in v0.56.1

func (x *SOJournalReadiness) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOJournalReadiness from text.

type SOJournalReceipt added in v0.56.1

type SOJournalReceipt struct {

	// Key identifies the exact terminal attempt.
	Key *SOMutationKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// EnvelopeDigest binds the receipt to the immutable signed envelope using DigestSOOperationEnvelope.
	EnvelopeDigest []byte `protobuf:"bytes,2,opt,name=envelope_digest,json=envelopeDigest,proto3" json:"envelopeDigest,omitempty"`
	// Outcome is the authenticated terminal result.
	Outcome SOJournalOutcome `protobuf:"varint,3,opt,name=outcome,proto3" json:"outcome,omitempty"`
	// TerminalReceipt contains the verified signed remote receipt.
	TerminalReceipt []byte `protobuf:"bytes,4,opt,name=terminal_receipt,json=terminalReceipt,proto3" json:"terminalReceipt,omitempty"`
	// TerminalReceiptDigest is DigestSOTerminalReceipt over the durable signed receipt bytes.
	TerminalReceiptDigest []byte `protobuf:"bytes,5,opt,name=terminal_receipt_digest,json=terminalReceiptDigest,proto3" json:"terminalReceiptDigest,omitempty"`
	// AuthoritativeRootSeqno is the root sequence named by the receipt.
	AuthoritativeRootSeqno uint64 `` /* 128-byte string literal not displayed */
	// AuthoritativeRootDigest is DigestSOAuthoritativeRoot of the root named by the receipt.
	AuthoritativeRootDigest []byte `` /* 130-byte string literal not displayed */
	// ConfigChainDigest identifies the matching historical SharedObjectConfig.config_chain_hash.
	ConfigChainDigest []byte `protobuf:"bytes,8,opt,name=config_chain_digest,json=configChainDigest,proto3" json:"configChainDigest,omitempty"`
	// TerminalUnixMillis is the remote terminal timestamp.
	TerminalUnixMillis uint64 `protobuf:"varint,9,opt,name=terminal_unix_millis,json=terminalUnixMillis,proto3" json:"terminalUnixMillis,omitempty"`
	// Supersedes links this receipt to a predecessor when applicable.
	Supersedes *SOMutationKey `protobuf:"bytes,10,opt,name=supersedes,proto3" json:"supersedes,omitempty"`
	// contains filtered or unexported fields
}

SOJournalReceipt records terminal evidence without making projection implicit.

func (*SOJournalReceipt) CloneMessageVT added in v0.56.1

func (m *SOJournalReceipt) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOJournalReceipt) CloneVT added in v0.56.1

func (m *SOJournalReceipt) CloneVT() *SOJournalReceipt

func (*SOJournalReceipt) EqualMessageVT added in v0.56.1

func (this *SOJournalReceipt) EqualMessageVT(thatMsg any) bool

func (*SOJournalReceipt) EqualVT added in v0.56.1

func (this *SOJournalReceipt) EqualVT(that *SOJournalReceipt) bool

func (*SOJournalReceipt) GetAuthoritativeRootDigest added in v0.56.1

func (x *SOJournalReceipt) GetAuthoritativeRootDigest() []byte

func (*SOJournalReceipt) GetAuthoritativeRootSeqno added in v0.56.1

func (x *SOJournalReceipt) GetAuthoritativeRootSeqno() uint64

func (*SOJournalReceipt) GetConfigChainDigest added in v0.56.1

func (x *SOJournalReceipt) GetConfigChainDigest() []byte

func (*SOJournalReceipt) GetEnvelopeDigest added in v0.56.1

func (x *SOJournalReceipt) GetEnvelopeDigest() []byte

func (*SOJournalReceipt) GetKey added in v0.56.1

func (x *SOJournalReceipt) GetKey() *SOMutationKey

func (*SOJournalReceipt) GetOutcome added in v0.56.1

func (x *SOJournalReceipt) GetOutcome() SOJournalOutcome

func (*SOJournalReceipt) GetSupersedes added in v0.56.1

func (x *SOJournalReceipt) GetSupersedes() *SOMutationKey

func (*SOJournalReceipt) GetTerminalReceipt added in v0.56.1

func (x *SOJournalReceipt) GetTerminalReceipt() []byte

func (*SOJournalReceipt) GetTerminalReceiptDigest added in v0.56.1

func (x *SOJournalReceipt) GetTerminalReceiptDigest() []byte

func (*SOJournalReceipt) GetTerminalUnixMillis added in v0.56.1

func (x *SOJournalReceipt) GetTerminalUnixMillis() uint64

func (*SOJournalReceipt) MarshalJSON added in v0.56.1

func (x *SOJournalReceipt) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalReceipt to JSON.

func (*SOJournalReceipt) MarshalProtoJSON added in v0.56.1

func (x *SOJournalReceipt) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalReceipt message to JSON.

func (*SOJournalReceipt) MarshalProtoText added in v0.56.1

func (x *SOJournalReceipt) MarshalProtoText() string

func (*SOJournalReceipt) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalReceipt) MarshalToVT added in v0.56.1

func (m *SOJournalReceipt) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalReceipt) MarshalVT added in v0.56.1

func (m *SOJournalReceipt) MarshalVT() (dAtA []byte, err error)

func (*SOJournalReceipt) ProtoMessage added in v0.56.1

func (*SOJournalReceipt) ProtoMessage()

func (*SOJournalReceipt) Reset added in v0.56.1

func (x *SOJournalReceipt) Reset()

func (*SOJournalReceipt) SizeVT added in v0.56.1

func (m *SOJournalReceipt) SizeVT() (n int)

func (*SOJournalReceipt) String added in v0.56.1

func (x *SOJournalReceipt) String() string

func (*SOJournalReceipt) UnmarshalJSON added in v0.56.1

func (x *SOJournalReceipt) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalReceipt from JSON.

func (*SOJournalReceipt) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalReceipt) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalReceipt message from JSON.

func (*SOJournalReceipt) UnmarshalVT added in v0.56.1

func (m *SOJournalReceipt) UnmarshalVT(dAtA []byte) error

type SOJournalRecord added in v0.56.1

type SOJournalRecord struct {

	// FormatVersion identifies the journal payload schema.
	FormatVersion uint32 `protobuf:"varint,1,opt,name=format_version,json=formatVersion,proto3" json:"formatVersion,omitempty"`
	// Sequence is the strictly increasing journal record sequence.
	Sequence uint64 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// Kind identifies which durable transition this record represents.
	Kind SOJournalRecordKind `protobuf:"varint,3,opt,name=kind,proto3" json:"kind,omitempty"`
	// Key is the immutable exact mutation identity.
	Key *SOMutationKey `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	// Lineage carries the immutable supersession relation.
	Lineage *SOJournalLineage `protobuf:"bytes,5,opt,name=lineage,proto3" json:"lineage,omitempty"`
	// Version carries local/remote and transform observations.
	Version *SOJournalVersionTuple `protobuf:"bytes,6,opt,name=version,proto3" json:"version,omitempty"`
	// Intent is encrypted canonical intent for an intent record.
	Intent *SOJournalEncryptedPayload `protobuf:"bytes,7,opt,name=intent,proto3" json:"intent,omitempty"`
	// Envelope is encrypted immutable signed bytes for an envelope record.
	Envelope *SOJournalEncryptedPayload `protobuf:"bytes,8,opt,name=envelope,proto3" json:"envelope,omitempty"`
	// Receipt is terminal evidence for a receipt record.
	Receipt *SOJournalReceipt `protobuf:"bytes,9,opt,name=receipt,proto3" json:"receipt,omitempty"`
	// Acknowledgement is remote receipt acknowledgement.
	Acknowledgement *SOJournalAcknowledgement `protobuf:"bytes,10,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"`
	// Projection is the body owner's exact-root observation.
	Projection *SOJournalProjection `protobuf:"bytes,11,opt,name=projection,proto3" json:"projection,omitempty"`
	// Readiness is the body-owned preparation result.
	Readiness SOJournalReadiness `protobuf:"varint,12,opt,name=readiness,proto3" json:"readiness,omitempty"`
	// RecoveryReason carries a typed recovery stop.
	RecoveryReason SOJournalRecoveryReason `protobuf:"varint,13,opt,name=recovery_reason,json=recoveryReason,proto3" json:"recoveryReason,omitempty"`
	// AttemptState records the legal lifecycle state after this transition.
	AttemptState SOJournalAttemptState `protobuf:"varint,14,opt,name=attempt_state,json=attemptState,proto3" json:"attemptState,omitempty"`
	// EnvelopeDigest identifies the immutable signed-envelope plaintext.
	EnvelopeDigest []byte `protobuf:"bytes,15,opt,name=envelope_digest,json=envelopeDigest,proto3" json:"envelopeDigest,omitempty"`
	// Lookup is the serialized exact-key receipt observation.
	Lookup *SOJournalLookup `protobuf:"bytes,16,opt,name=lookup,proto3" json:"lookup,omitempty"`
	// contains filtered or unexported fields
}

SOJournalRecord is the generated body-neutral durable journal payload.

func NewJournalAcknowledgementRecord added in v0.56.1

func NewJournalAcknowledgementRecord(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple, acknowledgement *SOJournalAcknowledgement) *SOJournalRecord

NewJournalAcknowledgementRecord records acknowledgement without changing receipt evidence.

func NewJournalEnvelopeRecord added in v0.56.1

func NewJournalEnvelopeRecord(crypto *JournalCrypto, sequence uint64, intent *SOJournalIntent, envelope, identity []byte) (*SOJournalRecord, error)

NewJournalEnvelopeRecord encrypts immutable signed-envelope bytes for durable append.

func NewJournalIntentRecord added in v0.56.1

func NewJournalIntentRecord(crypto *JournalCrypto, sequence uint64, intent *SOJournalIntent, readiness SOJournalReadiness, identity []byte) (*SOJournalRecord, error)

NewJournalIntentRecord encrypts and wraps a canonical intent for durable append.

func NewJournalLineageRecoveryBlockedRecord added in v0.56.1

func NewJournalLineageRecoveryBlockedRecord(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple, reasons ...SOJournalRecoveryReason) *SOJournalRecord

NewJournalLineageRecoveryBlockedRecord preserves a stale attempt while parking its logical lineage when no body-authorized successor can be created.

func NewJournalProjectionRecord added in v0.56.1

func NewJournalProjectionRecord(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple, projection *SOJournalProjection) *SOJournalRecord

NewJournalProjectionRecord records the exact authoritative root projected by the body.

func NewJournalReceiptLookupRecord added in v0.56.1

func NewJournalReceiptLookupRecord(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple, lookup *SOJournalLookup) *SOJournalRecord

NewJournalReceiptLookupRecord records an exact-key receipt observation before any recovered resend.

func NewJournalReceiptRecord added in v0.56.1

func NewJournalReceiptRecord(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple, receipt *SOJournalReceipt) *SOJournalRecord

NewJournalReceiptRecord records verified terminal remote evidence.

func NewJournalRecoveryBlockedRecord added in v0.56.1

func NewJournalRecoveryBlockedRecord(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple, reason SOJournalRecoveryReason) *SOJournalRecord

NewJournalRecoveryBlockedRecord records a typed authority or body recovery stop.

func NewJournalResendAuthorizedRecord added in v0.56.1

func NewJournalResendAuthorizedRecord(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple) *SOJournalRecord

NewJournalResendAuthorizedRecord records an authoritative no-record lookup.

func NewJournalStaleEpochRecord added in v0.56.1

func NewJournalStaleEpochRecord(key *SOMutationKey, lineage *SOJournalLineage, version *SOJournalVersionTuple) *SOJournalRecord

NewJournalStaleEpochRecord terminates one exact attempt after verified epoch mismatch.

func (*SOJournalRecord) CloneMessageVT added in v0.56.1

func (m *SOJournalRecord) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOJournalRecord) CloneVT added in v0.56.1

func (m *SOJournalRecord) CloneVT() *SOJournalRecord

func (*SOJournalRecord) EqualMessageVT added in v0.56.1

func (this *SOJournalRecord) EqualMessageVT(thatMsg any) bool

func (*SOJournalRecord) EqualVT added in v0.56.1

func (this *SOJournalRecord) EqualVT(that *SOJournalRecord) bool

func (*SOJournalRecord) GetAcknowledgement added in v0.56.1

func (x *SOJournalRecord) GetAcknowledgement() *SOJournalAcknowledgement

func (*SOJournalRecord) GetAttemptState added in v0.56.1

func (x *SOJournalRecord) GetAttemptState() SOJournalAttemptState

func (*SOJournalRecord) GetEnvelope added in v0.56.1

func (x *SOJournalRecord) GetEnvelope() *SOJournalEncryptedPayload

func (*SOJournalRecord) GetEnvelopeDigest added in v0.56.1

func (x *SOJournalRecord) GetEnvelopeDigest() []byte

func (*SOJournalRecord) GetFormatVersion added in v0.56.1

func (x *SOJournalRecord) GetFormatVersion() uint32

func (*SOJournalRecord) GetIntent added in v0.56.1

func (*SOJournalRecord) GetKey added in v0.56.1

func (x *SOJournalRecord) GetKey() *SOMutationKey

func (*SOJournalRecord) GetKind added in v0.56.1

func (x *SOJournalRecord) GetKind() SOJournalRecordKind

func (*SOJournalRecord) GetLineage added in v0.56.1

func (x *SOJournalRecord) GetLineage() *SOJournalLineage

func (*SOJournalRecord) GetLookup added in v0.56.1

func (x *SOJournalRecord) GetLookup() *SOJournalLookup

func (*SOJournalRecord) GetProjection added in v0.56.1

func (x *SOJournalRecord) GetProjection() *SOJournalProjection

func (*SOJournalRecord) GetReadiness added in v0.56.1

func (x *SOJournalRecord) GetReadiness() SOJournalReadiness

func (*SOJournalRecord) GetReceipt added in v0.56.1

func (x *SOJournalRecord) GetReceipt() *SOJournalReceipt

func (*SOJournalRecord) GetRecoveryReason added in v0.56.1

func (x *SOJournalRecord) GetRecoveryReason() SOJournalRecoveryReason

func (*SOJournalRecord) GetSequence added in v0.56.1

func (x *SOJournalRecord) GetSequence() uint64

func (*SOJournalRecord) GetVersion added in v0.56.1

func (x *SOJournalRecord) GetVersion() *SOJournalVersionTuple

func (*SOJournalRecord) MarshalJSON added in v0.56.1

func (x *SOJournalRecord) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalRecord to JSON.

func (*SOJournalRecord) MarshalProtoJSON added in v0.56.1

func (x *SOJournalRecord) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalRecord message to JSON.

func (*SOJournalRecord) MarshalProtoText added in v0.56.1

func (x *SOJournalRecord) MarshalProtoText() string

func (*SOJournalRecord) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalRecord) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalRecord) MarshalToVT added in v0.56.1

func (m *SOJournalRecord) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalRecord) MarshalVT added in v0.56.1

func (m *SOJournalRecord) MarshalVT() (dAtA []byte, err error)

func (*SOJournalRecord) ProtoMessage added in v0.56.1

func (*SOJournalRecord) ProtoMessage()

func (*SOJournalRecord) Reset added in v0.56.1

func (x *SOJournalRecord) Reset()

func (*SOJournalRecord) SizeVT added in v0.56.1

func (m *SOJournalRecord) SizeVT() (n int)

func (*SOJournalRecord) String added in v0.56.1

func (x *SOJournalRecord) String() string

func (*SOJournalRecord) UnmarshalJSON added in v0.56.1

func (x *SOJournalRecord) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalRecord from JSON.

func (*SOJournalRecord) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalRecord) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalRecord message from JSON.

func (*SOJournalRecord) UnmarshalVT added in v0.56.1

func (m *SOJournalRecord) UnmarshalVT(dAtA []byte) error

type SOJournalRecordKind added in v0.56.1

type SOJournalRecordKind int32

SOJournalRecordKind identifies the durable event in a mutation journal.

const (
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_UNSPECIFIED              SOJournalRecordKind = 0
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_INTENT                   SOJournalRecordKind = 1
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_SIGNED_ENVELOPE          SOJournalRecordKind = 2
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_SENT                     SOJournalRecordKind = 3
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_RECEIPT                  SOJournalRecordKind = 4
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_ACKNOWLEDGEMENT          SOJournalRecordKind = 5
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_BODY_PROJECTION          SOJournalRecordKind = 6
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_STALE_TRANSFORM_EPOCH    SOJournalRecordKind = 7
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_RECOVERY_BLOCKED         SOJournalRecordKind = 8
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_LINEAGE_RECOVERY_BLOCKED SOJournalRecordKind = 9
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_RECEIPT_LOOKUP           SOJournalRecordKind = 10
	SOJournalRecordKind_SO_JOURNAL_RECORD_KIND_RESEND_AUTHORIZED        SOJournalRecordKind = 11
)

func (SOJournalRecordKind) Enum added in v0.56.1

func (SOJournalRecordKind) MarshalJSON added in v0.56.1

func (x SOJournalRecordKind) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalRecordKind to JSON.

func (SOJournalRecordKind) MarshalProtoJSON added in v0.56.1

func (x SOJournalRecordKind) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalRecordKind to JSON.

func (SOJournalRecordKind) MarshalProtoText added in v0.56.1

func (x SOJournalRecordKind) MarshalProtoText() string

func (SOJournalRecordKind) MarshalText added in v0.56.1

func (x SOJournalRecordKind) MarshalText() ([]byte, error)

MarshalText marshals the SOJournalRecordKind to text.

func (SOJournalRecordKind) String added in v0.56.1

func (x SOJournalRecordKind) String() string

func (*SOJournalRecordKind) UnmarshalJSON added in v0.56.1

func (x *SOJournalRecordKind) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalRecordKind from JSON.

func (*SOJournalRecordKind) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalRecordKind) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalRecordKind from JSON.

func (*SOJournalRecordKind) UnmarshalText added in v0.56.1

func (x *SOJournalRecordKind) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOJournalRecordKind from text.

type SOJournalRecoveryReason added in v0.56.1

type SOJournalRecoveryReason int32

SOJournalRecoveryReason identifies a typed recovery stop.

const (
	SOJournalRecoveryReason_SO_JOURNAL_RECOVERY_REASON_UNSPECIFIED           SOJournalRecoveryReason = 0
	SOJournalRecoveryReason_SO_JOURNAL_RECOVERY_REASON_STALE_TRANSFORM_EPOCH SOJournalRecoveryReason = 1
	SOJournalRecoveryReason_SO_JOURNAL_RECOVERY_REASON_KEY_UNAVAILABLE       SOJournalRecoveryReason = 2
	SOJournalRecoveryReason_SO_JOURNAL_RECOVERY_REASON_AUTHORITY_FAILURE     SOJournalRecoveryReason = 3
	SOJournalRecoveryReason_SO_JOURNAL_RECOVERY_REASON_BODY_MISSING          SOJournalRecoveryReason = 4
	SOJournalRecoveryReason_SO_JOURNAL_RECOVERY_REASON_BODY_CORRUPT          SOJournalRecoveryReason = 5
	SOJournalRecoveryReason_SO_JOURNAL_RECOVERY_REASON_BODY_OBSOLETE         SOJournalRecoveryReason = 6
)

func (SOJournalRecoveryReason) Enum added in v0.56.1

func (SOJournalRecoveryReason) MarshalJSON added in v0.56.1

func (x SOJournalRecoveryReason) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalRecoveryReason to JSON.

func (SOJournalRecoveryReason) MarshalProtoJSON added in v0.56.1

func (x SOJournalRecoveryReason) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalRecoveryReason to JSON.

func (SOJournalRecoveryReason) MarshalProtoText added in v0.56.1

func (x SOJournalRecoveryReason) MarshalProtoText() string

func (SOJournalRecoveryReason) MarshalText added in v0.56.1

func (x SOJournalRecoveryReason) MarshalText() ([]byte, error)

MarshalText marshals the SOJournalRecoveryReason to text.

func (SOJournalRecoveryReason) String added in v0.56.1

func (x SOJournalRecoveryReason) String() string

func (*SOJournalRecoveryReason) UnmarshalJSON added in v0.56.1

func (x *SOJournalRecoveryReason) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalRecoveryReason from JSON.

func (*SOJournalRecoveryReason) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalRecoveryReason) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalRecoveryReason from JSON.

func (*SOJournalRecoveryReason) UnmarshalText added in v0.56.1

func (x *SOJournalRecoveryReason) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOJournalRecoveryReason from text.

type SOJournalVersionTuple added in v0.56.1

type SOJournalVersionTuple struct {

	// LocalVersion is the local journal version at preparation.
	LocalVersion uint64 `protobuf:"varint,1,opt,name=local_version,json=localVersion,proto3" json:"localVersion,omitempty"`
	// RemoteVersion is the authoritative remote version observed at preparation.
	RemoteVersion uint64 `protobuf:"varint,2,opt,name=remote_version,json=remoteVersion,proto3" json:"remoteVersion,omitempty"`
	// TransformEpoch is the verified transform epoch used by the envelope.
	TransformEpoch uint64 `protobuf:"varint,3,opt,name=transform_epoch,json=transformEpoch,proto3" json:"transformEpoch,omitempty"`
	// ConfigChainDigest identifies the verified configuration chain.
	ConfigChainDigest []byte `protobuf:"bytes,4,opt,name=config_chain_digest,json=configChainDigest,proto3" json:"configChainDigest,omitempty"`
	// contains filtered or unexported fields
}

SOJournalVersionTuple carries local and remote observations needed for replay.

func JournalVersion added in v0.56.1

func JournalVersion(localVersion, remoteVersion, transformEpoch uint64, configChainDigest []byte) *SOJournalVersionTuple

JournalVersion returns a copy of a version tuple for a new attempt.

func (*SOJournalVersionTuple) CloneMessageVT added in v0.56.1

func (*SOJournalVersionTuple) CloneVT added in v0.56.1

func (*SOJournalVersionTuple) EqualMessageVT added in v0.56.1

func (this *SOJournalVersionTuple) EqualMessageVT(thatMsg any) bool

func (*SOJournalVersionTuple) EqualVT added in v0.56.1

func (this *SOJournalVersionTuple) EqualVT(that *SOJournalVersionTuple) bool

func (*SOJournalVersionTuple) GetConfigChainDigest added in v0.56.1

func (x *SOJournalVersionTuple) GetConfigChainDigest() []byte

func (*SOJournalVersionTuple) GetLocalVersion added in v0.56.1

func (x *SOJournalVersionTuple) GetLocalVersion() uint64

func (*SOJournalVersionTuple) GetRemoteVersion added in v0.56.1

func (x *SOJournalVersionTuple) GetRemoteVersion() uint64

func (*SOJournalVersionTuple) GetTransformEpoch added in v0.56.1

func (x *SOJournalVersionTuple) GetTransformEpoch() uint64

func (*SOJournalVersionTuple) MarshalJSON added in v0.56.1

func (x *SOJournalVersionTuple) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOJournalVersionTuple to JSON.

func (*SOJournalVersionTuple) MarshalProtoJSON added in v0.56.1

func (x *SOJournalVersionTuple) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOJournalVersionTuple message to JSON.

func (*SOJournalVersionTuple) MarshalProtoText added in v0.56.1

func (x *SOJournalVersionTuple) MarshalProtoText() string

func (*SOJournalVersionTuple) MarshalToSizedBufferVT added in v0.56.1

func (m *SOJournalVersionTuple) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOJournalVersionTuple) MarshalToVT added in v0.56.1

func (m *SOJournalVersionTuple) MarshalToVT(dAtA []byte) (int, error)

func (*SOJournalVersionTuple) MarshalVT added in v0.56.1

func (m *SOJournalVersionTuple) MarshalVT() (dAtA []byte, err error)

func (*SOJournalVersionTuple) ProtoMessage added in v0.56.1

func (*SOJournalVersionTuple) ProtoMessage()

func (*SOJournalVersionTuple) Reset added in v0.56.1

func (x *SOJournalVersionTuple) Reset()

func (*SOJournalVersionTuple) SizeVT added in v0.56.1

func (m *SOJournalVersionTuple) SizeVT() (n int)

func (*SOJournalVersionTuple) String added in v0.56.1

func (x *SOJournalVersionTuple) String() string

func (*SOJournalVersionTuple) UnmarshalJSON added in v0.56.1

func (x *SOJournalVersionTuple) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOJournalVersionTuple from JSON.

func (*SOJournalVersionTuple) UnmarshalProtoJSON added in v0.56.1

func (x *SOJournalVersionTuple) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOJournalVersionTuple message from JSON.

func (*SOJournalVersionTuple) UnmarshalVT added in v0.56.1

func (m *SOJournalVersionTuple) UnmarshalVT(dAtA []byte) error

type SOKeyEpoch

type SOKeyEpoch struct {

	// Epoch is the epoch number (0-based, increments on rotation).
	Epoch uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
	// SeqnoStart is the first root seqno this key covers.
	SeqnoStart uint64 `protobuf:"varint,2,opt,name=seqno_start,json=seqnoStart,proto3" json:"seqnoStart,omitempty"`
	// SeqnoEnd is the last root seqno this key covers (0 = current/open).
	SeqnoEnd uint64 `protobuf:"varint,3,opt,name=seqno_end,json=seqnoEnd,proto3" json:"seqnoEnd,omitempty"`
	// Grants are the encrypted transform key grants for this epoch.
	Grants []*SOGrant `protobuf:"bytes,4,rep,name=grants,proto3" json:"grants,omitempty"`
	// contains filtered or unexported fields
}

SOKeyEpoch represents a key epoch with grants for that period.

func FindCoveringEpoch

func FindCoveringEpoch(epochs []*SOKeyEpoch, seqno uint64) *SOKeyEpoch

FindCoveringEpoch finds the key epoch that covers the given seqno. Returns nil if no epoch covers the seqno.

func (*SOKeyEpoch) CloneMessageVT

func (m *SOKeyEpoch) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOKeyEpoch) CloneVT

func (m *SOKeyEpoch) CloneVT() *SOKeyEpoch

func (*SOKeyEpoch) EqualMessageVT

func (this *SOKeyEpoch) EqualMessageVT(thatMsg any) bool

func (*SOKeyEpoch) EqualVT

func (this *SOKeyEpoch) EqualVT(that *SOKeyEpoch) bool

func (*SOKeyEpoch) GetEpoch

func (x *SOKeyEpoch) GetEpoch() uint64

func (*SOKeyEpoch) GetGrants

func (x *SOKeyEpoch) GetGrants() []*SOGrant

func (*SOKeyEpoch) GetSeqnoEnd

func (x *SOKeyEpoch) GetSeqnoEnd() uint64

func (*SOKeyEpoch) GetSeqnoStart

func (x *SOKeyEpoch) GetSeqnoStart() uint64

func (*SOKeyEpoch) MarshalJSON

func (x *SOKeyEpoch) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOKeyEpoch to JSON.

func (*SOKeyEpoch) MarshalProtoJSON

func (x *SOKeyEpoch) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOKeyEpoch message to JSON.

func (*SOKeyEpoch) MarshalProtoText

func (x *SOKeyEpoch) MarshalProtoText() string

func (*SOKeyEpoch) MarshalToSizedBufferVT

func (m *SOKeyEpoch) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOKeyEpoch) MarshalToVT

func (m *SOKeyEpoch) MarshalToVT(dAtA []byte) (int, error)

func (*SOKeyEpoch) MarshalVT

func (m *SOKeyEpoch) MarshalVT() (dAtA []byte, err error)

func (*SOKeyEpoch) ProtoMessage

func (*SOKeyEpoch) ProtoMessage()

func (*SOKeyEpoch) Reset

func (x *SOKeyEpoch) Reset()

func (*SOKeyEpoch) SizeVT

func (m *SOKeyEpoch) SizeVT() (n int)

func (*SOKeyEpoch) String

func (x *SOKeyEpoch) String() string

func (*SOKeyEpoch) UnmarshalJSON

func (x *SOKeyEpoch) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOKeyEpoch from JSON.

func (*SOKeyEpoch) UnmarshalProtoJSON

func (x *SOKeyEpoch) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOKeyEpoch message from JSON.

func (*SOKeyEpoch) UnmarshalVT

func (m *SOKeyEpoch) UnmarshalVT(dAtA []byte) error

type SOMutationKey added in v0.56.1

type SOMutationKey struct {

	// OriginScopeId is the stable opaque account/store scope identifier.
	OriginScopeId []byte `protobuf:"bytes,1,opt,name=origin_scope_id,json=originScopeId,proto3" json:"originScopeId,omitempty"`
	// SharedObjectId is the object identity within the origin scope.
	SharedObjectId string `protobuf:"bytes,2,opt,name=shared_object_id,json=sharedObjectId,proto3" json:"sharedObjectId,omitempty"`
	// ParticipantPeerId is the submitting participant identity.
	ParticipantPeerId string `protobuf:"bytes,3,opt,name=participant_peer_id,json=participantPeerId,proto3" json:"participantPeerId,omitempty"`
	// LocalId is allocated once for this exact attempt.
	LocalId string `protobuf:"bytes,4,opt,name=local_id,json=localId,proto3" json:"localId,omitempty"`
	// contains filtered or unexported fields
}

SOMutationKey identifies one immutable exact participant attempt.

func NewSOMutationKey added in v0.56.1

func NewSOMutationKey(originScopeID []byte, sharedObjectID, participantPeerID, localID string) (*SOMutationKey, error)

NewSOMutationKey constructs the immutable identity for one exact attempt.

func (*SOMutationKey) CloneMessageVT added in v0.56.1

func (m *SOMutationKey) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOMutationKey) CloneVT added in v0.56.1

func (m *SOMutationKey) CloneVT() *SOMutationKey

func (*SOMutationKey) EqualExact added in v0.56.1

func (k *SOMutationKey) EqualExact(other *SOMutationKey) bool

EqualExact compares every identity component, including the origin scope.

func (*SOMutationKey) EqualMessageVT added in v0.56.1

func (this *SOMutationKey) EqualMessageVT(thatMsg any) bool

func (*SOMutationKey) EqualVT added in v0.56.1

func (this *SOMutationKey) EqualVT(that *SOMutationKey) bool

func (*SOMutationKey) GetLocalId added in v0.56.1

func (x *SOMutationKey) GetLocalId() string

func (*SOMutationKey) GetOriginScopeId added in v0.56.1

func (x *SOMutationKey) GetOriginScopeId() []byte

func (*SOMutationKey) GetParticipantPeerId added in v0.56.1

func (x *SOMutationKey) GetParticipantPeerId() string

func (*SOMutationKey) GetSharedObjectId added in v0.56.1

func (x *SOMutationKey) GetSharedObjectId() string

func (*SOMutationKey) MarshalJSON added in v0.56.1

func (x *SOMutationKey) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOMutationKey to JSON.

func (*SOMutationKey) MarshalProtoJSON added in v0.56.1

func (x *SOMutationKey) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOMutationKey message to JSON.

func (*SOMutationKey) MarshalProtoText added in v0.56.1

func (x *SOMutationKey) MarshalProtoText() string

func (*SOMutationKey) MarshalToSizedBufferVT added in v0.56.1

func (m *SOMutationKey) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOMutationKey) MarshalToVT added in v0.56.1

func (m *SOMutationKey) MarshalToVT(dAtA []byte) (int, error)

func (*SOMutationKey) MarshalVT added in v0.56.1

func (m *SOMutationKey) MarshalVT() (dAtA []byte, err error)

func (*SOMutationKey) ProtoMessage added in v0.56.1

func (*SOMutationKey) ProtoMessage()

func (*SOMutationKey) Reset added in v0.56.1

func (x *SOMutationKey) Reset()

func (*SOMutationKey) SizeVT added in v0.56.1

func (m *SOMutationKey) SizeVT() (n int)

func (*SOMutationKey) String added in v0.56.1

func (x *SOMutationKey) String() string

func (*SOMutationKey) UnmarshalJSON added in v0.56.1

func (x *SOMutationKey) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOMutationKey from JSON.

func (*SOMutationKey) UnmarshalProtoJSON added in v0.56.1

func (x *SOMutationKey) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOMutationKey message from JSON.

func (*SOMutationKey) UnmarshalVT added in v0.56.1

func (m *SOMutationKey) UnmarshalVT(dAtA []byte) error

func (*SOMutationKey) Validate added in v0.56.1

func (k *SOMutationKey) Validate() error

Validate checks the complete participant-scoped mutation identity.

type SOOperation

type SOOperation struct {

	// Inner is the encoded SOOperationInner object.
	Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"`
	// Signature is the signature of inner.
	// The signature public key must match the participant's peer_id.
	Signature *peer.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SOOperation represents an individual operation submitted by a participant.

func BuildSOOperation

func BuildSOOperation(
	sharedObjectID string,
	privKey crypto.PrivKey,
	opDataEnc []byte,
	opNonce uint64,
	opLocalID string,
) (*SOOperation, error)

BuildSOOperation constructs a new SOOperation for a writer or validator. The privKey must belong to a writer or validator participant. opDataEnc should be opData encoded with the root state transform.

func FilterResolvedOperations

func FilterResolvedOperations(
	ops []*SOOperation,
	accountNonces []*SOAccountNonce,
	acceptedOps []*SOOperationInner,
	rejections []*SOPeerOpRejections,
) []*SOOperation

FilterResolvedOperations removes pending ops already resolved by root account nonces, explicitly accepted operations, or recorded rejections. acceptedOps may be nil when the caller only needs root/rejection pruning.

func (*SOOperation) CloneMessageVT

func (m *SOOperation) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOOperation) CloneVT

func (m *SOOperation) CloneVT() *SOOperation

func (*SOOperation) EqualMessageVT

func (this *SOOperation) EqualMessageVT(thatMsg any) bool

func (*SOOperation) EqualVT

func (this *SOOperation) EqualVT(that *SOOperation) bool

func (*SOOperation) GetInner

func (x *SOOperation) GetInner() []byte

func (*SOOperation) GetSignature

func (x *SOOperation) GetSignature() *peer.Signature

func (*SOOperation) MarshalJSON

func (x *SOOperation) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOOperation to JSON.

func (*SOOperation) MarshalProtoJSON

func (x *SOOperation) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOOperation message to JSON.

func (*SOOperation) MarshalProtoText

func (x *SOOperation) MarshalProtoText() string

func (*SOOperation) MarshalToSizedBufferVT

func (m *SOOperation) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperation) MarshalToVT

func (m *SOOperation) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperation) MarshalVT

func (m *SOOperation) MarshalVT() (dAtA []byte, err error)

func (*SOOperation) ProtoMessage

func (*SOOperation) ProtoMessage()

func (*SOOperation) Reset

func (x *SOOperation) Reset()

func (*SOOperation) SizeVT

func (m *SOOperation) SizeVT() (n int)

func (*SOOperation) String

func (x *SOOperation) String() string

func (*SOOperation) UnmarshalInner

func (op *SOOperation) UnmarshalInner() (*SOOperationInner, error)

UnmarshalInner unmarshals and verifies the SOOperationInner.

func (*SOOperation) UnmarshalJSON

func (x *SOOperation) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOOperation from JSON.

func (*SOOperation) UnmarshalProtoJSON

func (x *SOOperation) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOOperation message from JSON.

func (*SOOperation) UnmarshalVT

func (m *SOOperation) UnmarshalVT(dAtA []byte) error

func (*SOOperation) Validate

func (op *SOOperation) Validate() error

Validate performs cursory checks on the SOOperation.

func (*SOOperation) ValidateSignature

func (op *SOOperation) ValidateSignature(sharedObjectID string, participants []*SOParticipantConfig) error

ValidateSignature validates the signature on a SOOperation.

type SOOperationInner

type SOOperationInner struct {

	// PeerId is the identifier of the participant submitting the operation.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// LocalId is the locally-assigned ulid for the operation.
	// Must be a valid ulid.
	// Must be lower-case.
	LocalId string `protobuf:"bytes,2,opt,name=local_id,json=localId,proto3" json:"localId,omitempty"`
	// Nonce is the nonce for the operation; must increment from the previous.
	Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// OpData is the operation data, transformed with the same transform config as root.
	OpData []byte `protobuf:"bytes,4,opt,name=op_data,json=opData,proto3" json:"opData,omitempty"`
	// contains filtered or unexported fields
}

SOOperationInner is the inner message of SOOperation.

func (*SOOperationInner) CloneMessageVT

func (m *SOOperationInner) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOOperationInner) CloneVT

func (m *SOOperationInner) CloneVT() *SOOperationInner

func (*SOOperationInner) EqualMessageVT

func (this *SOOperationInner) EqualMessageVT(thatMsg any) bool

func (*SOOperationInner) EqualVT

func (this *SOOperationInner) EqualVT(that *SOOperationInner) bool

func (*SOOperationInner) GetLocalId

func (x *SOOperationInner) GetLocalId() string

func (*SOOperationInner) GetNonce

func (x *SOOperationInner) GetNonce() uint64

func (*SOOperationInner) GetOpData

func (x *SOOperationInner) GetOpData() []byte

func (*SOOperationInner) GetPeerId

func (x *SOOperationInner) GetPeerId() string

func (*SOOperationInner) MarshalJSON

func (x *SOOperationInner) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOOperationInner to JSON.

func (*SOOperationInner) MarshalProtoJSON

func (x *SOOperationInner) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOOperationInner message to JSON.

func (*SOOperationInner) MarshalProtoText

func (x *SOOperationInner) MarshalProtoText() string

func (*SOOperationInner) MarshalToSizedBufferVT

func (m *SOOperationInner) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperationInner) MarshalToVT

func (m *SOOperationInner) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperationInner) MarshalVT

func (m *SOOperationInner) MarshalVT() (dAtA []byte, err error)

func (*SOOperationInner) ParsePeerID

func (i *SOOperationInner) ParsePeerID() (peer.ID, error)

ParsePeerID parses the peer ID.

func (*SOOperationInner) ProtoMessage

func (*SOOperationInner) ProtoMessage()

func (*SOOperationInner) Reset

func (x *SOOperationInner) Reset()

func (*SOOperationInner) SizeVT

func (m *SOOperationInner) SizeVT() (n int)

func (*SOOperationInner) String

func (x *SOOperationInner) String() string

func (*SOOperationInner) UnmarshalJSON

func (x *SOOperationInner) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOOperationInner from JSON.

func (*SOOperationInner) UnmarshalProtoJSON

func (x *SOOperationInner) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOOperationInner message from JSON.

func (*SOOperationInner) UnmarshalVT

func (m *SOOperationInner) UnmarshalVT(dAtA []byte) error

func (*SOOperationInner) Validate

func (i *SOOperationInner) Validate() error

Validate performs cursory checks on the SOOperationInner.

type SOOperationRef

type SOOperationRef struct {

	// PeerId is the identifier of the participant submitting the operation.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// Nonce is the nonce for the operation.
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

SOOperationRef is a reference to an operation that was queued.

func (*SOOperationRef) CloneMessageVT

func (m *SOOperationRef) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOOperationRef) CloneVT

func (m *SOOperationRef) CloneVT() *SOOperationRef

func (*SOOperationRef) EqualMessageVT

func (this *SOOperationRef) EqualMessageVT(thatMsg any) bool

func (*SOOperationRef) EqualVT

func (this *SOOperationRef) EqualVT(that *SOOperationRef) bool

func (*SOOperationRef) GetNonce

func (x *SOOperationRef) GetNonce() uint64

func (*SOOperationRef) GetPeerId

func (x *SOOperationRef) GetPeerId() string

func (*SOOperationRef) MarshalJSON

func (x *SOOperationRef) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOOperationRef to JSON.

func (*SOOperationRef) MarshalProtoJSON

func (x *SOOperationRef) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOOperationRef message to JSON.

func (*SOOperationRef) MarshalProtoText

func (x *SOOperationRef) MarshalProtoText() string

func (*SOOperationRef) MarshalToSizedBufferVT

func (m *SOOperationRef) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperationRef) MarshalToVT

func (m *SOOperationRef) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperationRef) MarshalVT

func (m *SOOperationRef) MarshalVT() (dAtA []byte, err error)

func (*SOOperationRef) ParsePeerID

func (r *SOOperationRef) ParsePeerID() (peer.ID, error)

ParsePeerID parses the peer ID.

func (*SOOperationRef) ProtoMessage

func (*SOOperationRef) ProtoMessage()

func (*SOOperationRef) Reset

func (x *SOOperationRef) Reset()

func (*SOOperationRef) SizeVT

func (m *SOOperationRef) SizeVT() (n int)

func (*SOOperationRef) String

func (x *SOOperationRef) String() string

func (*SOOperationRef) UnmarshalJSON

func (x *SOOperationRef) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOOperationRef from JSON.

func (*SOOperationRef) UnmarshalProtoJSON

func (x *SOOperationRef) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOOperationRef message from JSON.

func (*SOOperationRef) UnmarshalVT

func (m *SOOperationRef) UnmarshalVT(dAtA []byte) error

func (*SOOperationRef) Validate

func (r *SOOperationRef) Validate() error

Validate validates the SOOperationRef.

type SOOperationRejection

type SOOperationRejection struct {

	// Inner is the encoded SOOperationRejectionInner object.
	Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"`
	// Signature is the signature of inner by the validator.
	// The pub key must match the peer id of a valid validator.
	Signature *peer.Signature `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

SOOperationRejection represents the rejection of an operation by a validator. This tracks rejected operations until the participant acknowledges them.

func BuildSOOperationRejection

func BuildSOOperationRejection(
	privKey crypto.PrivKey,
	sharedObjectID string,
	submitterPeerID peer.ID,
	opNonce uint64,
	opLocalID string,
	errorDetails *SOOperationRejectionErrorDetails,
) (*SOOperationRejection, error)

BuildSOOperationRejection constructs a new SOOperationRejection. The privKey is used to sign the rejection. The sharedObjectID is used to build the signature context. The submitterPeerID is the peer ID of the operation submitter. The opNonce is the nonce of the rejected operation. The opLocalID is the local ID of the rejected operation, must match the original operation. The errorDetails are optional and may be nil.

func (*SOOperationRejection) CloneMessageVT

func (*SOOperationRejection) CloneVT

func (*SOOperationRejection) EqualMessageVT

func (this *SOOperationRejection) EqualMessageVT(thatMsg any) bool

func (*SOOperationRejection) EqualVT

func (this *SOOperationRejection) EqualVT(that *SOOperationRejection) bool

func (*SOOperationRejection) GetInner

func (x *SOOperationRejection) GetInner() []byte

func (*SOOperationRejection) GetSignature

func (x *SOOperationRejection) GetSignature() *peer.Signature

func (*SOOperationRejection) MarshalJSON

func (x *SOOperationRejection) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOOperationRejection to JSON.

func (*SOOperationRejection) MarshalProtoJSON

func (x *SOOperationRejection) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOOperationRejection message to JSON.

func (*SOOperationRejection) MarshalProtoText

func (x *SOOperationRejection) MarshalProtoText() string

func (*SOOperationRejection) MarshalToSizedBufferVT

func (m *SOOperationRejection) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperationRejection) MarshalToVT

func (m *SOOperationRejection) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperationRejection) MarshalVT

func (m *SOOperationRejection) MarshalVT() (dAtA []byte, err error)

func (*SOOperationRejection) ProtoMessage

func (*SOOperationRejection) ProtoMessage()

func (*SOOperationRejection) Reset

func (x *SOOperationRejection) Reset()

func (*SOOperationRejection) SizeVT

func (m *SOOperationRejection) SizeVT() (n int)

func (*SOOperationRejection) String

func (x *SOOperationRejection) String() string

func (*SOOperationRejection) UnmarshalInner

func (r *SOOperationRejection) UnmarshalInner() (*SOOperationRejectionInner, error)

UnmarshalInner unmarshals and verifies the SOOperationRejectionInner.

func (*SOOperationRejection) UnmarshalJSON

func (x *SOOperationRejection) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOOperationRejection from JSON.

func (*SOOperationRejection) UnmarshalProtoJSON

func (x *SOOperationRejection) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOOperationRejection message from JSON.

func (*SOOperationRejection) UnmarshalVT

func (m *SOOperationRejection) UnmarshalVT(dAtA []byte) error

func (*SOOperationRejection) Validate

func (r *SOOperationRejection) Validate() error

Validate performs cursory checks on the SOOperationRejection.

func (*SOOperationRejection) ValidateSignature

func (r *SOOperationRejection) ValidateSignature(sharedObjectID string, participants []*SOParticipantConfig) (*SOOperationRejectionInner, error)

ValidateSignature validates the signature on a SOOperationRejection.

type SOOperationRejectionErrorDetails

type SOOperationRejectionErrorDetails struct {

	// ErrorMsg is the error message.
	ErrorMsg string `protobuf:"bytes,1,opt,name=error_msg,json=errorMsg,proto3" json:"errorMsg,omitempty"`
	// contains filtered or unexported fields
}

SOOperationRejectionErrorDetails contains error details.

func (*SOOperationRejectionErrorDetails) CloneMessageVT

func (*SOOperationRejectionErrorDetails) CloneVT

func (*SOOperationRejectionErrorDetails) EqualMessageVT

func (this *SOOperationRejectionErrorDetails) EqualMessageVT(thatMsg any) bool

func (*SOOperationRejectionErrorDetails) EqualVT

func (*SOOperationRejectionErrorDetails) GetErrorMsg

func (x *SOOperationRejectionErrorDetails) GetErrorMsg() string

func (*SOOperationRejectionErrorDetails) MarshalJSON

func (x *SOOperationRejectionErrorDetails) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOOperationRejectionErrorDetails to JSON.

func (*SOOperationRejectionErrorDetails) MarshalProtoJSON

func (x *SOOperationRejectionErrorDetails) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOOperationRejectionErrorDetails message to JSON.

func (*SOOperationRejectionErrorDetails) MarshalProtoText

func (x *SOOperationRejectionErrorDetails) MarshalProtoText() string

func (*SOOperationRejectionErrorDetails) MarshalToSizedBufferVT

func (m *SOOperationRejectionErrorDetails) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperationRejectionErrorDetails) MarshalToVT

func (m *SOOperationRejectionErrorDetails) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperationRejectionErrorDetails) MarshalVT

func (m *SOOperationRejectionErrorDetails) MarshalVT() (dAtA []byte, err error)

func (*SOOperationRejectionErrorDetails) ProtoMessage

func (*SOOperationRejectionErrorDetails) ProtoMessage()

func (*SOOperationRejectionErrorDetails) Reset

func (*SOOperationRejectionErrorDetails) SizeVT

func (m *SOOperationRejectionErrorDetails) SizeVT() (n int)

func (*SOOperationRejectionErrorDetails) String

func (*SOOperationRejectionErrorDetails) UnmarshalJSON

func (x *SOOperationRejectionErrorDetails) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOOperationRejectionErrorDetails from JSON.

func (*SOOperationRejectionErrorDetails) UnmarshalProtoJSON

func (x *SOOperationRejectionErrorDetails) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOOperationRejectionErrorDetails message from JSON.

func (*SOOperationRejectionErrorDetails) UnmarshalVT

func (m *SOOperationRejectionErrorDetails) UnmarshalVT(dAtA []byte) error

type SOOperationRejectionInner

type SOOperationRejectionInner struct {

	// PeerId is the identifier of the participant that submitted the operation.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// OpNonce is the nonce of the operation for the peer.
	OpNonce uint64 `protobuf:"varint,2,opt,name=op_nonce,json=opNonce,proto3" json:"opNonce,omitempty"`
	// LocalId is the locally-assigned ulid for the operation.
	// Must be a valid ulid.
	// Must be lower-case.
	LocalId string `protobuf:"bytes,3,opt,name=local_id,json=localId,proto3" json:"localId,omitempty"`
	// ErrorDetails contains details about the rejection encoded to the peer id.
	// May be empty if there are no details.
	ErrorDetails []byte `protobuf:"bytes,4,opt,name=error_details,json=errorDetails,proto3" json:"errorDetails,omitempty"`
	// contains filtered or unexported fields
}

SOOperationRejectionInner is the inner message of SOOperationRejection.

func (*SOOperationRejectionInner) CloneMessageVT

func (*SOOperationRejectionInner) CloneVT

func (*SOOperationRejectionInner) DecodeErrorDetails

func (i *SOOperationRejectionInner) DecodeErrorDetails(privKey crypto.PrivKey, sharedObjectID string, validatorPeerID peer.ID) (*SOOperationRejectionErrorDetails, error)

DecodeErrorDetails decodes the error details message.

If the field is empty, returns nil, nil

func (*SOOperationRejectionInner) EqualMessageVT

func (this *SOOperationRejectionInner) EqualMessageVT(thatMsg any) bool

func (*SOOperationRejectionInner) EqualVT

func (*SOOperationRejectionInner) GetErrorDetails

func (x *SOOperationRejectionInner) GetErrorDetails() []byte

func (*SOOperationRejectionInner) GetLocalId

func (x *SOOperationRejectionInner) GetLocalId() string

func (*SOOperationRejectionInner) GetOpNonce

func (x *SOOperationRejectionInner) GetOpNonce() uint64

func (*SOOperationRejectionInner) GetPeerId

func (x *SOOperationRejectionInner) GetPeerId() string

func (*SOOperationRejectionInner) MarshalJSON

func (x *SOOperationRejectionInner) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOOperationRejectionInner to JSON.

func (*SOOperationRejectionInner) MarshalProtoJSON

func (x *SOOperationRejectionInner) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOOperationRejectionInner message to JSON.

func (*SOOperationRejectionInner) MarshalProtoText

func (x *SOOperationRejectionInner) MarshalProtoText() string

func (*SOOperationRejectionInner) MarshalToSizedBufferVT

func (m *SOOperationRejectionInner) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperationRejectionInner) MarshalToVT

func (m *SOOperationRejectionInner) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperationRejectionInner) MarshalVT

func (m *SOOperationRejectionInner) MarshalVT() (dAtA []byte, err error)

func (*SOOperationRejectionInner) ParsePeerID

func (i *SOOperationRejectionInner) ParsePeerID() (peer.ID, error)

ParsePeerID parses the peer ID.

func (*SOOperationRejectionInner) ProtoMessage

func (*SOOperationRejectionInner) ProtoMessage()

func (*SOOperationRejectionInner) Reset

func (x *SOOperationRejectionInner) Reset()

func (*SOOperationRejectionInner) SizeVT

func (m *SOOperationRejectionInner) SizeVT() (n int)

func (*SOOperationRejectionInner) String

func (x *SOOperationRejectionInner) String() string

func (*SOOperationRejectionInner) UnmarshalJSON

func (x *SOOperationRejectionInner) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOOperationRejectionInner from JSON.

func (*SOOperationRejectionInner) UnmarshalProtoJSON

func (x *SOOperationRejectionInner) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOOperationRejectionInner message from JSON.

func (*SOOperationRejectionInner) UnmarshalVT

func (m *SOOperationRejectionInner) UnmarshalVT(dAtA []byte) error

func (*SOOperationRejectionInner) Validate

func (i *SOOperationRejectionInner) Validate() error

Validate performs cursory checks on the SOOperationRejectionInner.

type SOOperationResult

type SOOperationResult struct {

	// OpRef is the operation reference.
	OpRef *SOOperationRef `protobuf:"bytes,1,opt,name=op_ref,json=opRef,proto3" json:"opRef,omitempty"`
	// Body is the body of the result.
	//
	// Types that are assignable to Body:
	//
	//	*SOOperationResult_Success
	//	*SOOperationResult_ErrorDetails
	Body isSOOperationResult_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

SOOperationResult is the result of applying an operation.

func BuildSOOperationResult

func BuildSOOperationResult(
	peerID string,
	nonce uint64,
	success bool,
	errorDetails *SOOperationRejectionErrorDetails,
) *SOOperationResult

BuildSOOperationResult constructs a new SOOperationResult. If success is false, errorDetails must be non-nil.

func (*SOOperationResult) CloneMessageVT

func (m *SOOperationResult) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOOperationResult) CloneVT

func (m *SOOperationResult) CloneVT() *SOOperationResult

func (*SOOperationResult) EqualMessageVT

func (this *SOOperationResult) EqualMessageVT(thatMsg any) bool

func (*SOOperationResult) EqualVT

func (this *SOOperationResult) EqualVT(that *SOOperationResult) bool

func (*SOOperationResult) GetBody

func (m *SOOperationResult) GetBody() isSOOperationResult_Body

func (*SOOperationResult) GetErrorDetails

func (*SOOperationResult) GetOpRef

func (x *SOOperationResult) GetOpRef() *SOOperationRef

func (*SOOperationResult) GetSuccess

func (x *SOOperationResult) GetSuccess() bool

func (*SOOperationResult) MarshalJSON

func (x *SOOperationResult) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOOperationResult to JSON.

func (*SOOperationResult) MarshalProtoJSON

func (x *SOOperationResult) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOOperationResult message to JSON.

func (*SOOperationResult) MarshalProtoText

func (x *SOOperationResult) MarshalProtoText() string

func (*SOOperationResult) MarshalToSizedBufferVT

func (m *SOOperationResult) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperationResult) MarshalToVT

func (m *SOOperationResult) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperationResult) MarshalVT

func (m *SOOperationResult) MarshalVT() (dAtA []byte, err error)

func (*SOOperationResult) ProtoMessage

func (*SOOperationResult) ProtoMessage()

func (*SOOperationResult) Reset

func (x *SOOperationResult) Reset()

func (*SOOperationResult) SizeVT

func (m *SOOperationResult) SizeVT() (n int)

func (*SOOperationResult) String

func (x *SOOperationResult) String() string

func (*SOOperationResult) UnmarshalJSON

func (x *SOOperationResult) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOOperationResult from JSON.

func (*SOOperationResult) UnmarshalProtoJSON

func (x *SOOperationResult) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOOperationResult message from JSON.

func (*SOOperationResult) UnmarshalVT

func (m *SOOperationResult) UnmarshalVT(dAtA []byte) error

type SOOperationResult_ErrorDetails

type SOOperationResult_ErrorDetails struct {
	// ErrorDetails contains the rejection error details.
	ErrorDetails *SOOperationRejectionErrorDetails `protobuf:"bytes,3,opt,name=error_details,json=errorDetails,proto3,oneof"`
}

func (*SOOperationResult_ErrorDetails) CloneOneofVT

func (m *SOOperationResult_ErrorDetails) CloneOneofVT() isSOOperationResult_Body

func (*SOOperationResult_ErrorDetails) CloneVT

func (*SOOperationResult_ErrorDetails) EqualVT

func (this *SOOperationResult_ErrorDetails) EqualVT(thatIface isSOOperationResult_Body) bool

func (*SOOperationResult_ErrorDetails) MarshalToSizedBufferVT

func (m *SOOperationResult_ErrorDetails) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperationResult_ErrorDetails) MarshalToVT

func (m *SOOperationResult_ErrorDetails) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperationResult_ErrorDetails) SizeVT

func (m *SOOperationResult_ErrorDetails) SizeVT() (n int)

type SOOperationResult_Success

type SOOperationResult_Success struct {
	// Success indicates the op was successful.
	Success bool `protobuf:"varint,2,opt,name=success,proto3,oneof"`
}

func (*SOOperationResult_Success) CloneOneofVT

func (m *SOOperationResult_Success) CloneOneofVT() isSOOperationResult_Body

func (*SOOperationResult_Success) CloneVT

func (*SOOperationResult_Success) EqualVT

func (this *SOOperationResult_Success) EqualVT(thatIface isSOOperationResult_Body) bool

func (*SOOperationResult_Success) MarshalToSizedBufferVT

func (m *SOOperationResult_Success) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOOperationResult_Success) MarshalToVT

func (m *SOOperationResult_Success) MarshalToVT(dAtA []byte) (int, error)

func (*SOOperationResult_Success) SizeVT

func (m *SOOperationResult_Success) SizeVT() (n int)

type SOParticipantConfig

type SOParticipantConfig struct {

	// PeerId is the string representation of this participant's peer id.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// Role is the general role of the participant.
	//
	// - READER: can read the value of the shared object only.
	// - WRITER: can submit transactions to apply.
	// - VALIDATOR: can validate and apply transactions.
	Role SOParticipantRole `protobuf:"varint,2,opt,name=role,proto3" json:"role,omitempty"`
	// EntityId is the account ID of the entity that owns this participant's session.
	// Set when an owner adds a cloud participant. Empty for local-only participants.
	EntityId string `protobuf:"bytes,3,opt,name=entity_id,json=entityId,proto3" json:"entityId,omitempty"`
	// contains filtered or unexported fields
}

SOParticipantConfig contains a listing of an entity associated with a shared object. Each entity may only appear one time in the list.

func (*SOParticipantConfig) CloneMessageVT

func (*SOParticipantConfig) CloneVT

func (*SOParticipantConfig) EqualMessageVT

func (this *SOParticipantConfig) EqualMessageVT(thatMsg any) bool

func (*SOParticipantConfig) EqualVT

func (this *SOParticipantConfig) EqualVT(that *SOParticipantConfig) bool

func (*SOParticipantConfig) GetEntityId

func (x *SOParticipantConfig) GetEntityId() string

func (*SOParticipantConfig) GetPeerId

func (x *SOParticipantConfig) GetPeerId() string

func (*SOParticipantConfig) GetRole

func (*SOParticipantConfig) MarshalJSON

func (x *SOParticipantConfig) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOParticipantConfig to JSON.

func (*SOParticipantConfig) MarshalProtoJSON

func (x *SOParticipantConfig) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOParticipantConfig message to JSON.

func (*SOParticipantConfig) MarshalProtoText

func (x *SOParticipantConfig) MarshalProtoText() string

func (*SOParticipantConfig) MarshalToSizedBufferVT

func (m *SOParticipantConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOParticipantConfig) MarshalToVT

func (m *SOParticipantConfig) MarshalToVT(dAtA []byte) (int, error)

func (*SOParticipantConfig) MarshalVT

func (m *SOParticipantConfig) MarshalVT() (dAtA []byte, err error)

func (*SOParticipantConfig) ParsePeerID

func (p *SOParticipantConfig) ParsePeerID() (peer.ID, error)

ParsePeerID parses the participant peer ID.

func (*SOParticipantConfig) ProtoMessage

func (*SOParticipantConfig) ProtoMessage()

func (*SOParticipantConfig) Reset

func (x *SOParticipantConfig) Reset()

func (*SOParticipantConfig) SizeVT

func (m *SOParticipantConfig) SizeVT() (n int)

func (*SOParticipantConfig) String

func (x *SOParticipantConfig) String() string

func (*SOParticipantConfig) UnmarshalJSON

func (x *SOParticipantConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOParticipantConfig from JSON.

func (*SOParticipantConfig) UnmarshalProtoJSON

func (x *SOParticipantConfig) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOParticipantConfig message from JSON.

func (*SOParticipantConfig) UnmarshalVT

func (m *SOParticipantConfig) UnmarshalVT(dAtA []byte) error

func (*SOParticipantConfig) Validate

func (p *SOParticipantConfig) Validate() error

Validate performs cursory checks on the SOParticipant.

type SOParticipantRole

type SOParticipantRole int32

SOParticipantRole defines the general role of a shared object participant. In order of least permissive to most permissive.

const (
	// SOParticipantRole_UNKNOWN is the zero / invalid / unknown type.
	SOParticipantRole_SOParticipantRole_UNKNOWN SOParticipantRole = 0
	// SOParticipantRole_READER can read the value of the shared object only.
	SOParticipantRole_SOParticipantRole_READER SOParticipantRole = 1
	// SOParticipantRole_WRITER can submit transactions to apply.
	SOParticipantRole_SOParticipantRole_WRITER SOParticipantRole = 2
	// SOParticipantRole_VALIDATOR can validate and apply transactions.
	SOParticipantRole_SOParticipantRole_VALIDATOR SOParticipantRole = 3
	// SOParticipantRole_OWNER can modify config and manage participants.
	SOParticipantRole_SOParticipantRole_OWNER SOParticipantRole = 4
)

func MaxSOParticipantRole added in v0.51.7

func MaxSOParticipantRole(a, b SOParticipantRole) SOParticipantRole

MaxSOParticipantRole returns the higher-privilege participant role.

func (SOParticipantRole) Enum

func (SOParticipantRole) MarshalJSON

func (x SOParticipantRole) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOParticipantRole to JSON.

func (SOParticipantRole) MarshalProtoJSON

func (x SOParticipantRole) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOParticipantRole to JSON.

func (SOParticipantRole) MarshalProtoText

func (x SOParticipantRole) MarshalProtoText() string

func (SOParticipantRole) MarshalText

func (x SOParticipantRole) MarshalText() ([]byte, error)

MarshalText marshals the SOParticipantRole to text.

func (SOParticipantRole) String

func (x SOParticipantRole) String() string

func (*SOParticipantRole) UnmarshalJSON

func (x *SOParticipantRole) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOParticipantRole from JSON.

func (*SOParticipantRole) UnmarshalProtoJSON

func (x *SOParticipantRole) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOParticipantRole from JSON.

func (*SOParticipantRole) UnmarshalText

func (x *SOParticipantRole) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOParticipantRole from text.

type SOPeerOpRejections

type SOPeerOpRejections struct {

	// PeerId is the identifier of the participant.
	PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peerId,omitempty"`
	// Rejections is the list of rejections for this peer.
	Rejections []*SOOperationRejection `protobuf:"bytes,2,rep,name=rejections,proto3" json:"rejections,omitempty"`
	// contains filtered or unexported fields
}

SOPeerOpRejections contains all rejections for a specific peer.

func (*SOPeerOpRejections) CloneMessageVT

func (m *SOPeerOpRejections) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOPeerOpRejections) CloneVT

func (m *SOPeerOpRejections) CloneVT() *SOPeerOpRejections

func (*SOPeerOpRejections) EqualMessageVT

func (this *SOPeerOpRejections) EqualMessageVT(thatMsg any) bool

func (*SOPeerOpRejections) EqualVT

func (this *SOPeerOpRejections) EqualVT(that *SOPeerOpRejections) bool

func (*SOPeerOpRejections) GetPeerId

func (x *SOPeerOpRejections) GetPeerId() string

func (*SOPeerOpRejections) GetRejections

func (x *SOPeerOpRejections) GetRejections() []*SOOperationRejection

func (*SOPeerOpRejections) MarshalJSON

func (x *SOPeerOpRejections) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOPeerOpRejections to JSON.

func (*SOPeerOpRejections) MarshalProtoJSON

func (x *SOPeerOpRejections) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOPeerOpRejections message to JSON.

func (*SOPeerOpRejections) MarshalProtoText

func (x *SOPeerOpRejections) MarshalProtoText() string

func (*SOPeerOpRejections) MarshalToSizedBufferVT

func (m *SOPeerOpRejections) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOPeerOpRejections) MarshalToVT

func (m *SOPeerOpRejections) MarshalToVT(dAtA []byte) (int, error)

func (*SOPeerOpRejections) MarshalVT

func (m *SOPeerOpRejections) MarshalVT() (dAtA []byte, err error)

func (*SOPeerOpRejections) ParsePeerID

func (r *SOPeerOpRejections) ParsePeerID() (peer.ID, error)

ParsePeerID parses the peer ID for the SOPeerOpRejections.

func (*SOPeerOpRejections) ProtoMessage

func (*SOPeerOpRejections) ProtoMessage()

func (*SOPeerOpRejections) Reset

func (x *SOPeerOpRejections) Reset()

func (*SOPeerOpRejections) SizeVT

func (m *SOPeerOpRejections) SizeVT() (n int)

func (*SOPeerOpRejections) String

func (x *SOPeerOpRejections) String() string

func (*SOPeerOpRejections) UnmarshalJSON

func (x *SOPeerOpRejections) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOPeerOpRejections from JSON.

func (*SOPeerOpRejections) UnmarshalProtoJSON

func (x *SOPeerOpRejections) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOPeerOpRejections message from JSON.

func (*SOPeerOpRejections) UnmarshalVT

func (m *SOPeerOpRejections) UnmarshalVT(dAtA []byte) error

func (*SOPeerOpRejections) Validate

func (r *SOPeerOpRejections) Validate() error

Validate performs cursory checks on the SOPeerOpRejections.

type SOReceiptState added in v0.56.1

type SOReceiptState int32

SOReceiptState identifies the authoritative state of one exact mutation key.

const (
	// SO_RECEIPT_STATE_UNSPECIFIED is the zero value.
	SOReceiptState_SO_RECEIPT_STATE_UNSPECIFIED SOReceiptState = 0
	// SO_RECEIPT_STATE_NO_RECORD means no pending or terminal record exists at the lookup linearization point.
	SOReceiptState_SO_RECEIPT_STATE_NO_RECORD SOReceiptState = 1
	// SO_RECEIPT_STATE_PENDING means the exact mutation has been durably admitted but not terminalized.
	SOReceiptState_SO_RECEIPT_STATE_PENDING SOReceiptState = 2
	// SO_RECEIPT_STATE_ACCEPTED means the exact mutation has an accepted terminal receipt.
	SOReceiptState_SO_RECEIPT_STATE_ACCEPTED SOReceiptState = 3
	// SO_RECEIPT_STATE_REJECTED means the exact mutation has a rejected terminal receipt.
	SOReceiptState_SO_RECEIPT_STATE_REJECTED SOReceiptState = 4
)

func (SOReceiptState) Enum added in v0.56.1

func (x SOReceiptState) Enum() *SOReceiptState

func (SOReceiptState) MarshalJSON added in v0.56.1

func (x SOReceiptState) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOReceiptState to JSON.

func (SOReceiptState) MarshalProtoJSON added in v0.56.1

func (x SOReceiptState) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOReceiptState to JSON.

func (SOReceiptState) MarshalProtoText added in v0.56.1

func (x SOReceiptState) MarshalProtoText() string

func (SOReceiptState) MarshalText added in v0.56.1

func (x SOReceiptState) MarshalText() ([]byte, error)

MarshalText marshals the SOReceiptState to text.

func (SOReceiptState) String added in v0.56.1

func (x SOReceiptState) String() string

func (*SOReceiptState) UnmarshalJSON added in v0.56.1

func (x *SOReceiptState) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOReceiptState from JSON.

func (*SOReceiptState) UnmarshalProtoJSON added in v0.56.1

func (x *SOReceiptState) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOReceiptState from JSON.

func (*SOReceiptState) UnmarshalText added in v0.56.1

func (x *SOReceiptState) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SOReceiptState from text.

type SORevocationInfo

type SORevocationInfo struct {

	// Reason is the reason for the revocation.
	Reason SORevocationReason `protobuf:"varint,1,opt,name=reason,proto3" json:"reason,omitempty"`
	// Timestamp is when the revocation occurred.
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// Nonce is a unique value to prevent replay of revocation entries.
	Nonce uint64 `protobuf:"varint,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

SORevocationInfo contains metadata about why a participant was removed.

func (*SORevocationInfo) CloneMessageVT

func (m *SORevocationInfo) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SORevocationInfo) CloneVT

func (m *SORevocationInfo) CloneVT() *SORevocationInfo

func (*SORevocationInfo) EqualMessageVT

func (this *SORevocationInfo) EqualMessageVT(thatMsg any) bool

func (*SORevocationInfo) EqualVT

func (this *SORevocationInfo) EqualVT(that *SORevocationInfo) bool

func (*SORevocationInfo) GetNonce

func (x *SORevocationInfo) GetNonce() uint64

func (*SORevocationInfo) GetReason

func (x *SORevocationInfo) GetReason() SORevocationReason

func (*SORevocationInfo) GetTimestamp

func (x *SORevocationInfo) GetTimestamp() *timestamppb.Timestamp

func (*SORevocationInfo) MarshalJSON

func (x *SORevocationInfo) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SORevocationInfo to JSON.

func (*SORevocationInfo) MarshalProtoJSON

func (x *SORevocationInfo) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SORevocationInfo message to JSON.

func (*SORevocationInfo) MarshalProtoText

func (x *SORevocationInfo) MarshalProtoText() string

func (*SORevocationInfo) MarshalToSizedBufferVT

func (m *SORevocationInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SORevocationInfo) MarshalToVT

func (m *SORevocationInfo) MarshalToVT(dAtA []byte) (int, error)

func (*SORevocationInfo) MarshalVT

func (m *SORevocationInfo) MarshalVT() (dAtA []byte, err error)

func (*SORevocationInfo) ProtoMessage

func (*SORevocationInfo) ProtoMessage()

func (*SORevocationInfo) Reset

func (x *SORevocationInfo) Reset()

func (*SORevocationInfo) SizeVT

func (m *SORevocationInfo) SizeVT() (n int)

func (*SORevocationInfo) String

func (x *SORevocationInfo) String() string

func (*SORevocationInfo) UnmarshalJSON

func (x *SORevocationInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SORevocationInfo from JSON.

func (*SORevocationInfo) UnmarshalProtoJSON

func (x *SORevocationInfo) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SORevocationInfo message from JSON.

func (*SORevocationInfo) UnmarshalVT

func (m *SORevocationInfo) UnmarshalVT(dAtA []byte) error

type SORevocationReason

type SORevocationReason int32

SORevocationReason describes why a participant was removed.

const (
	// SO_REVOCATION_REASON_UNKNOWN is the zero value.
	SORevocationReason_SO_REVOCATION_REASON_UNKNOWN SORevocationReason = 0
	// SO_REVOCATION_REASON_SESSION_REVOKED indicates the participant's session was revoked.
	SORevocationReason_SO_REVOCATION_REASON_SESSION_REVOKED SORevocationReason = 1
	// SO_REVOCATION_REASON_ORG_REMOVED indicates the participant was removed from the org.
	SORevocationReason_SO_REVOCATION_REASON_ORG_REMOVED SORevocationReason = 2
	// SO_REVOCATION_REASON_OWNER_REMOVED indicates the owner manually removed the participant.
	SORevocationReason_SO_REVOCATION_REASON_OWNER_REMOVED SORevocationReason = 3
	// SO_REVOCATION_REASON_INVITE_REVOKED indicates the participant's invite was revoked.
	SORevocationReason_SO_REVOCATION_REASON_INVITE_REVOKED SORevocationReason = 4
)

func (SORevocationReason) Enum

func (SORevocationReason) MarshalJSON

func (x SORevocationReason) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SORevocationReason to JSON.

func (SORevocationReason) MarshalProtoJSON

func (x SORevocationReason) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SORevocationReason to JSON.

func (SORevocationReason) MarshalProtoText

func (x SORevocationReason) MarshalProtoText() string

func (SORevocationReason) MarshalText

func (x SORevocationReason) MarshalText() ([]byte, error)

MarshalText marshals the SORevocationReason to text.

func (SORevocationReason) String

func (x SORevocationReason) String() string

func (*SORevocationReason) UnmarshalJSON

func (x *SORevocationReason) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SORevocationReason from JSON.

func (*SORevocationReason) UnmarshalProtoJSON

func (x *SORevocationReason) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SORevocationReason from JSON.

func (*SORevocationReason) UnmarshalText

func (x *SORevocationReason) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SORevocationReason from text.

type SORoot

type SORoot struct {

	// Inner is the encoded and encrypted SORootInner.
	Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"`
	// InnerSeqno is the sequence number of the SORootInner.
	// Must match inner.seqno.
	InnerSeqno uint64 `protobuf:"varint,2,opt,name=inner_seqno,json=innerSeqno,proto3" json:"innerSeqno,omitempty"`
	// AccountNonces contains the current nonce for each account.
	// The accounts are sorted lexicographically by peer_id.
	AccountNonces []*SOAccountNonce `protobuf:"bytes,3,rep,name=account_nonces,json=accountNonces,proto3" json:"accountNonces,omitempty"`
	// ValidatorSignatures contains the set of signatures of []byte(inner + account_nonces).
	// The signature public key must match a peer id of a validator.
	ValidatorSignatures []*peer.Signature `protobuf:"bytes,4,rep,name=validator_signatures,json=validatorSignatures,proto3" json:"validatorSignatures,omitempty"`
	// contains filtered or unexported fields
}

SORoot is the signed root state on a SharedObject.

func (*SORoot) ApplyUpdatedState

func (r *SORoot) ApplyUpdatedState(privKey crypto.PrivKey, sharedObjectID string, prevSeqno uint64, hashType hash.HashType, innerData []byte) error

ApplyUpdatedState applies an updated state to the SORoot. Asserts that the previous (current) seqno is prevSeqno. Signs the updated state. Updates the SORoot in-place. innerData should be the transformed marshaled inner data object.

func (*SORoot) BuildSignatureData

func (r *SORoot) BuildSignatureData() ([]byte, error)

BuildSignatureData builds the signature data that includes both inner and account nonces

func (*SORoot) CloneMessageVT

func (m *SORoot) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SORoot) CloneVT

func (m *SORoot) CloneVT() *SORoot

func (*SORoot) EqualMessageVT

func (this *SORoot) EqualMessageVT(thatMsg any) bool

func (*SORoot) EqualVT

func (this *SORoot) EqualVT(that *SORoot) bool

func (*SORoot) GetAccountNonces

func (x *SORoot) GetAccountNonces() []*SOAccountNonce

func (*SORoot) GetInner

func (x *SORoot) GetInner() []byte

func (*SORoot) GetInnerSeqno

func (x *SORoot) GetInnerSeqno() uint64

func (*SORoot) GetValidatorSignatures

func (x *SORoot) GetValidatorSignatures() []*peer.Signature

func (*SORoot) MarshalJSON

func (x *SORoot) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SORoot to JSON.

func (*SORoot) MarshalProtoJSON

func (x *SORoot) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SORoot message to JSON.

func (*SORoot) MarshalProtoText

func (x *SORoot) MarshalProtoText() string

func (*SORoot) MarshalToSizedBufferVT

func (m *SORoot) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SORoot) MarshalToVT

func (m *SORoot) MarshalToVT(dAtA []byte) (int, error)

func (*SORoot) MarshalVT

func (m *SORoot) MarshalVT() (dAtA []byte, err error)

func (*SORoot) ProtoMessage

func (*SORoot) ProtoMessage()

func (*SORoot) Reset

func (x *SORoot) Reset()

func (*SORoot) SignInnerData

func (r *SORoot) SignInnerData(privKey crypto.PrivKey, sharedObjectID string, seqno uint64, hashType hash.HashType) error

SignInnerData signs the inner data with a validator privKey. If the privKey was already used to sign the data, does nothing. seqno asserts that r.InnerSeqno matches the given value.

func (*SORoot) SizeVT

func (m *SORoot) SizeVT() (n int)

func (*SORoot) String

func (x *SORoot) String() string

func (*SORoot) UnmarshalJSON

func (x *SORoot) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SORoot from JSON.

func (*SORoot) UnmarshalProtoJSON

func (x *SORoot) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SORoot message from JSON.

func (*SORoot) UnmarshalVT

func (m *SORoot) UnmarshalVT(dAtA []byte) error

func (*SORoot) Validate

func (r *SORoot) Validate() error

func (*SORoot) ValidateSignatures

func (r *SORoot) ValidateSignatures(sharedObjectID string, participants []*SOParticipantConfig) (int, error)

ValidateSignatures validates the signatures on a SORoot. Returns the number of valid validator signatures and any error.

type SORootInner

type SORootInner struct {

	// Seqno is the sequence number of the root state.
	Seqno uint64 `protobuf:"varint,1,opt,name=seqno,proto3" json:"seqno,omitempty"`
	// StateData is the root state data for the shared object.
	StateData []byte `protobuf:"bytes,2,opt,name=state_data,json=stateData,proto3" json:"stateData,omitempty"`
	// contains filtered or unexported fields
}

SORootInner is the inner signed message on SORoot.

func (*SORootInner) CloneMessageVT

func (m *SORootInner) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SORootInner) CloneVT

func (m *SORootInner) CloneVT() *SORootInner

func (*SORootInner) EqualMessageVT

func (this *SORootInner) EqualMessageVT(thatMsg any) bool

func (*SORootInner) EqualVT

func (this *SORootInner) EqualVT(that *SORootInner) bool

func (*SORootInner) GetSeqno

func (x *SORootInner) GetSeqno() uint64

func (*SORootInner) GetStateData

func (x *SORootInner) GetStateData() []byte

func (*SORootInner) MarshalJSON

func (x *SORootInner) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SORootInner to JSON.

func (*SORootInner) MarshalProtoJSON

func (x *SORootInner) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SORootInner message to JSON.

func (*SORootInner) MarshalProtoText

func (x *SORootInner) MarshalProtoText() string

func (*SORootInner) MarshalToSizedBufferVT

func (m *SORootInner) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SORootInner) MarshalToVT

func (m *SORootInner) MarshalToVT(dAtA []byte) (int, error)

func (*SORootInner) MarshalVT

func (m *SORootInner) MarshalVT() (dAtA []byte, err error)

func (*SORootInner) ProtoMessage

func (*SORootInner) ProtoMessage()

func (*SORootInner) Reset

func (x *SORootInner) Reset()

func (*SORootInner) SizeVT

func (m *SORootInner) SizeVT() (n int)

func (*SORootInner) String

func (x *SORootInner) String() string

func (*SORootInner) UnmarshalJSON

func (x *SORootInner) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SORootInner from JSON.

func (*SORootInner) UnmarshalProtoJSON

func (x *SORootInner) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SORootInner message from JSON.

func (*SORootInner) UnmarshalVT

func (m *SORootInner) UnmarshalVT(dAtA []byte) error

func (*SORootInner) Validate

func (r *SORootInner) Validate() error

Validate performs cursory checks on the SORootInner.

type SOState

type SOState struct {

	// Config is the shared object config.
	Config *SharedObjectConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// Root is the current shared object root state.
	Root *SORoot `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
	// RootGrants are grants to each of the participants.
	// Each grant contains the transform config for the SORoot.
	// Each grant must be signed by one of the validators.
	// Each grant must be signed with the correct shared object id.
	RootGrants []*SOGrant `protobuf:"bytes,3,rep,name=root_grants,json=rootGrants,proto3" json:"rootGrants,omitempty"`
	// Ops are the list of pending operations.
	// Validators can choose how many ops to apply.
	// Each op must have a unique (peer_id, nonce) pair.
	Ops []*SOOperation `protobuf:"bytes,4,rep,name=ops,proto3" json:"ops,omitempty"`
	// OpRejections contains the rejections of operations by validators for each peer.
	// These are kept until the participant acknowledges them.
	// The list is sorted by peer_id.
	OpRejections []*SOPeerOpRejections `protobuf:"bytes,5,rep,name=op_rejections,json=opRejections,proto3" json:"opRejections,omitempty"`
	// QueuedAccountNonces tracks the highest queued nonce for each account.
	// These nonces are not signed and are only used for local state tracking.
	// The accounts are sorted lexicographically by peer_id.
	QueuedAccountNonces []*SOAccountNonce `protobuf:"bytes,6,rep,name=queued_account_nonces,json=queuedAccountNonces,proto3" json:"queuedAccountNonces,omitempty"`
	// Invites is the list of pending invites on this shared object.
	// Stored in plaintext so both providers and cloud can verify invite validity.
	Invites []*SOInvite `protobuf:"bytes,7,rep,name=invites,proto3" json:"invites,omitempty"`
	// contains filtered or unexported fields
}

SOState contains the state of the shared object. Some implementations may drop or obscure some fields for some peers.

func ReencryptSOState added in v0.56.1

func ReencryptSOState(
	ctx context.Context,
	le *logrus.Entry,
	sfs *block_transform.StepFactorySet,
	sourceSharedObjectID string,
	sourceState *SOState,
	sourcePrivKey crypto.PrivKey,
	destinationSharedObjectID string,
	destinationPrivKey crypto.PrivKey,
	destinationParticipants []*SOParticipantConfig,
) (*SOState, error)

ReencryptSOState decrypts source root state with sourcePrivKey and returns a clean destination state encrypted under fresh transform material. The destination signing key must belong to a readable validator or owner in destinationParticipants; grants are created for every readable participant. Only the decoded root state data is carried across the destination boundary.

func UnmarshalSOState

func UnmarshalSOState(ctx context.Context, bcs *block.Cursor) (*SOState, error)

UnmarshalSOState unmarshals a SOState from a block cursor.

func (*SOState) ClearOperationResult

func (s *SOState) ClearOperationResult(sharedObjectID string, clearOp *SOClearOperationResult) error

ClearOperationResult clears a rejected operation result from the state. Verifies the clear operation result signature and that the operation being cleared was submitted by the same peer that signed the clear request.

func (*SOState) CloneMessageVT

func (m *SOState) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOState) CloneVT

func (m *SOState) CloneVT() *SOState

func (*SOState) EqualMessageVT

func (this *SOState) EqualMessageVT(thatMsg any) bool

func (*SOState) EqualVT

func (this *SOState) EqualVT(that *SOState) bool

func (*SOState) GetConfig

func (x *SOState) GetConfig() *SharedObjectConfig

func (*SOState) GetInvites

func (x *SOState) GetInvites() []*SOInvite

func (*SOState) GetNextAccountNonce

func (s *SOState) GetNextAccountNonce(peerID string) uint64

GetNextAccountNonce determines the next nonce for an account.

func (*SOState) GetOpRejections

func (x *SOState) GetOpRejections() []*SOPeerOpRejections

func (*SOState) GetOperationStatus

func (s *SOState) GetOperationStatus(peerID, localID string) (*SOOperation, *SOOperationRejection, error)

GetOperationStatus returns the status of the given operation.

Returns the matching SOOperation if the operation is queued. Returns the matching SOOperationRejection if the operation is rejected. Returns nil, nil, nil if not found.

func (*SOState) GetOps

func (x *SOState) GetOps() []*SOOperation

func (*SOState) GetQueuedAccountNonces

func (x *SOState) GetQueuedAccountNonces() []*SOAccountNonce

func (*SOState) GetRoot

func (x *SOState) GetRoot() *SORoot

func (*SOState) GetRootGrants

func (x *SOState) GetRootGrants() []*SOGrant

func (*SOState) MarshalBlock

func (s *SOState) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*SOState) MarshalJSON

func (x *SOState) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOState to JSON.

func (*SOState) MarshalProtoJSON

func (x *SOState) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOState message to JSON.

func (*SOState) MarshalProtoText

func (x *SOState) MarshalProtoText() string

func (*SOState) MarshalToSizedBufferVT

func (m *SOState) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOState) MarshalToVT

func (m *SOState) MarshalToVT(dAtA []byte) (int, error)

func (*SOState) MarshalVT

func (m *SOState) MarshalVT() (dAtA []byte, err error)

func (*SOState) ProtoMessage

func (*SOState) ProtoMessage()

func (*SOState) QueueOperation

func (s *SOState) QueueOperation(sharedObjectID string, op *SOOperation) error

QueueOperation queues an operation for a writer or validator. Returns an error if the operation cannot be queued or if the nonce doesn't match the expected value.

func (*SOState) Reset

func (x *SOState) Reset()

func (*SOState) SizeVT

func (m *SOState) SizeVT() (n int)

func (*SOState) String

func (x *SOState) String() string

func (*SOState) UnmarshalBlock

func (s *SOState) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*SOState) UnmarshalJSON

func (x *SOState) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOState from JSON.

func (*SOState) UnmarshalProtoJSON

func (x *SOState) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOState message from JSON.

func (*SOState) UnmarshalVT

func (m *SOState) UnmarshalVT(dAtA []byte) error

func (*SOState) UpdateRootState

func (s *SOState) UpdateRootState(
	sharedObjectID string,
	nextRootState *SORoot,
	enforceValidatorPeerID string,
	rejectedOps []*SOOperationRejection,
	acceptedOps []*SOOperation,
) error

UpdateRootState updates the root state of a SOState.

Applies the changes to the passed SOState. If an error is returned the SOState should be considered invalid. If enforceValidatorPeerID is non-empty, ensures the given validator is in the set of signatures.

func (*SOState) Validate

func (s *SOState) Validate(sharedObjectID string) error

Validate validates the SOState.

type SOStateLock

type SOStateLock interface {
	// GetSOState returns the SOState as of when the lock was acquired.
	GetSOState() *SOState

	// WriteSOState writes an updated SOState.
	// Returns an error if the lock was released already.
	// Only the locked handle should be able to write.
	WriteSOState(ctx context.Context, state *SOState) error

	// Release releases the lock.
	Release()
}

SOStateLock is a lock handle to a SOState.

func NewSOStateLock

func NewSOStateLock(
	initialState *SOState,
	writeFn func(ctx context.Context, state *SOState) error,
	release func(),
) SOStateLock

NewSOStateLock constructs a SOStateLock with an initial value and callbacks.

type SOStateLockFunc

type SOStateLockFunc = func(ctx context.Context, sharedObjectID string) (SOStateLock, error)

SOStateLockFunc is a function to lock and load the SOState.

type SOStateParticipantHandle

type SOStateParticipantHandle struct {
	// contains filtered or unexported fields
}

SOStateParticipantHandle implements SharedObjectStateSnapshot backed by a SOState plus a few extra functions.

func NewSOStateParticipantHandle

func NewSOStateParticipantHandle(
	le *logrus.Entry,
	sfs *block_transform.StepFactorySet,
	sharedObjectID string,
	state *SOState,
	privKey crypto.PrivKey,
	localPeerID peer.ID,
) *SOStateParticipantHandle

NewSOStateParticipantHandle constructs a SOStateParticipantHandle from a SOState and private key.

func (*SOStateParticipantHandle) GetOpQueue

GetOpQueue returns the operation queue for our participant. uses the peer identity from the SharedObject.

func (*SOStateParticipantHandle) GetOpRejections

GetOpRejections returns any operation rejections for our participant along with their decoded error details. uses the peer identity from the SharedObject. The error details slice corresponds 1:1 with the rejections slice. If a rejection has no error details, the corresponding entry will be nil.

func (*SOStateParticipantHandle) GetParticipantConfig

func (s *SOStateParticipantHandle) GetParticipantConfig(ctx context.Context) (*SOParticipantConfig, error)

GetParticipantConfig returns the participant record for our participant. uses the peer identity from the SharedObject. returns ErrNotParticipant if the local peer is not a participant.

func (*SOStateParticipantHandle) GetRootInner

func (s *SOStateParticipantHandle) GetRootInner(ctx context.Context) (*SORootInner, error)

GetRootInner attempts to decode the current SORootInner and return it. uses the peer identity from the SharedObject to decode.

func (*SOStateParticipantHandle) GetRootState added in v0.52.0

func (s *SOStateParticipantHandle) GetRootState(ctx context.Context) (*SORoot, error)

GetRootState returns the raw SharedObject root.

func (*SOStateParticipantHandle) GetTransformInfo

func (s *SOStateParticipantHandle) GetTransformInfo(ctx context.Context) (*TransformInfo, error)

GetTransformInfo implements SharedObjectStateSnapshot.GetTransformInfo.

func (*SOStateParticipantHandle) GetTransformer

GetTransformer implements SharedObjectStateSnapshot.GetTransformer

func (*SOStateParticipantHandle) ProcessOperations

ProcessOperations implements SharedObjectStateSnapshot.ProcessOperations

type SOStateWatchFunc

type SOStateWatchFunc = func(ctx context.Context, sharedObjectID string, released func()) (ccontainer.Watchable[*SOState], func(), error)

SOStateWatchFunc is a function to watch the SOState for changes.

type SOTerminalReceipt added in v0.56.1

type SOTerminalReceipt struct {

	// Inner is the deterministic serialized SOTerminalReceiptInner covered by every validator signature.
	Inner []byte `protobuf:"bytes,1,opt,name=inner,proto3" json:"inner,omitempty"`
	// ValidatorSignatures cover the deterministic Inner bytes using
	// BuildSOTerminalReceiptSignatureContext(Inner.key.shared_object_id,
	// Inner.key.participant_peer_id, Inner.key.local_id,
	// Inner.authoritative_root_seqno).
	// These signatures are separate from SORoot validator signatures. Signers
	// must belong to the validator set identified by Inner.validator_set_digest
	// and satisfy Inner.consensus_mode.
	ValidatorSignatures []*peer.Signature `protobuf:"bytes,2,rep,name=validator_signatures,json=validatorSignatures,proto3" json:"validatorSignatures,omitempty"`
	// contains filtered or unexported fields
}

SOTerminalReceipt is the signed terminal evidence for one exact mutation outcome.

func (*SOTerminalReceipt) CloneMessageVT added in v0.56.1

func (m *SOTerminalReceipt) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SOTerminalReceipt) CloneVT added in v0.56.1

func (m *SOTerminalReceipt) CloneVT() *SOTerminalReceipt

func (*SOTerminalReceipt) EqualMessageVT added in v0.56.1

func (this *SOTerminalReceipt) EqualMessageVT(thatMsg any) bool

func (*SOTerminalReceipt) EqualVT added in v0.56.1

func (this *SOTerminalReceipt) EqualVT(that *SOTerminalReceipt) bool

func (*SOTerminalReceipt) GetInner added in v0.56.1

func (x *SOTerminalReceipt) GetInner() []byte

func (*SOTerminalReceipt) GetValidatorSignatures added in v0.56.1

func (x *SOTerminalReceipt) GetValidatorSignatures() []*peer.Signature

func (*SOTerminalReceipt) MarshalJSON added in v0.56.1

func (x *SOTerminalReceipt) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOTerminalReceipt to JSON.

func (*SOTerminalReceipt) MarshalProtoJSON added in v0.56.1

func (x *SOTerminalReceipt) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOTerminalReceipt message to JSON.

func (*SOTerminalReceipt) MarshalProtoText added in v0.56.1

func (x *SOTerminalReceipt) MarshalProtoText() string

func (*SOTerminalReceipt) MarshalToSizedBufferVT added in v0.56.1

func (m *SOTerminalReceipt) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOTerminalReceipt) MarshalToVT added in v0.56.1

func (m *SOTerminalReceipt) MarshalToVT(dAtA []byte) (int, error)

func (*SOTerminalReceipt) MarshalVT added in v0.56.1

func (m *SOTerminalReceipt) MarshalVT() (dAtA []byte, err error)

func (*SOTerminalReceipt) ProtoMessage added in v0.56.1

func (*SOTerminalReceipt) ProtoMessage()

func (*SOTerminalReceipt) Reset added in v0.56.1

func (x *SOTerminalReceipt) Reset()

func (*SOTerminalReceipt) SizeVT added in v0.56.1

func (m *SOTerminalReceipt) SizeVT() (n int)

func (*SOTerminalReceipt) String added in v0.56.1

func (x *SOTerminalReceipt) String() string

func (*SOTerminalReceipt) UnmarshalJSON added in v0.56.1

func (x *SOTerminalReceipt) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOTerminalReceipt from JSON.

func (*SOTerminalReceipt) UnmarshalProtoJSON added in v0.56.1

func (x *SOTerminalReceipt) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOTerminalReceipt message from JSON.

func (*SOTerminalReceipt) UnmarshalVT added in v0.56.1

func (m *SOTerminalReceipt) UnmarshalVT(dAtA []byte) error

type SOTerminalReceiptAccepted added in v0.56.1

type SOTerminalReceiptAccepted struct {
	// contains filtered or unexported fields
}

SOTerminalReceiptAccepted marks an accepted terminal mutation outcome.

func (*SOTerminalReceiptAccepted) CloneMessageVT added in v0.56.1

func (*SOTerminalReceiptAccepted) CloneVT added in v0.56.1

func (*SOTerminalReceiptAccepted) EqualMessageVT added in v0.56.1

func (this *SOTerminalReceiptAccepted) EqualMessageVT(thatMsg any) bool

func (*SOTerminalReceiptAccepted) EqualVT added in v0.56.1

func (*SOTerminalReceiptAccepted) MarshalJSON added in v0.56.1

func (x *SOTerminalReceiptAccepted) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOTerminalReceiptAccepted to JSON.

func (*SOTerminalReceiptAccepted) MarshalProtoJSON added in v0.56.1

func (x *SOTerminalReceiptAccepted) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOTerminalReceiptAccepted message to JSON.

func (*SOTerminalReceiptAccepted) MarshalProtoText added in v0.56.1

func (x *SOTerminalReceiptAccepted) MarshalProtoText() string

func (*SOTerminalReceiptAccepted) MarshalToSizedBufferVT added in v0.56.1

func (m *SOTerminalReceiptAccepted) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOTerminalReceiptAccepted) MarshalToVT added in v0.56.1

func (m *SOTerminalReceiptAccepted) MarshalToVT(dAtA []byte) (int, error)

func (*SOTerminalReceiptAccepted) MarshalVT added in v0.56.1

func (m *SOTerminalReceiptAccepted) MarshalVT() (dAtA []byte, err error)

func (*SOTerminalReceiptAccepted) ProtoMessage added in v0.56.1

func (*SOTerminalReceiptAccepted) ProtoMessage()

func (*SOTerminalReceiptAccepted) Reset added in v0.56.1

func (x *SOTerminalReceiptAccepted) Reset()

func (*SOTerminalReceiptAccepted) SizeVT added in v0.56.1

func (m *SOTerminalReceiptAccepted) SizeVT() (n int)

func (*SOTerminalReceiptAccepted) String added in v0.56.1

func (x *SOTerminalReceiptAccepted) String() string

func (*SOTerminalReceiptAccepted) UnmarshalJSON added in v0.56.1

func (x *SOTerminalReceiptAccepted) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOTerminalReceiptAccepted from JSON.

func (*SOTerminalReceiptAccepted) UnmarshalProtoJSON added in v0.56.1

func (x *SOTerminalReceiptAccepted) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOTerminalReceiptAccepted message from JSON.

func (*SOTerminalReceiptAccepted) UnmarshalVT added in v0.56.1

func (m *SOTerminalReceiptAccepted) UnmarshalVT(dAtA []byte) error

type SOTerminalReceiptInner added in v0.56.1

type SOTerminalReceiptInner struct {

	// Key identifies the exact immutable participant attempt.
	Key *SOMutationKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// EnvelopeDigest is DigestSOOperationEnvelope of the exact serialized signed SOOperation bytes.
	// The owner must compare this digest before decoding or reserializing the admitted envelope.
	EnvelopeDigest []byte `protobuf:"bytes,2,opt,name=envelope_digest,json=envelopeDigest,proto3" json:"envelopeDigest,omitempty"`
	// Outcome distinguishes acceptance from the existing signed rejection payload.
	//
	// Types that are assignable to Outcome:
	//
	//	*SOTerminalReceiptInner_Accepted
	//	*SOTerminalReceiptInner_SignedRejection
	Outcome isSOTerminalReceiptInner_Outcome `protobuf_oneof:"outcome"`
	// AuthoritativeRootSeqno is the sequence number of the authoritative root terminalizing this mutation.
	AuthoritativeRootSeqno uint64 `` /* 128-byte string literal not displayed */
	// AuthoritativeRootDigest is DigestSOAuthoritativeRoot of the terminalizing SORoot.
	// Its preimage includes BuildSignatureData only (inner and account nonces), never root signatures.
	AuthoritativeRootDigest []byte `` /* 130-byte string literal not displayed */
	// ConfigChainDigest equals the matching historical SharedObjectConfig.config_chain_hash.
	// That hash is produced by HashSOConfigChange over signature-cleared deterministic SOConfigChange bytes.
	ConfigChainDigest []byte `protobuf:"bytes,7,opt,name=config_chain_digest,json=configChainDigest,proto3" json:"configChainDigest,omitempty"`
	// ConsensusMode records the signature-set rule required for this receipt.
	ConsensusMode SOConsensusMode `protobuf:"varint,8,opt,name=consensus_mode,json=consensusMode,proto3" json:"consensusMode,omitempty"`
	// ValidatorSetDigest is DigestSOValidatorSet of the historical SharedObjectConfig.
	// It filters role >= VALIDATOR and hashes sorted, unique, length-framed peer IDs.
	ValidatorSetDigest []byte `protobuf:"bytes,9,opt,name=validator_set_digest,json=validatorSetDigest,proto3" json:"validatorSetDigest,omitempty"`
	// TerminalUnixMillis is the authoritative terminalization time in Unix milliseconds.
	TerminalUnixMillis uint64 `protobuf:"varint,10,opt,name=terminal_unix_millis,json=terminalUnixMillis,proto3" json:"terminalUnixMillis,omitempty"`
	// Supersedes links this mutation to an optional predecessor attempt.
	Supersedes *SOMutationKey `protobuf:"bytes,11,opt,name=supersedes,proto3" json:"supersedes,omitempty"`
	// contains filtered or unexported fields
}

SOTerminalReceiptInner is the deterministic signed evidence for one terminal mutation outcome.

func (*SOTerminalReceiptInner) CloneMessageVT added in v0.56.1

func (*SOTerminalReceiptInner) CloneVT added in v0.56.1

func (*SOTerminalReceiptInner) EqualMessageVT added in v0.56.1

func (this *SOTerminalReceiptInner) EqualMessageVT(thatMsg any) bool

func (*SOTerminalReceiptInner) EqualVT added in v0.56.1

func (this *SOTerminalReceiptInner) EqualVT(that *SOTerminalReceiptInner) bool

func (*SOTerminalReceiptInner) GetAccepted added in v0.56.1

func (*SOTerminalReceiptInner) GetAuthoritativeRootDigest added in v0.56.1

func (x *SOTerminalReceiptInner) GetAuthoritativeRootDigest() []byte

func (*SOTerminalReceiptInner) GetAuthoritativeRootSeqno added in v0.56.1

func (x *SOTerminalReceiptInner) GetAuthoritativeRootSeqno() uint64

func (*SOTerminalReceiptInner) GetConfigChainDigest added in v0.56.1

func (x *SOTerminalReceiptInner) GetConfigChainDigest() []byte

func (*SOTerminalReceiptInner) GetConsensusMode added in v0.56.1

func (x *SOTerminalReceiptInner) GetConsensusMode() SOConsensusMode

func (*SOTerminalReceiptInner) GetEnvelopeDigest added in v0.56.1

func (x *SOTerminalReceiptInner) GetEnvelopeDigest() []byte

func (*SOTerminalReceiptInner) GetKey added in v0.56.1

func (*SOTerminalReceiptInner) GetOutcome added in v0.56.1

func (m *SOTerminalReceiptInner) GetOutcome() isSOTerminalReceiptInner_Outcome

func (*SOTerminalReceiptInner) GetSignedRejection added in v0.56.1

func (x *SOTerminalReceiptInner) GetSignedRejection() *SOOperationRejection

func (*SOTerminalReceiptInner) GetSupersedes added in v0.56.1

func (x *SOTerminalReceiptInner) GetSupersedes() *SOMutationKey

func (*SOTerminalReceiptInner) GetTerminalUnixMillis added in v0.56.1

func (x *SOTerminalReceiptInner) GetTerminalUnixMillis() uint64

func (*SOTerminalReceiptInner) GetValidatorSetDigest added in v0.56.1

func (x *SOTerminalReceiptInner) GetValidatorSetDigest() []byte

func (*SOTerminalReceiptInner) MarshalJSON added in v0.56.1

func (x *SOTerminalReceiptInner) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SOTerminalReceiptInner to JSON.

func (*SOTerminalReceiptInner) MarshalProtoJSON added in v0.56.1

func (x *SOTerminalReceiptInner) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SOTerminalReceiptInner message to JSON.

func (*SOTerminalReceiptInner) MarshalProtoText added in v0.56.1

func (x *SOTerminalReceiptInner) MarshalProtoText() string

func (*SOTerminalReceiptInner) MarshalToSizedBufferVT added in v0.56.1

func (m *SOTerminalReceiptInner) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOTerminalReceiptInner) MarshalToVT added in v0.56.1

func (m *SOTerminalReceiptInner) MarshalToVT(dAtA []byte) (int, error)

func (*SOTerminalReceiptInner) MarshalVT added in v0.56.1

func (m *SOTerminalReceiptInner) MarshalVT() (dAtA []byte, err error)

func (*SOTerminalReceiptInner) ProtoMessage added in v0.56.1

func (*SOTerminalReceiptInner) ProtoMessage()

func (*SOTerminalReceiptInner) Reset added in v0.56.1

func (x *SOTerminalReceiptInner) Reset()

func (*SOTerminalReceiptInner) SizeVT added in v0.56.1

func (m *SOTerminalReceiptInner) SizeVT() (n int)

func (*SOTerminalReceiptInner) String added in v0.56.1

func (x *SOTerminalReceiptInner) String() string

func (*SOTerminalReceiptInner) UnmarshalJSON added in v0.56.1

func (x *SOTerminalReceiptInner) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SOTerminalReceiptInner from JSON.

func (*SOTerminalReceiptInner) UnmarshalProtoJSON added in v0.56.1

func (x *SOTerminalReceiptInner) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SOTerminalReceiptInner message from JSON.

func (*SOTerminalReceiptInner) UnmarshalVT added in v0.56.1

func (m *SOTerminalReceiptInner) UnmarshalVT(dAtA []byte) error

type SOTerminalReceiptInner_Accepted added in v0.56.1

type SOTerminalReceiptInner_Accepted struct {
	// Accepted indicates that the mutation was applied by the authoritative root.
	Accepted *SOTerminalReceiptAccepted `protobuf:"bytes,3,opt,name=accepted,proto3,oneof"`
}

func (*SOTerminalReceiptInner_Accepted) CloneOneofVT added in v0.56.1

func (m *SOTerminalReceiptInner_Accepted) CloneOneofVT() isSOTerminalReceiptInner_Outcome

func (*SOTerminalReceiptInner_Accepted) CloneVT added in v0.56.1

func (*SOTerminalReceiptInner_Accepted) EqualVT added in v0.56.1

func (this *SOTerminalReceiptInner_Accepted) EqualVT(thatIface isSOTerminalReceiptInner_Outcome) bool

func (*SOTerminalReceiptInner_Accepted) MarshalToSizedBufferVT added in v0.56.1

func (m *SOTerminalReceiptInner_Accepted) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOTerminalReceiptInner_Accepted) MarshalToVT added in v0.56.1

func (m *SOTerminalReceiptInner_Accepted) MarshalToVT(dAtA []byte) (int, error)

func (*SOTerminalReceiptInner_Accepted) SizeVT added in v0.56.1

func (m *SOTerminalReceiptInner_Accepted) SizeVT() (n int)

type SOTerminalReceiptInner_SignedRejection added in v0.56.1

type SOTerminalReceiptInner_SignedRejection struct {
	// SignedRejection is the existing validator-signed rejection for this mutation.
	SignedRejection *SOOperationRejection `protobuf:"bytes,4,opt,name=signed_rejection,json=signedRejection,proto3,oneof"`
}

func (*SOTerminalReceiptInner_SignedRejection) CloneOneofVT added in v0.56.1

func (m *SOTerminalReceiptInner_SignedRejection) CloneOneofVT() isSOTerminalReceiptInner_Outcome

func (*SOTerminalReceiptInner_SignedRejection) CloneVT added in v0.56.1

func (*SOTerminalReceiptInner_SignedRejection) EqualVT added in v0.56.1

func (this *SOTerminalReceiptInner_SignedRejection) EqualVT(thatIface isSOTerminalReceiptInner_Outcome) bool

func (*SOTerminalReceiptInner_SignedRejection) MarshalToSizedBufferVT added in v0.56.1

func (m *SOTerminalReceiptInner_SignedRejection) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SOTerminalReceiptInner_SignedRejection) MarshalToVT added in v0.56.1

func (m *SOTerminalReceiptInner_SignedRejection) MarshalToVT(dAtA []byte) (int, error)

func (*SOTerminalReceiptInner_SignedRejection) SizeVT added in v0.56.1

type SharedObject

type SharedObject interface {
	// GetBus returns the bus used by the session.
	GetBus() bus.Bus

	// GetPeerID returns the peer ID attached to this SharedObject handle.
	GetPeerID() peer.ID

	// GetSharedObjectID returns the shared object id.
	GetSharedObjectID() string

	// GetBlockStore returns the block store mounted along with the SharedObject.
	GetBlockStore() bstore.BlockStore

	// AccessLocalStateStore accesses a kvtx ops for a local state store with the given ID.
	// This state store is stored along with the local SharedObject state.
	AccessLocalStateStore(ctx context.Context, storeID string, released func()) (kvtx.Store, func(), error)

	// GetSharedObjectState returns an snapshot of the shared object state.
	GetSharedObjectState(ctx context.Context) (SharedObjectStateSnapshot, error)

	// AccessSharedObjectState adds a reference to the state and returns the state container.
	// Returns a release function. Accepts a function that is called if the Watchable becomes invalid.
	AccessSharedObjectState(ctx context.Context, released func()) (ccontainer.Watchable[SharedObjectStateSnapshot], func(), error)

	// QueueOperation applies an operation to the shared object op queue.
	// Returns after the operation is applied to the local queue.
	// Returns the local operation id.
	QueueOperation(ctx context.Context, op []byte) (string, error)

	// WaitOperation waits for the operation to be confirmed or rejected by the provider.
	// Returns the current state nonce (greater than or equal to the nonce when the op was applied).
	// After ClearOperation has been called, this will return success even for failed ops!
	// If the operation was rejected, returns 0, true, error.
	// Any other error returns 0, false, error
	WaitOperation(ctx context.Context, localID string) (uint64, bool, error)

	// ClearOperationResult clears the operation state.
	// No-op if the operation was successfully applied or ClearOperationResult was already called.
	// Be sure to call this after checking WaitOperation (not before).
	ClearOperationResult(ctx context.Context, localID string) error

	// ProcessOperations processes operations as a validator.
	// The ops should be processed in the order they are provided.
	// The results must be a subset of ops (but does not need to have all ops).
	//
	// If watch is set, waits for ops to be queued, then calls cb. Does not return.
	// If watch is unset, if there are no available ops, returns immediately.
	//
	// cb is called with the state snapshot and the decoded inner state.
	// If rawNextStateData is nil, no changes will be applied to the state (no-op).
	ProcessOperations(ctx context.Context, watch bool, cb ProcessOpsFunc) error
}

SharedObject is the shared object handle interface.

This is the interface exposed by the provider on the "client side."

func ExMountSharedObject

func ExMountSharedObject(
	ctx context.Context,
	b bus.Bus,
	ref *SharedObjectRef,
	returnIfIdle bool,
	valDisposeCb func(),
) (SharedObject, directive.Reference, error)

ExMountSharedObject executes a lookup for a single provider on the bus.

If returnIfIdle is set, returns when the directive becomes idle.

type SharedObjectConfig

type SharedObjectConfig struct {

	// Participants is the list of shared object participants.
	Participants []*SOParticipantConfig `protobuf:"bytes,1,rep,name=participants,proto3" json:"participants,omitempty"`
	// ConsensusMode is the consensus mechanism for validating root state updates.
	// Default (zero value) is SINGLE_VALIDATOR.
	ConsensusMode SOConsensusMode `protobuf:"varint,2,opt,name=consensus_mode,json=consensusMode,proto3" json:"consensusMode,omitempty"`
	// ConfigChainHash is the hash of the latest SOConfigChange entry.
	ConfigChainHash []byte `protobuf:"bytes,10,opt,name=config_chain_hash,json=configChainHash,proto3" json:"configChainHash,omitempty"`
	// ConfigChainSeqno is the sequence number of the latest SOConfigChange entry.
	// The next entry must have config_seqno == config_chain_seqno + 1.
	// Zero means no config changes have been applied yet (genesis state).
	ConfigChainSeqno uint64 `protobuf:"varint,11,opt,name=config_chain_seqno,json=configChainSeqno,proto3" json:"configChainSeqno,omitempty"`
	// contains filtered or unexported fields
}

SharedObjectConfig configures the SharedObject.

func (*SharedObjectConfig) CloneMessageVT

func (m *SharedObjectConfig) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SharedObjectConfig) CloneVT

func (m *SharedObjectConfig) CloneVT() *SharedObjectConfig

func (*SharedObjectConfig) EqualMessageVT

func (this *SharedObjectConfig) EqualMessageVT(thatMsg any) bool

func (*SharedObjectConfig) EqualVT

func (this *SharedObjectConfig) EqualVT(that *SharedObjectConfig) bool

func (*SharedObjectConfig) GetConfigChainHash

func (x *SharedObjectConfig) GetConfigChainHash() []byte

func (*SharedObjectConfig) GetConfigChainSeqno

func (x *SharedObjectConfig) GetConfigChainSeqno() uint64

func (*SharedObjectConfig) GetConsensusMode

func (x *SharedObjectConfig) GetConsensusMode() SOConsensusMode

func (*SharedObjectConfig) GetParticipants

func (x *SharedObjectConfig) GetParticipants() []*SOParticipantConfig

func (*SharedObjectConfig) MarshalJSON

func (x *SharedObjectConfig) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectConfig to JSON.

func (*SharedObjectConfig) MarshalProtoJSON

func (x *SharedObjectConfig) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectConfig message to JSON.

func (*SharedObjectConfig) MarshalProtoText

func (x *SharedObjectConfig) MarshalProtoText() string

func (*SharedObjectConfig) MarshalToSizedBufferVT

func (m *SharedObjectConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SharedObjectConfig) MarshalToVT

func (m *SharedObjectConfig) MarshalToVT(dAtA []byte) (int, error)

func (*SharedObjectConfig) MarshalVT

func (m *SharedObjectConfig) MarshalVT() (dAtA []byte, err error)

func (*SharedObjectConfig) ProtoMessage

func (*SharedObjectConfig) ProtoMessage()

func (*SharedObjectConfig) Reset

func (x *SharedObjectConfig) Reset()

func (*SharedObjectConfig) SizeVT

func (m *SharedObjectConfig) SizeVT() (n int)

func (*SharedObjectConfig) String

func (x *SharedObjectConfig) String() string

func (*SharedObjectConfig) UnmarshalJSON

func (x *SharedObjectConfig) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectConfig from JSON.

func (*SharedObjectConfig) UnmarshalProtoJSON

func (x *SharedObjectConfig) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectConfig message from JSON.

func (*SharedObjectConfig) UnmarshalVT

func (m *SharedObjectConfig) UnmarshalVT(dAtA []byte) error

func (*SharedObjectConfig) Validate

func (c *SharedObjectConfig) Validate() error

Validate checks if the SharedObjectConfig is valid.

type SharedObjectHealth

type SharedObjectHealth struct {

	// Status is the lifecycle status for the SharedObject.
	Status SharedObjectHealthStatus `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
	// Layer identifies whether the issue is on the SharedObject or body layer.
	Layer SharedObjectHealthLayer `protobuf:"varint,2,opt,name=layer,proto3" json:"layer,omitempty"`
	// CommonReason identifies a stable cross-provider reason when known.
	CommonReason SharedObjectHealthCommonReason `protobuf:"varint,3,opt,name=common_reason,json=commonReason,proto3" json:"commonReason,omitempty"`
	// RemediationHint suggests the next action to present to the user.
	RemediationHint SharedObjectHealthRemediationHint `protobuf:"varint,4,opt,name=remediation_hint,json=remediationHint,proto3" json:"remediationHint,omitempty"`
	// Error preserves provider-specific or body-specific detail when needed.
	Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
	// Metadata reserves an opaque slot for future provider-specific or body-specific remediation data.
	// Empty in v1. Callers must treat the contents as opaque.
	Metadata []byte `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

SharedObjectHealth describes the current lifecycle and failure state of a SharedObject. This payload is shared across local, spacewave, and CDN providers.

func BuildSharedObjectHealthFromError

func BuildSharedObjectHealthFromError(
	layer SharedObjectHealthLayer,
	err error,
) *SharedObjectHealth

BuildSharedObjectHealthFromError maps a known error into a SharedObjectHealth snapshot.

func GetSharedObjectHealthFromError

func GetSharedObjectHealthFromError(err error) (*SharedObjectHealth, bool)

GetSharedObjectHealthFromError returns an attached SharedObjectHealth snapshot when available.

func NewSharedObjectClosedHealth

func NewSharedObjectClosedHealth(
	layer SharedObjectHealthLayer,
	commonReason SharedObjectHealthCommonReason,
	remediationHint SharedObjectHealthRemediationHint,
	errText string,
) *SharedObjectHealth

NewSharedObjectClosedHealth constructs a closed SharedObjectHealth snapshot.

func NewSharedObjectHealth

func NewSharedObjectHealth(
	status SharedObjectHealthStatus,
	layer SharedObjectHealthLayer,
	commonReason SharedObjectHealthCommonReason,
	remediationHint SharedObjectHealthRemediationHint,
	errText string,
) *SharedObjectHealth

NewSharedObjectHealth constructs a SharedObjectHealth snapshot.

func NewSharedObjectLoadingHealth

func NewSharedObjectLoadingHealth(
	layer SharedObjectHealthLayer,
) *SharedObjectHealth

NewSharedObjectLoadingHealth constructs a loading SharedObjectHealth snapshot.

func NewSharedObjectReadyHealth

func NewSharedObjectReadyHealth(
	layer SharedObjectHealthLayer,
) *SharedObjectHealth

NewSharedObjectReadyHealth constructs a ready SharedObjectHealth snapshot.

func (*SharedObjectHealth) CloneMessageVT

func (m *SharedObjectHealth) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SharedObjectHealth) CloneVT

func (m *SharedObjectHealth) CloneVT() *SharedObjectHealth

func (*SharedObjectHealth) EqualMessageVT

func (this *SharedObjectHealth) EqualMessageVT(thatMsg any) bool

func (*SharedObjectHealth) EqualVT

func (this *SharedObjectHealth) EqualVT(that *SharedObjectHealth) bool

func (*SharedObjectHealth) GetCommonReason

func (*SharedObjectHealth) GetError

func (x *SharedObjectHealth) GetError() string

func (*SharedObjectHealth) GetLayer

func (*SharedObjectHealth) GetMetadata

func (x *SharedObjectHealth) GetMetadata() []byte

func (*SharedObjectHealth) GetRemediationHint

func (x *SharedObjectHealth) GetRemediationHint() SharedObjectHealthRemediationHint

func (*SharedObjectHealth) GetStatus

func (*SharedObjectHealth) MarshalJSON

func (x *SharedObjectHealth) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectHealth to JSON.

func (*SharedObjectHealth) MarshalProtoJSON

func (x *SharedObjectHealth) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectHealth message to JSON.

func (*SharedObjectHealth) MarshalProtoText

func (x *SharedObjectHealth) MarshalProtoText() string

func (*SharedObjectHealth) MarshalToSizedBufferVT

func (m *SharedObjectHealth) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SharedObjectHealth) MarshalToVT

func (m *SharedObjectHealth) MarshalToVT(dAtA []byte) (int, error)

func (*SharedObjectHealth) MarshalVT

func (m *SharedObjectHealth) MarshalVT() (dAtA []byte, err error)

func (*SharedObjectHealth) ProtoMessage

func (*SharedObjectHealth) ProtoMessage()

func (*SharedObjectHealth) Reset

func (x *SharedObjectHealth) Reset()

func (*SharedObjectHealth) SizeVT

func (m *SharedObjectHealth) SizeVT() (n int)

func (*SharedObjectHealth) String

func (x *SharedObjectHealth) String() string

func (*SharedObjectHealth) UnmarshalJSON

func (x *SharedObjectHealth) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectHealth from JSON.

func (*SharedObjectHealth) UnmarshalProtoJSON

func (x *SharedObjectHealth) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectHealth message from JSON.

func (*SharedObjectHealth) UnmarshalVT

func (m *SharedObjectHealth) UnmarshalVT(dAtA []byte) error

type SharedObjectHealthAccessor

type SharedObjectHealthAccessor interface {
	// AccessSharedObjectHealth adds a reference to SharedObject health and returns the state container.
	// Returns a release function. Accepts a function that is called if the Watchable becomes invalid.
	AccessSharedObjectHealth(ctx context.Context, released func()) (ccontainer.Watchable[*SharedObjectHealth], func(), error)
}

SharedObjectHealthAccessor exposes SharedObject health directly from a mounted object.

type SharedObjectHealthCommonReason

type SharedObjectHealthCommonReason int32

SharedObjectHealthCommonReason identifies a stable cross-provider reason when one is known.

const (
	// SHARED_OBJECT_HEALTH_COMMON_REASON_UNKNOWN is the zero / invalid value.
	SharedObjectHealthCommonReason_SHARED_OBJECT_HEALTH_COMMON_REASON_UNKNOWN SharedObjectHealthCommonReason = 0
	// SHARED_OBJECT_HEALTH_COMMON_REASON_NOT_FOUND indicates the SharedObject or required body data could not be found.
	SharedObjectHealthCommonReason_SHARED_OBJECT_HEALTH_COMMON_REASON_NOT_FOUND SharedObjectHealthCommonReason = 1
	// SHARED_OBJECT_HEALTH_COMMON_REASON_ACCESS_REVOKED indicates access to the SharedObject was removed.
	SharedObjectHealthCommonReason_SHARED_OBJECT_HEALTH_COMMON_REASON_ACCESS_REVOKED SharedObjectHealthCommonReason = 2
	// SHARED_OBJECT_HEALTH_COMMON_REASON_INITIAL_STATE_REJECTED indicates the initial SharedObject state failed verification.
	SharedObjectHealthCommonReason_SHARED_OBJECT_HEALTH_COMMON_REASON_INITIAL_STATE_REJECTED SharedObjectHealthCommonReason = 3
	// SHARED_OBJECT_HEALTH_COMMON_REASON_BLOCK_NOT_FOUND indicates a required block is missing.
	SharedObjectHealthCommonReason_SHARED_OBJECT_HEALTH_COMMON_REASON_BLOCK_NOT_FOUND SharedObjectHealthCommonReason = 4
	// SHARED_OBJECT_HEALTH_COMMON_REASON_TRANSFORM_CONFIG_DECODE_FAILED indicates the transform configuration could not be decoded.
	SharedObjectHealthCommonReason_SHARED_OBJECT_HEALTH_COMMON_REASON_TRANSFORM_CONFIG_DECODE_FAILED SharedObjectHealthCommonReason = 5
	// SHARED_OBJECT_HEALTH_COMMON_REASON_BODY_CONFIG_DECODE_FAILED indicates the body configuration could not be decoded.
	SharedObjectHealthCommonReason_SHARED_OBJECT_HEALTH_COMMON_REASON_BODY_CONFIG_DECODE_FAILED SharedObjectHealthCommonReason = 6
)

func (SharedObjectHealthCommonReason) Enum

func (SharedObjectHealthCommonReason) MarshalJSON

func (x SharedObjectHealthCommonReason) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectHealthCommonReason to JSON.

func (SharedObjectHealthCommonReason) MarshalProtoJSON

func (x SharedObjectHealthCommonReason) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectHealthCommonReason to JSON.

func (SharedObjectHealthCommonReason) MarshalProtoText

func (x SharedObjectHealthCommonReason) MarshalProtoText() string

func (SharedObjectHealthCommonReason) MarshalText

func (x SharedObjectHealthCommonReason) MarshalText() ([]byte, error)

MarshalText marshals the SharedObjectHealthCommonReason to text.

func (SharedObjectHealthCommonReason) String

func (*SharedObjectHealthCommonReason) UnmarshalJSON

func (x *SharedObjectHealthCommonReason) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectHealthCommonReason from JSON.

func (*SharedObjectHealthCommonReason) UnmarshalProtoJSON

func (x *SharedObjectHealthCommonReason) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectHealthCommonReason from JSON.

func (*SharedObjectHealthCommonReason) UnmarshalText

func (x *SharedObjectHealthCommonReason) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SharedObjectHealthCommonReason from text.

type SharedObjectHealthError

type SharedObjectHealthError interface {
	error

	// GetSharedObjectHealth returns the attached SharedObjectHealth snapshot.
	GetSharedObjectHealth() *SharedObjectHealth
}

SharedObjectHealthError exposes a SharedObjectHealth snapshot through an error wrapper.

type SharedObjectHealthLayer

type SharedObjectHealthLayer int32

SharedObjectHealthLayer identifies where the current issue is happening.

const (
	// SHARED_OBJECT_HEALTH_LAYER_UNKNOWN is the zero / invalid value.
	SharedObjectHealthLayer_SHARED_OBJECT_HEALTH_LAYER_UNKNOWN SharedObjectHealthLayer = 0
	// SHARED_OBJECT_HEALTH_LAYER_SHARED_OBJECT indicates the failure happened while mounting or syncing the SharedObject itself.
	SharedObjectHealthLayer_SHARED_OBJECT_HEALTH_LAYER_SHARED_OBJECT SharedObjectHealthLayer = 1
	// SHARED_OBJECT_HEALTH_LAYER_BODY indicates the failure happened while mounting or decoding the body.
	SharedObjectHealthLayer_SHARED_OBJECT_HEALTH_LAYER_BODY SharedObjectHealthLayer = 2
)

func (SharedObjectHealthLayer) Enum

func (SharedObjectHealthLayer) MarshalJSON

func (x SharedObjectHealthLayer) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectHealthLayer to JSON.

func (SharedObjectHealthLayer) MarshalProtoJSON

func (x SharedObjectHealthLayer) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectHealthLayer to JSON.

func (SharedObjectHealthLayer) MarshalProtoText

func (x SharedObjectHealthLayer) MarshalProtoText() string

func (SharedObjectHealthLayer) MarshalText

func (x SharedObjectHealthLayer) MarshalText() ([]byte, error)

MarshalText marshals the SharedObjectHealthLayer to text.

func (SharedObjectHealthLayer) String

func (x SharedObjectHealthLayer) String() string

func (*SharedObjectHealthLayer) UnmarshalJSON

func (x *SharedObjectHealthLayer) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectHealthLayer from JSON.

func (*SharedObjectHealthLayer) UnmarshalProtoJSON

func (x *SharedObjectHealthLayer) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectHealthLayer from JSON.

func (*SharedObjectHealthLayer) UnmarshalText

func (x *SharedObjectHealthLayer) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SharedObjectHealthLayer from text.

type SharedObjectHealthProvider

type SharedObjectHealthProvider interface {
	// AccessSharedObjectHealth adds a reference to SharedObject health by ref.
	// Returns a release function. Accepts a function that is called if the Watchable becomes invalid.
	AccessSharedObjectHealth(ctx context.Context, ref *SharedObjectRef, released func()) (ccontainer.Watchable[*SharedObjectHealth], func(), error)
}

SharedObjectHealthProvider streams SharedObject health snapshots before body mount.

func GetSharedObjectHealthProvider

func GetSharedObjectHealthProvider(
	provAcc provider.ProviderAccount,
) (SharedObjectHealthProvider, bool)

GetSharedObjectHealthProvider returns the optional SharedObjectHealthProvider for a ProviderAccount.

type SharedObjectHealthRemediationHint

type SharedObjectHealthRemediationHint int32

SharedObjectHealthRemediationHint suggests a next step for the caller or UI.

const (
	// SHARED_OBJECT_HEALTH_REMEDIATION_HINT_UNKNOWN is the zero / invalid value.
	SharedObjectHealthRemediationHint_SHARED_OBJECT_HEALTH_REMEDIATION_HINT_UNKNOWN SharedObjectHealthRemediationHint = 0
	// SHARED_OBJECT_HEALTH_REMEDIATION_HINT_NONE indicates no explicit action is suggested.
	SharedObjectHealthRemediationHint_SHARED_OBJECT_HEALTH_REMEDIATION_HINT_NONE SharedObjectHealthRemediationHint = 1
	// SHARED_OBJECT_HEALTH_REMEDIATION_HINT_RETRY indicates retrying the operation may succeed.
	SharedObjectHealthRemediationHint_SHARED_OBJECT_HEALTH_REMEDIATION_HINT_RETRY SharedObjectHealthRemediationHint = 2
	// SHARED_OBJECT_HEALTH_REMEDIATION_HINT_REQUEST_ACCESS indicates the user should request access again.
	SharedObjectHealthRemediationHint_SHARED_OBJECT_HEALTH_REMEDIATION_HINT_REQUEST_ACCESS SharedObjectHealthRemediationHint = 3
	// SHARED_OBJECT_HEALTH_REMEDIATION_HINT_CONTACT_OWNER indicates the user should contact the owner or operator.
	SharedObjectHealthRemediationHint_SHARED_OBJECT_HEALTH_REMEDIATION_HINT_CONTACT_OWNER SharedObjectHealthRemediationHint = 4
	// SHARED_OBJECT_HEALTH_REMEDIATION_HINT_REPAIR_SOURCE_DATA indicates the backing SharedObject or body data must be repaired.
	SharedObjectHealthRemediationHint_SHARED_OBJECT_HEALTH_REMEDIATION_HINT_REPAIR_SOURCE_DATA SharedObjectHealthRemediationHint = 5
)

func (SharedObjectHealthRemediationHint) Enum

func (SharedObjectHealthRemediationHint) MarshalJSON

func (x SharedObjectHealthRemediationHint) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectHealthRemediationHint to JSON.

func (SharedObjectHealthRemediationHint) MarshalProtoJSON

func (x SharedObjectHealthRemediationHint) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectHealthRemediationHint to JSON.

func (SharedObjectHealthRemediationHint) MarshalProtoText

func (x SharedObjectHealthRemediationHint) MarshalProtoText() string

func (SharedObjectHealthRemediationHint) MarshalText

func (x SharedObjectHealthRemediationHint) MarshalText() ([]byte, error)

MarshalText marshals the SharedObjectHealthRemediationHint to text.

func (SharedObjectHealthRemediationHint) String

func (*SharedObjectHealthRemediationHint) UnmarshalJSON

func (x *SharedObjectHealthRemediationHint) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectHealthRemediationHint from JSON.

func (*SharedObjectHealthRemediationHint) UnmarshalProtoJSON

func (x *SharedObjectHealthRemediationHint) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectHealthRemediationHint from JSON.

func (*SharedObjectHealthRemediationHint) UnmarshalText

func (x *SharedObjectHealthRemediationHint) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SharedObjectHealthRemediationHint from text.

type SharedObjectHealthStatus

type SharedObjectHealthStatus int32

SharedObjectHealthStatus describes the lifecycle status of a SharedObject mount.

const (
	// SHARED_OBJECT_HEALTH_STATUS_UNKNOWN is the zero / invalid value.
	SharedObjectHealthStatus_SHARED_OBJECT_HEALTH_STATUS_UNKNOWN SharedObjectHealthStatus = 0
	// SHARED_OBJECT_HEALTH_STATUS_LOADING indicates the object is still mounting.
	SharedObjectHealthStatus_SHARED_OBJECT_HEALTH_STATUS_LOADING SharedObjectHealthStatus = 1
	// SHARED_OBJECT_HEALTH_STATUS_READY indicates the object is mounted and usable.
	SharedObjectHealthStatus_SHARED_OBJECT_HEALTH_STATUS_READY SharedObjectHealthStatus = 2
	// SHARED_OBJECT_HEALTH_STATUS_DEGRADED indicates the object is usable with a known problem.
	SharedObjectHealthStatus_SHARED_OBJECT_HEALTH_STATUS_DEGRADED SharedObjectHealthStatus = 3
	// SHARED_OBJECT_HEALTH_STATUS_CLOSED indicates the mount cannot proceed without remediation.
	SharedObjectHealthStatus_SHARED_OBJECT_HEALTH_STATUS_CLOSED SharedObjectHealthStatus = 4
)

func (SharedObjectHealthStatus) Enum

func (SharedObjectHealthStatus) MarshalJSON

func (x SharedObjectHealthStatus) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectHealthStatus to JSON.

func (SharedObjectHealthStatus) MarshalProtoJSON

func (x SharedObjectHealthStatus) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectHealthStatus to JSON.

func (SharedObjectHealthStatus) MarshalProtoText

func (x SharedObjectHealthStatus) MarshalProtoText() string

func (SharedObjectHealthStatus) MarshalText

func (x SharedObjectHealthStatus) MarshalText() ([]byte, error)

MarshalText marshals the SharedObjectHealthStatus to text.

func (SharedObjectHealthStatus) String

func (x SharedObjectHealthStatus) String() string

func (*SharedObjectHealthStatus) UnmarshalJSON

func (x *SharedObjectHealthStatus) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectHealthStatus from JSON.

func (*SharedObjectHealthStatus) UnmarshalProtoJSON

func (x *SharedObjectHealthStatus) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectHealthStatus from JSON.

func (*SharedObjectHealthStatus) UnmarshalText

func (x *SharedObjectHealthStatus) UnmarshalText(b []byte) error

UnmarshalText unmarshals the SharedObjectHealthStatus from text.

type SharedObjectList

type SharedObjectList struct {

	// SharedObjects is the list of shared objects.
	SharedObjects []*SharedObjectListEntry `protobuf:"bytes,1,rep,name=shared_objects,json=sharedObjects,proto3" json:"sharedObjects,omitempty"`
	// contains filtered or unexported fields
}

SharedObjectList is the list of objects in the provider account.

func (*SharedObjectList) CloneMessageVT

func (m *SharedObjectList) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SharedObjectList) CloneVT

func (m *SharedObjectList) CloneVT() *SharedObjectList

func (*SharedObjectList) EqualMessageVT

func (this *SharedObjectList) EqualMessageVT(thatMsg any) bool

func (*SharedObjectList) EqualVT

func (this *SharedObjectList) EqualVT(that *SharedObjectList) bool

func (*SharedObjectList) GetSharedObjects

func (x *SharedObjectList) GetSharedObjects() []*SharedObjectListEntry

func (*SharedObjectList) MarshalJSON

func (x *SharedObjectList) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectList to JSON.

func (*SharedObjectList) MarshalProtoJSON

func (x *SharedObjectList) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectList message to JSON.

func (*SharedObjectList) MarshalProtoText

func (x *SharedObjectList) MarshalProtoText() string

func (*SharedObjectList) MarshalToSizedBufferVT

func (m *SharedObjectList) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SharedObjectList) MarshalToVT

func (m *SharedObjectList) MarshalToVT(dAtA []byte) (int, error)

func (*SharedObjectList) MarshalVT

func (m *SharedObjectList) MarshalVT() (dAtA []byte, err error)

func (*SharedObjectList) ProtoMessage

func (*SharedObjectList) ProtoMessage()

func (*SharedObjectList) Reset

func (x *SharedObjectList) Reset()

func (*SharedObjectList) SizeVT

func (m *SharedObjectList) SizeVT() (n int)

func (*SharedObjectList) String

func (x *SharedObjectList) String() string

func (*SharedObjectList) UnmarshalJSON

func (x *SharedObjectList) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectList from JSON.

func (*SharedObjectList) UnmarshalProtoJSON

func (x *SharedObjectList) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectList message from JSON.

func (*SharedObjectList) UnmarshalVT

func (m *SharedObjectList) UnmarshalVT(dAtA []byte) error

type SharedObjectListEntry

type SharedObjectListEntry struct {

	// Ref is the reference to the shared object.
	Ref *SharedObjectRef `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
	// Meta is the metadata for the shared object.
	Meta *SharedObjectMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"`
	// Source indicates how the shared object was acquired.
	// Known values: "created" (owner-created), "shared" (invite-received or org-enrolled).
	Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
	// contains filtered or unexported fields
}

SharedObjectListEntry is an entry in the SharedObjectList.

func (*SharedObjectListEntry) CloneMessageVT

func (*SharedObjectListEntry) CloneVT

func (*SharedObjectListEntry) EqualMessageVT

func (this *SharedObjectListEntry) EqualMessageVT(thatMsg any) bool

func (*SharedObjectListEntry) EqualVT

func (this *SharedObjectListEntry) EqualVT(that *SharedObjectListEntry) bool

func (*SharedObjectListEntry) GetMeta

func (*SharedObjectListEntry) GetRef

func (*SharedObjectListEntry) GetSource

func (x *SharedObjectListEntry) GetSource() string

func (*SharedObjectListEntry) MarshalJSON

func (x *SharedObjectListEntry) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectListEntry to JSON.

func (*SharedObjectListEntry) MarshalProtoJSON

func (x *SharedObjectListEntry) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectListEntry message to JSON.

func (*SharedObjectListEntry) MarshalProtoText

func (x *SharedObjectListEntry) MarshalProtoText() string

func (*SharedObjectListEntry) MarshalToSizedBufferVT

func (m *SharedObjectListEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SharedObjectListEntry) MarshalToVT

func (m *SharedObjectListEntry) MarshalToVT(dAtA []byte) (int, error)

func (*SharedObjectListEntry) MarshalVT

func (m *SharedObjectListEntry) MarshalVT() (dAtA []byte, err error)

func (*SharedObjectListEntry) ProtoMessage

func (*SharedObjectListEntry) ProtoMessage()

func (*SharedObjectListEntry) Reset

func (x *SharedObjectListEntry) Reset()

func (*SharedObjectListEntry) SizeVT

func (m *SharedObjectListEntry) SizeVT() (n int)

func (*SharedObjectListEntry) String

func (x *SharedObjectListEntry) String() string

func (*SharedObjectListEntry) UnmarshalJSON

func (x *SharedObjectListEntry) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectListEntry from JSON.

func (*SharedObjectListEntry) UnmarshalProtoJSON

func (x *SharedObjectListEntry) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectListEntry message from JSON.

func (*SharedObjectListEntry) UnmarshalVT

func (m *SharedObjectListEntry) UnmarshalVT(dAtA []byte) error

type SharedObjectMeta

type SharedObjectMeta struct {

	// BodyType is the type of object in the body of the shared object.
	// Known types: "space"
	BodyType string `protobuf:"bytes,1,opt,name=body_type,json=bodyType,proto3" json:"bodyType,omitempty"`
	// BodyMeta is additional metadata about the shared object body.
	BodyMeta []byte `protobuf:"bytes,2,opt,name=body_meta,json=bodyMeta,proto3" json:"bodyMeta,omitempty"`
	// AccountPrivate marks a shared object as private to one account and not
	// eligible for transfer, merge, or ownership-migration flows.
	AccountPrivate bool `protobuf:"varint,3,opt,name=account_private,json=accountPrivate,proto3" json:"accountPrivate,omitempty"`
	// contains filtered or unexported fields
}

SharedObjectMeta is the contents of the provider_feature_meta field for a SharedObject.

func (*SharedObjectMeta) CloneMessageVT

func (m *SharedObjectMeta) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SharedObjectMeta) CloneVT

func (m *SharedObjectMeta) CloneVT() *SharedObjectMeta

func (*SharedObjectMeta) EqualMessageVT

func (this *SharedObjectMeta) EqualMessageVT(thatMsg any) bool

func (*SharedObjectMeta) EqualVT

func (this *SharedObjectMeta) EqualVT(that *SharedObjectMeta) bool

func (*SharedObjectMeta) GetAccountPrivate

func (x *SharedObjectMeta) GetAccountPrivate() bool

func (*SharedObjectMeta) GetBodyMeta

func (x *SharedObjectMeta) GetBodyMeta() []byte

func (*SharedObjectMeta) GetBodyType

func (x *SharedObjectMeta) GetBodyType() string

func (*SharedObjectMeta) MarshalJSON

func (x *SharedObjectMeta) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectMeta to JSON.

func (*SharedObjectMeta) MarshalProtoJSON

func (x *SharedObjectMeta) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectMeta message to JSON.

func (*SharedObjectMeta) MarshalProtoText

func (x *SharedObjectMeta) MarshalProtoText() string

func (*SharedObjectMeta) MarshalToSizedBufferVT

func (m *SharedObjectMeta) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SharedObjectMeta) MarshalToVT

func (m *SharedObjectMeta) MarshalToVT(dAtA []byte) (int, error)

func (*SharedObjectMeta) MarshalVT

func (m *SharedObjectMeta) MarshalVT() (dAtA []byte, err error)

func (*SharedObjectMeta) ProtoMessage

func (*SharedObjectMeta) ProtoMessage()

func (*SharedObjectMeta) Reset

func (x *SharedObjectMeta) Reset()

func (*SharedObjectMeta) SizeVT

func (m *SharedObjectMeta) SizeVT() (n int)

func (*SharedObjectMeta) String

func (x *SharedObjectMeta) String() string

func (*SharedObjectMeta) UnmarshalJSON

func (x *SharedObjectMeta) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectMeta from JSON.

func (*SharedObjectMeta) UnmarshalProtoJSON

func (x *SharedObjectMeta) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectMeta message from JSON.

func (*SharedObjectMeta) UnmarshalVT

func (m *SharedObjectMeta) UnmarshalVT(dAtA []byte) error

func (*SharedObjectMeta) Validate

func (m *SharedObjectMeta) Validate() error

Validate validates the metadata.

type SharedObjectProvider

type SharedObjectProvider interface {
	provider.ProviderAccountFeature

	// CreateSharedObject creates a new shared object with the given details.
	// The ID may not necessarily be used for the shared object ID.
	// ownerType is "account" or "organization"; ownerID is the principal id
	// (account id for account-owned, org id for org-owned).
	CreateSharedObject(ctx context.Context, id string, meta *SharedObjectMeta, ownerType, ownerID string) (*SharedObjectRef, error)

	// MountSharedObject attempts to mount a SharedObject returning the object handle and a release function.
	//
	// This also mounts the block store associated with the shared object.
	//
	// note: use the MountSharedObject directive to call this.
	// usually called by the provider controller
	MountSharedObject(ctx context.Context, ref *SharedObjectRef, released func()) (SharedObject, func(), error)

	// DeleteSharedObject deletes the shared object with the given ID.
	// Removes from the shared object list, cleans up GC references,
	// and removes the bucket from the volume.
	DeleteSharedObject(ctx context.Context, id string) error

	// AccessSharedObjectList adds a reference to the list of shared objects and returns the container.
	// Returns a release function. Accepts a function that is called if the Watchable becomes invalid.
	AccessSharedObjectList(ctx context.Context, released func()) (ccontainer.Watchable[*SharedObjectList], func(), error)

	// RefreshSharedObjectList invalidates and reloads the current shared object
	// list snapshot when the provider has a remote list owner.
	RefreshSharedObjectList(ctx context.Context) error
}

SharedObjectProvider implements ProviderFeature_SHARED_OBJECT.

func GetSharedObjectProviderAccountFeature

func GetSharedObjectProviderAccountFeature(ctx context.Context, provAcc provider.ProviderAccount) (SharedObjectProvider, error)

GetSharedObjectProviderAccountFeature returns the SharedObjectProvider for a ProviderAccount.

type SharedObjectRecoveryDecoder

type SharedObjectRecoveryDecoder interface {
	// DecryptSharedObjectRecoveryEnvelope decrypts the envelope into recovery material.
	DecryptSharedObjectRecoveryEnvelope(ctx context.Context, env *SOEntityRecoveryEnvelope) (*SOEntityRecoveryMaterial, error)
}

SharedObjectRecoveryDecoder decrypts shared object recovery envelopes.

type SharedObjectRecoveryProvider

type SharedObjectRecoveryProvider interface {
	provider.ProviderAccountFeature

	// GetSelfEntityID returns the stable entity ID for the mounted provider account.
	GetSelfEntityID(ctx context.Context) (string, error)

	// ReadSharedObjectRecoveryEnvelope reads the current recovery envelope for the entity on an SO.
	ReadSharedObjectRecoveryEnvelope(ctx context.Context, ref *SharedObjectRef) (*SOEntityRecoveryEnvelope, error)

	// GetSharedObjectRecoveryDecoder returns a provider-owned decoder for recovery envelopes.
	GetSharedObjectRecoveryDecoder(ctx context.Context) (SharedObjectRecoveryDecoder, error)
}

SharedObjectRecoveryProvider implements ProviderFeature_SHARED_OBJECT_RECOVERY.

func GetSharedObjectRecoveryProviderAccountFeature

func GetSharedObjectRecoveryProviderAccountFeature(ctx context.Context, provAcc provider.ProviderAccount) (SharedObjectRecoveryProvider, error)

GetSharedObjectRecoveryProviderAccountFeature returns the SharedObjectRecoveryProvider for a ProviderAccount.

type SharedObjectRef

type SharedObjectRef struct {

	// ProviderResourceRef is the reference to the resource on the provider.
	ProviderResourceRef *provider.ProviderResourceRef `protobuf:"bytes,1,opt,name=provider_resource_ref,json=providerResourceRef,proto3" json:"providerResourceRef,omitempty"`
	// BlockStoreId is the identifier of the block store.
	// The block store must exist on the same provider + account id.
	BlockStoreId string `protobuf:"bytes,2,opt,name=block_store_id,json=blockStoreId,proto3" json:"blockStoreId,omitempty"`
	// contains filtered or unexported fields
}

SharedObjectRef is a reference to a shared object managed by a provider.

func NewSharedObjectRef

func NewSharedObjectRef(providerID, providerAccountID, sobjectID, blockStoreID string) *SharedObjectRef

NewSharedObjectRef builds a new SharedObjectRef.

func UnmarshalSharedObjectRef

func UnmarshalSharedObjectRef(ctx context.Context, bcs *block.Cursor) (*SharedObjectRef, error)

UnmarshalSharedObjectRef unmarshals a SharedObjectRef from a block cursor.

func (*SharedObjectRef) CloneMessageVT

func (m *SharedObjectRef) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*SharedObjectRef) CloneVT

func (m *SharedObjectRef) CloneVT() *SharedObjectRef

func (*SharedObjectRef) EqualMessageVT

func (this *SharedObjectRef) EqualMessageVT(thatMsg any) bool

func (*SharedObjectRef) EqualVT

func (this *SharedObjectRef) EqualVT(that *SharedObjectRef) bool

func (*SharedObjectRef) GetBlockStoreId

func (x *SharedObjectRef) GetBlockStoreId() string

func (*SharedObjectRef) GetLogger

func (i *SharedObjectRef) GetLogger(le *logrus.Entry) *logrus.Entry

GetLogger adds debug values to the logger.

func (*SharedObjectRef) GetProviderResourceRef

func (x *SharedObjectRef) GetProviderResourceRef() *provider.ProviderResourceRef

func (*SharedObjectRef) MarshalBlock

func (i *SharedObjectRef) MarshalBlock() ([]byte, error)

MarshalBlock marshals the block to binary. This is the initial step of marshaling, before transformations.

func (*SharedObjectRef) MarshalJSON

func (x *SharedObjectRef) MarshalJSON() ([]byte, error)

MarshalJSON marshals the SharedObjectRef to JSON.

func (*SharedObjectRef) MarshalProtoJSON

func (x *SharedObjectRef) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the SharedObjectRef message to JSON.

func (*SharedObjectRef) MarshalProtoText

func (x *SharedObjectRef) MarshalProtoText() string

func (*SharedObjectRef) MarshalToSizedBufferVT

func (m *SharedObjectRef) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*SharedObjectRef) MarshalToVT

func (m *SharedObjectRef) MarshalToVT(dAtA []byte) (int, error)

func (*SharedObjectRef) MarshalVT

func (m *SharedObjectRef) MarshalVT() (dAtA []byte, err error)

func (*SharedObjectRef) ProtoMessage

func (*SharedObjectRef) ProtoMessage()

func (*SharedObjectRef) Reset

func (x *SharedObjectRef) Reset()

func (*SharedObjectRef) SizeVT

func (m *SharedObjectRef) SizeVT() (n int)

func (*SharedObjectRef) String

func (x *SharedObjectRef) String() string

func (*SharedObjectRef) UnmarshalBlock

func (i *SharedObjectRef) UnmarshalBlock(data []byte) error

UnmarshalBlock unmarshals the block to the object. This is the final step of decoding, after transformations.

func (*SharedObjectRef) UnmarshalJSON

func (x *SharedObjectRef) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the SharedObjectRef from JSON.

func (*SharedObjectRef) UnmarshalProtoJSON

func (x *SharedObjectRef) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the SharedObjectRef message from JSON.

func (*SharedObjectRef) UnmarshalVT

func (m *SharedObjectRef) UnmarshalVT(dAtA []byte) error

func (*SharedObjectRef) Validate

func (i *SharedObjectRef) Validate() error

Validate validates the shared object ref.

type SharedObjectStateSnapshot

type SharedObjectStateSnapshot interface {
	// GetParticipantConfig returns the participant record for our participant.
	// uses the peer identity from the SharedObject.
	// returns ErrNotParticipant if the local peer is not a participant.
	GetParticipantConfig(ctx context.Context) (*SOParticipantConfig, error)

	// GetTransformer returns the transformer used for the root state and operations.
	// Returns the same transformer used for encoding/decoding the root state.
	GetTransformer(ctx context.Context) (*block_transform.Transformer, error)

	// GetTransformInfo returns redacted transform configuration for display.
	// Decrypts the local participant's grant to extract step configs, then
	// strips sensitive fields (encryption keys). Returns epoch and grant count.
	GetTransformInfo(ctx context.Context) (*TransformInfo, error)

	// GetOpQueue returns the operation queue for our participant.
	// Returns the list of queued ops with nonces + the local queue (no nonce yet).
	// uses the peer identity from the SharedObject.
	GetOpQueue(ctx context.Context) ([]*SOOperation, []*QueuedSOOperation, error)

	// GetRootInner attempts to decode the current SORootInner and returns it.
	// uses the peer identity from the SharedObject to decode.
	//
	// If the shared object is blank, returns nil, nil.
	GetRootInner(ctx context.Context) (*SORootInner, error)

	// GetRootState returns the raw SharedObject root for authority and stale-base checks.
	GetRootState(ctx context.Context) (*SORoot, error)

	// ProcessOperations processes operations as a validator calling cb.
	// The ops should be processed in the order they are provided.
	// The results must be a subset of ops (but does not need to have all ops).
	// Returns the updated root state.
	// This function is called by the SharedObject controller.
	// You probably want to call SharedObject.ProcessOperations instead.
	ProcessOperations(
		ctx context.Context,
		ops []*SOOperation,
		cb SnapshotProcessOpsFunc,
	) (
		nextRoot *SORoot,
		rejectedOps []*SOOperationRejection,
		acceptedOps []*SOOperation,
		err error,
	)
}

SharedObjectStateSnapshot is the state snapshot interface for the SharedObject.

type SnapshotProcessOpsFunc

type SnapshotProcessOpsFunc = func(
	ctx context.Context,
	currentStateData []byte,
	ops []*SOOperationInner,
) (rawNextStateData *[]byte, opResults []*SOOperationResult, err error)

SnapshotProcessOpsFunc is a function which processes operations against a state. cb is called with the state snapshot and the decoded inner state. If rawNextStateData is nil, no changes will be applied to the state (no-op).

type TransformInfo

type TransformInfo struct {
	// Steps contains the transform steps with sensitive fields redacted.
	Steps []*block_transform.StepConfig
	// GrantCount is the number of participants with active grants.
	GrantCount uint32
}

TransformInfo contains redacted transform configuration for display.

Directories

Path Synopsis
world

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL