package metastore import ( "encoding/json" "time" ) const AdminTagName = "admin" type User struct { ID string `json:"id"` Username string `json:"username"` Email string `json:"email,omitempty"` PasswordHash string `json:"password_hash"` TagIDs []string `json:"tag_ids"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Disabled bool `json:"disabled"` MaxFileSizeBytes *int64 `json:"max_file_size_bytes,omitempty"` MaxBoxSizeBytes *int64 `json:"max_box_size_bytes,omitempty"` MaxExpirySeconds *int64 `json:"max_expiry_seconds,omitempty"` } type Tag struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Protected bool `json:"protected"` Permissions TagPermissions `json:"permissions"` } type TagPermissions struct { UploadAllowed bool `json:"upload_allowed"` AllowedExpirySeconds []int64 `json:"allowed_expiry_seconds,omitempty"` MaxFileSizeBytes *int64 `json:"max_file_size_bytes,omitempty"` MaxBoxSizeBytes *int64 `json:"max_box_size_bytes,omitempty"` OneTimeDownloadAllowed bool `json:"one_time_download_allowed"` ZipDownloadAllowed bool `json:"zip_download_allowed"` RenewableAllowed bool `json:"renewable_allowed"` RenewOnAccessSeconds int64 `json:"renew_on_access_seconds,omitempty"` RenewOnDownloadSeconds int64 `json:"renew_on_download_seconds,omitempty"` AdminAccess bool `json:"admin_access"` AdminUsersManage bool `json:"admin_users_manage"` AdminSettingsManage bool `json:"admin_settings_manage"` AdminBoxesView bool `json:"admin_boxes_view"` } type Session struct { Token string `json:"token"` CSRFToken string `json:"csrf_token"` UserID string `json:"user_id"` CreatedAt time.Time `json:"created_at"` ExpiresAt time.Time `json:"expires_at"` } type EffectivePermissions struct { UploadAllowed bool AllowedExpirySeconds []int64 MaxFileSizeBytes int64 MaxBoxSizeBytes int64 MaxExpirySeconds int64 OneTimeDownloadAllowed bool ZipDownloadAllowed bool RenewableAllowed bool RenewOnAccessSeconds int64 RenewOnDownloadSeconds int64 AdminAccess bool AdminUsersManage bool AdminSettingsManage bool AdminBoxesView bool } type BootstrapResult struct { AdminTag Tag AdminUser *User AdminLoginEnabled bool } type Alert struct { ID string `json:"id"` Title string `json:"title"` Description string `json:"description"` Severity string `json:"severity"` Status string `json:"status"` Code string `json:"code"` Trace string `json:"trace"` Metadata json.RawMessage `json:"metadata,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` AcknowledgedAt *time.Time `json:"acknowledged_at,omitempty"` ClosedAt *time.Time `json:"closed_at,omitempty"` CreatedBy string `json:"created_by"` } type AlertInput struct { Title string Description string Severity string Code string Trace string Metadata json.RawMessage CreatedBy string } type AlertFilters struct { Query string Severity string Status string Group string Sort string } type BoxRecord struct { ID string `json:"id"` OwnerID string `json:"owner_id,omitempty"` OwnerUsername string `json:"owner_username,omitempty"` FileNames []string `json:"file_names,omitempty"` FileCount int `json:"file_count"` TotalSize int64 `json:"total_size"` CreatedAt time.Time `json:"created_at"` ExpiresAt time.Time `json:"expires_at"` PasswordProtected bool `json:"password_protected"` OneTimeDownload bool `json:"one_time_download"` DisableZip bool `json:"disable_zip"` RefreshCount int `json:"refresh_count"` UpdatedAt time.Time `json:"updated_at"` } type BoxFilters struct { Query string Owner string Status string Flag string Sort string } type BoxPageRequest struct { Page int PageSize int } type BoxRecordPage struct { Rows []BoxRecord Page int PageSize int Total int HasPrev bool HasNext bool PrevPage int NextPage int TotalPages int }