Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SumUpDownloadStats ¶
SumUpDownloadStats calculates the sum of uint64 values from files in statsDir modified within the given period. Files older than the period are deleted, and errors during operations are returned where applicable. The opposite function is inspector.WriteUintToFile. nolint:revive // pass cognitive complexity lint, in my opinion the complexity of this function is acceptable
func WriteUintToFile ¶
WriteUintToFile creates a file in the specified directory with the current UTC Unix time as its name and writes the provided uint64 value into it. The opposite function is validator.SumUpDownloadStats.
Types ¶
type ManifestValidator ¶
ManifestValidator defines an interface for validating an OCI manifest against specific criteria or rules.
type SizeLimitedValidator ¶
type SizeLimitedValidator struct {
Limit uint64
}
SizeLimitedValidator ensures that the size of an artifact does not exceed a specified limit. Limit specifies the maximum allowed size in bytes.
type VolumeLimitValidator ¶
VolumeLimitValidator validates volume usage against a specified limit within a given time period and directory.