Documentation
¶
Index ¶
- Constants
- func AuthPathMapToAuthorizations(auth AuthPathMap) map[string][]string
- type AuthPathMap
- type BucketScope
- type DrsObjectRecord
- type DrsObjectWithAuthz
- type FileUsage
- type FileUsageSummary
- type InternalObject
- type PendingLFSMeta
- type ProviderTransferEvent
- type ProviderTransferSyncRun
- type S3Credential
- type TransferAttributionBreakdown
- type TransferAttributionEvent
- type TransferAttributionFilter
- type TransferAttributionSummary
- type TransferMetricsFreshness
Constants ¶
const ( TransferEventAccessIssued = "access_issued" ProviderTransferDirectionDownload = "download" ProviderTransferDirectionUpload = "upload" ProviderTransferMatched = "matched" ProviderTransferAmbiguous = "ambiguous" ProviderTransferUnmatched = "unmatched" )
const ( ProviderTransferSyncPending = "pending" ProviderTransferSyncCompleted = "completed" ProviderTransferSyncFailed = "failed" )
Variables ¶
This section is empty.
Functions ¶
func AuthPathMapToAuthorizations ¶ added in v0.2.5
func AuthPathMapToAuthorizations(auth AuthPathMap) map[string][]string
Types ¶
type AuthPathMap ¶ added in v0.2.5
type BucketScope ¶
type DrsObjectRecord ¶
type DrsObjectRecord struct {
ID string
Size int64
CreatedTime time.Time
UpdatedTime time.Time
Name string
Version string
Description string
}
DrsObjectRecord mirrors the subset of drs_object columns returned by storage queries.
type DrsObjectWithAuthz ¶
type DrsObjectWithAuthz = InternalObject
DrsObjectWithAuthz is an alias for InternalObject retained for older Go call sites.
type FileUsage ¶
type FileUsage struct {
ObjectID string
Name string
Size int64
UploadCount int64
DownloadCount int64
LastUploadTime *time.Time
LastDownloadTime *time.Time
LastAccessTime *time.Time
}
FileUsage captures per-object transfer activity that can drive lifecycle policies.
type FileUsageSummary ¶
type FileUsageSummary struct {
TotalFiles int64
TotalUploads int64
TotalDownloads int64
InactiveFileCount int64
}
FileUsageSummary aggregates transfer activity for a set of objects.
type InternalObject ¶
type InternalObject struct {
drs.DrsObject
Auth AuthPathMap `json:"auth,omitempty"`
Authorizations map[string][]string `json:"-"`
Properties map[string]interface{} `json:"-"`
}
InternalObject is the primary DRS domain model. It wraps the GA4GH DrsObject and adds Syfon-specific authorization metadata.
func (InternalObject) External ¶
func (o InternalObject) External() drs.DrsObject
func (InternalObject) MarshalJSON ¶
func (o InternalObject) MarshalJSON() ([]byte, error)
func (*InternalObject) UnmarshalJSON ¶
func (o *InternalObject) UnmarshalJSON(data []byte) error
type PendingLFSMeta ¶
type PendingLFSMeta struct {
OID string
Candidate drs.DrsObjectCandidate
CreatedAt time.Time
ExpiresAt time.Time
}
PendingLFSMeta stores a staged LFS metadata packet keyed by object checksum. It is submitted before transfer and consumed at verify-time.
type ProviderTransferEvent ¶ added in v0.2.5
type ProviderTransferEvent struct {
ProviderEventID string
AccessGrantID string
Direction string
EventTime time.Time
RequestID string
ProviderRequestID string
ObjectID string
SHA256 string
ObjectSize int64
Organization string
Project string
AccessID string
Provider string
Bucket string
ObjectKey string
StorageURL string
RangeStart *int64
RangeEnd *int64
BytesTransferred int64
HTTPMethod string
HTTPStatus int
RequesterPrincipal string
SourceIP string
UserAgent string
RawEventRef string
ActorEmail string
ActorSubject string
AuthMode string
ReconciliationStatus string
}
ProviderTransferEvent captures provider-observed transfer bytes for billing.
type ProviderTransferSyncRun ¶ added in v0.2.5
type ProviderTransferSyncRun struct {
SyncID string `json:"sync_id"`
Provider string `json:"provider"`
Bucket string `json:"bucket"`
Organization string `json:"organization"`
Project string `json:"project"`
From time.Time `json:"from"`
To time.Time `json:"to"`
Status string `json:"status"`
RequestedAt time.Time `json:"requested_at"`
StartedAt *time.Time `json:"started_at"`
CompletedAt *time.Time `json:"completed_at"`
ImportedEvents int64 `json:"imported_events"`
MatchedEvents int64 `json:"matched_events"`
AmbiguousEvents int64 `json:"ambiguous_events"`
UnmatchedEvents int64 `json:"unmatched_events"`
ErrorMessage string `json:"error_message"`
}
type S3Credential ¶
type S3Credential struct {
Bucket string `db:"bucket"`
Provider string `db:"provider"`
Region string `db:"region"`
AccessKey string `db:"access_key"`
SecretKey string `db:"secret_key"`
Endpoint string `db:"endpoint"`
BillingLogBucket string `db:"billing_log_bucket"`
BillingLogPrefix string `db:"billing_log_prefix"`
}
S3Credential represents the 's3_credential' table
type TransferAttributionBreakdown ¶ added in v0.2.5
type TransferAttributionBreakdown struct {
Key string `json:"key"`
Organization string `json:"organization"`
Project string `json:"project"`
Provider string `json:"provider"`
Bucket string `json:"bucket"`
SHA256 string `json:"sha256"`
ActorEmail string `json:"actor_email"`
ActorSubject string `json:"actor_subject"`
EventCount int64 `json:"event_count"`
BytesRequested int64 `json:"bytes_requested"`
BytesDownloaded int64 `json:"bytes_downloaded"`
BytesUploaded int64 `json:"bytes_uploaded"`
LastTransferTime *time.Time `json:"last_transfer_time"`
}
type TransferAttributionEvent ¶ added in v0.2.5
type TransferAttributionEvent struct {
EventID string
AccessGrantID string
EventType string
EventTime time.Time
RequestID string
ObjectID string
SHA256 string
ObjectSize int64
Organization string
Project string
AccessID string
Provider string
Bucket string
StorageURL string
RangeStart *int64
RangeEnd *int64
BytesRequested int64
BytesCompleted int64
ActorEmail string
ActorSubject string
AuthMode string
ClientName string
ClientVersion string
TransferSessionID string
}
TransferAttributionEvent captures durable byte attribution for billing and audit.
type TransferAttributionFilter ¶ added in v0.2.5
type TransferAttributionSummary ¶ added in v0.2.5
type TransferAttributionSummary struct {
EventCount int64 `json:"event_count"`
AccessIssuedCount int64 `json:"access_issued_count"`
DownloadEventCount int64 `json:"download_event_count"`
UploadEventCount int64 `json:"upload_event_count"`
BytesRequested int64 `json:"bytes_requested"`
BytesDownloaded int64 `json:"bytes_downloaded"`
BytesUploaded int64 `json:"bytes_uploaded"`
Freshness *TransferMetricsFreshness `json:"freshness,omitempty"`
}
type TransferMetricsFreshness ¶ added in v0.2.5
type TransferMetricsFreshness struct {
IsStale bool `json:"is_stale"`
MissingBuckets []string `json:"missing_buckets,omitempty"`
LatestCompletedSync *time.Time `json:"latest_completed_sync,omitempty"`
RequiredFrom *time.Time `json:"required_from,omitempty"`
RequiredTo *time.Time `json:"required_to,omitempty"`
}