first commit
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
package domain
|
||||
|
||||
import "time"
|
||||
|
||||
type ArtifactDownloadReferenceRequest struct {
|
||||
ArtifactID string
|
||||
}
|
||||
|
||||
type ArtifactDownloadReference struct {
|
||||
ArtifactID string
|
||||
OwnerKind ArtifactOwnerKind
|
||||
OwnerID string
|
||||
Filename string
|
||||
ContentType string
|
||||
SizeBytes int64
|
||||
Checksum string
|
||||
State ArtifactState
|
||||
DownloadURL string
|
||||
ExpiresAt time.Time
|
||||
RangeSupported bool
|
||||
ChunkSizeBytes int
|
||||
StorageBehavior string
|
||||
}
|
||||
|
||||
type ArtifactContentRequest struct {
|
||||
ArtifactID string
|
||||
Offset int64
|
||||
Limit int
|
||||
}
|
||||
|
||||
type ArtifactContent struct {
|
||||
ArtifactID string
|
||||
Filename string
|
||||
ContentType string
|
||||
Offset int64
|
||||
SizeBytes int64
|
||||
TotalSizeBytes int64
|
||||
Checksum string
|
||||
ContentChecksum string
|
||||
Partial bool
|
||||
RangeSupported bool
|
||||
Payload []byte
|
||||
StorageBehavior string
|
||||
ServedAt time.Time
|
||||
}
|
||||
|
||||
type ArtifactTransferProgress struct {
|
||||
ArtifactID string
|
||||
BytesRead int64
|
||||
TotalSizeBytes int64
|
||||
Complete bool
|
||||
}
|
||||
|
||||
type ArtifactDownloadSafeError struct {
|
||||
Code string
|
||||
Message string
|
||||
Details []string
|
||||
}
|
||||
|
||||
func CopyArtifactDownloadReferenceRequest(request ArtifactDownloadReferenceRequest) ArtifactDownloadReferenceRequest {
|
||||
return request
|
||||
}
|
||||
|
||||
func CopyArtifactDownloadReference(reference ArtifactDownloadReference) ArtifactDownloadReference {
|
||||
return reference
|
||||
}
|
||||
|
||||
func CopyArtifactContentRequest(request ArtifactContentRequest) ArtifactContentRequest {
|
||||
return request
|
||||
}
|
||||
|
||||
func CopyArtifactContent(content ArtifactContent) ArtifactContent {
|
||||
content.Payload = CopyBytes(content.Payload)
|
||||
return content
|
||||
}
|
||||
|
||||
func CopyArtifactTransferProgress(progress ArtifactTransferProgress) ArtifactTransferProgress {
|
||||
return progress
|
||||
}
|
||||
|
||||
func CopyArtifactDownloadSafeError(safeError ArtifactDownloadSafeError) ArtifactDownloadSafeError {
|
||||
safeError.Details = CopyStringSlice(safeError.Details)
|
||||
return safeError
|
||||
}
|
||||
Reference in New Issue
Block a user