Skip to content

Commit

Permalink
update code format
Browse files Browse the repository at this point in the history
Signed-off-by: nhu1997 <[email protected]>
  • Loading branch information
nhu1997 committed Oct 22, 2024
1 parent becddaa commit 3a815f7
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 28 deletions.
28 changes: 14 additions & 14 deletions src/OrasProject.Oras/Oci/MediaType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ public static class MediaType
/// compressed layers referenced by the manifest but with distribution
/// restrictions.
/// </summary>
public const string ImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd";

/// <summary>
public const string ImageLayerNonDistributableZstd = "application/vnd.oci.image.layer.nondistributable.v1.tar+zstd";

/// <summary>
/// MediaTypeUnknownConfig is the default config mediaType used
/// - for [Pack] when PackOptions.PackImageManifest is true and
/// PackOptions.ConfigDescriptor is not specified.
/// - for [PackManifest] when packManifestVersion is PackManifestVersion1_0
/// and PackManifestOptions.ConfigDescriptor is not specified.
/// </summary>
public const string MediaTypeUnknownConfig = "application/vnd.unknown.config.v1+json";

/// <summary>
/// - for [Pack] when PackOptions.PackImageManifest is true and
/// PackOptions.ConfigDescriptor is not specified.
/// - for [PackManifest] when packManifestVersion is PackManifestVersion1_0
/// and PackManifestOptions.ConfigDescriptor is not specified.
/// </summary>
public const string MediaTypeUnknownConfig = "application/vnd.unknown.config.v1+json";

/// <summary>
/// MediaTypeUnknownArtifact is the default artifactType used for [Pack]
/// when PackOptions.PackImageManifest is false and artifactType is
/// not specified.
/// </summary>
/// when PackOptions.PackImageManifest is false and artifactType is
/// not specified.
/// </summary>
public const string MediaTypeUnknownArtifact = "application/vnd.unknown.artifact.v1";
}
8 changes: 4 additions & 4 deletions src/OrasProject.Oras/Pack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public static class Pack
/// Reference: https://www.rfc-editor.org/rfc/rfc3339#section-5.6
/// </summary>
public const string ErrInvalidDateTimeFormat = "invalid date and time format";
// ErrMissingArtifactType is returned by [PackManifest] when
// packManifestVersion is PackManifestVersion1_1 and artifactType is
// empty and the config media type is set to
// "application/vnd.oci.empty.v1+json".
// ErrMissingArtifactType is returned by [PackManifest] when
// packManifestVersion is PackManifestVersion1_1 and artifactType is
// empty and the config media type is set to
// "application/vnd.oci.empty.v1+json".
public const string ErrMissingArtifactType = "missing artifact type";

/// <summary>
Expand Down
29 changes: 19 additions & 10 deletions src/OrasProject.Oras/PackManifestOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,35 @@ namespace OrasProject.Oras.Oci;

public class PackManifestOptions
{
// Config is references a configuration object for a container, by digest
// For more details: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#:~:text=This%20REQUIRED%20property%20references,of%20the%20reference%20code.
/// <summary>
/// Config is references a configuration object for a container, by digest
/// For more details: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#:~:text=This%20REQUIRED%20property%20references,of%20the%20reference%20code.
/// </summary>
public Descriptor? Config { get; set; }

// Layers is the layers of the manifest
// For more details: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#:~:text=Each%20item%20in,the%20layers.
/// <summary>
/// Layers is the layers of the manifest
/// For more details: https://github.com/opencontainers/image-spec/blob/v1.1.0/manifest.md#:~:text=Each%20item%20in,the%20layers.
/// </summary>
public IList<Descriptor>? Layers { get; set; }

// Subject is the subject of the manifest.
// This option is only valid when PackManifestVersion is
// NOT PackManifestVersion1_0.
// For more details:
/// <summary>
/// Subject is the subject of the manifest.
/// This option is only valid when PackManifestVersion is
/// NOT PackManifestVersion1_0.
/// </summary>
public Descriptor? Subject { get; set; }

// ManifestAnnotations is OPTIONAL property contains arbitrary metadata for the image manifest
/// <summary>
/// ManifestAnnotations is OPTIONAL property contains arbitrary metadata for the image manifest
// MUST use the annotation rules
/// </summary>
public IDictionary<string, string>? ManifestAnnotations { get; set; }

// ConfigAnnotations is the annotation map of the config descriptor.
/// <summary>
/// ConfigAnnotations is the annotation map of the config descriptor.
// This option is valid only when Config is null.
/// </summary>
public IDictionary<string, string>? ConfigAnnotations { get; set; }
}

0 comments on commit 3a815f7

Please sign in to comment.