File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 1+ //! Spin's client for distributing applications via OCI registries
2+
13use std:: path:: { Path , PathBuf } ;
24
35use anyhow:: { bail, Context , Result } ;
@@ -24,10 +26,14 @@ use walkdir::WalkDir;
2426use crate :: auth:: AuthConfig ;
2527
2628// TODO: the media types for application, wasm module, data and archive layer are not final.
27- const SPIN_APPLICATION_MEDIA_TYPE : & str = "application/vnd.fermyon.spin.application.v1+config" ;
29+ /// Media type for a layer representing a locked Spin application configuration
30+ pub const SPIN_APPLICATION_MEDIA_TYPE : & str = "application/vnd.fermyon.spin.application.v1+config" ;
31+ // Note: we hope to use a canonical value defined upstream for this media type
2832const WASM_LAYER_MEDIA_TYPE : & str = "application/vnd.wasm.content.layer.v1+wasm" ;
29- const DATA_MEDIATYPE : & str = "application/vnd.wasm.content.layer.v1+data" ;
30- const ARCHIVE_MEDIATYPE : & str = "application/vnd.wasm.content.bundle.v1.tar+gzip" ;
33+ /// Media type for a layer representing a generic data file used by a Spin application
34+ pub const DATA_MEDIATYPE : & str = "application/vnd.wasm.content.layer.v1+data" ;
35+ /// Media type for a layer representing a compressed archive of one or more files used by a Spin application
36+ pub const ARCHIVE_MEDIATYPE : & str = "application/vnd.wasm.content.bundle.v1.tar+gzip" ;
3137
3238const CONFIG_FILE : & str = "config.json" ;
3339const LATEST_TAG : & str = "latest" ;
Original file line number Diff line number Diff line change 22#![ deny( missing_docs) ]
33
44mod auth;
5- mod client;
5+ pub mod client;
66mod loader;
7- mod utils;
7+ pub mod utils;
88
99pub use client:: Client ;
1010pub use loader:: OciLoader ;
Original file line number Diff line number Diff line change 1+ //! Utilities related to distributing Spin apps via OCI registries
2+
13use anyhow:: { Context , Result } ;
24use async_compression:: tokio:: bufread:: GzipDecoder ;
35use async_compression:: tokio:: write:: GzipEncoder ;
You can’t perform that action at this time.
0 commit comments