Documentation
¶
Overview ¶
pkg/types/capabilities.go
pkg/types/entry.go
pkg/types/group.go
Index ¶
Constants ¶
View Source
const ( CapabilityAll = "tlog/*" CapabilityAdmin = "tlog/admin" CapabilityAdminRevoke = "tlog/admin/revoke" CapabilityAdminDelegate = "tlog/admin/delegate" CapabilityAppend = "tlog/append" CapabilityRead = "tlog/read" )
Capability constants for UCAN authorization.
Variables ¶
This section is empty.
Functions ¶
func ResourceURI ¶
ResourceURI creates a resource URI for a log.
Types ¶
type GroupMetadata ¶
type GroupMetadata struct {
ID GroupID `json:"id"`
CreatorAccount PublicKey `json:"creator_account"` // Deprecated: no longer used in simplified delegation model
RecoveryKeyHash []byte `json:"recovery_key_hash"`
CreatedAt time.Time `json:"created_at"`
Frozen bool `json:"frozen"`
}
GroupMetadata contains persistent group configuration.
type GroupStatus ¶
type GroupStatus struct {
Metadata GroupMetadata `json:"metadata"`
EntriesLogIndex uint64 `json:"entries_log_index"`
RevocationIndex uint64 `json:"revocation_index"`
}
GroupStatus represents the current state of a group.
type LogEntry ¶
type LogEntry struct {
Index uint64 `json:"index"`
Data []byte `json:"data"`
Timestamp time.Time `json:"timestamp"`
Submitter PublicKey `json:"submitter"`
}
LogEntry represents an entry in the primary tlog.
type LogEntryWithProof ¶
type LogEntryWithProof struct {
Entry LogEntry `json:"entry"`
InclusionProof []byte `json:"inclusion_proof"`
TreeSize uint64 `json:"tree_size"`
RootHash []byte `json:"root_hash"`
}
LogEntryWithProof includes the Merkle inclusion proof.
type RevocationEntry ¶
type RevocationEntry struct {
Index uint64 `json:"index"`
Type RevocationType `json:"type"`
Target []byte `json:"target"`
Timestamp time.Time `json:"timestamp"`
}
RevocationEntry represents an entry in the revocation tlog.
func (*RevocationEntry) Deserialize ¶
func (e *RevocationEntry) Deserialize(data []byte) error
Deserialize populates a RevocationEntry from JSON bytes.
func (*RevocationEntry) Serialize ¶
func (e *RevocationEntry) Serialize() ([]byte, error)
Serialize converts a RevocationEntry to JSON bytes for storage.
type RevocationType ¶
type RevocationType string
RevocationType defines what is being revoked.
const ( RevokeUCAN RevocationType = "ucan" // Revoke specific UCAN by hash RevokeAccount RevocationType = "account" // Revoke all UCANs for account RevokeCapability RevocationType = "capability" // Revoke specific capability )
Click to show internal directories.
Click to hide internal directories.