github.com/git-amp/amp-sdk-go@v0.7.5/crates/crates.proto (about) 1 syntax = "proto3"; 2 3 // Contains data structures used by the client for content management and deployment 4 package crates; 5 6 option csharp_namespace = "AMP"; 7 8 9 enum AssetFlags { 10 NoFlags = 0; 11 12 IsTexture = 0x0001; 13 IsSprite = 0x0002; 14 IsMaterial = 0x0004; 15 IsPlaceable = 0x0008; 16 IsMonoCell = 0x0010; 17 18 // HasIcon means that this Asset includes an icon with the same name (and has IsIcon set), 19 HasIcon = 0x0100; 20 21 // IsPrivate means this item is not intended for general use and is not normally visible. 22 IsPrivate = 0x0200; 23 24 // IsSkybox means this is a transform containing a Skybox component. 25 IsSkybox = 0x0400; 26 27 // AutoScale means this asset should be placed with auto scale enabled by default. 28 AutoScale = 0x0800; 29 30 // IsSurface means this asset behaves like terrain and/or should be considered a constituent part of a scene. 31 // These objects should be opaque and have colliders attached to them 32 // e.g. a building, a terrain formation, a wall 33 IsSurface = 0x1000; 34 35 } 36 37 // KVEntry is a generic entry for any key-value pair. 38 message KVEntry { 39 string Key = 1; 40 string Value = 2; 41 } 42 43 44 message AppVars { 45 // AppDomain is the domain name used for primary queries (e.g. "arcspace.systems") 46 string AppDomain = 2; 47 48 // AppDesc succinctly describes this org and is for humans. 49 string AppDesc = 4; 50 51 // OrgHomeURL is the home link for this org (e.g. "https://blockcities.com") 52 string OrgHomeURL = 6; 53 54 // AppHomeURL points to the home URL for the app 55 string AppHomeURL = 12; 56 57 // CratesSnapshotURL specifies where to load this org's CratesSnapshot 58 string CratesSnapshotURL = 14; 59 60 // AppDownloadURLs are a download URL for a given platform. 61 // A key of "" denotes an unknown platform 62 map<string, string> AppDownloadURLs = 16; 63 64 // URLSchemes declare URL schemes for this app's custom URL scheme (e.g. "arcspace://") 65 // The first entry is the primary scheme and the rest are alternately recognized schemes. 66 // URL schemas should always end with "://" 67 repeated string URLSchemes = 18; 68 69 // Overrides default settings 70 map<string, string> Settings = 20; 71 72 // Links is a list of channel URIs for easy access. 73 repeated KVEntry Links = 40; 74 75 } 76 77 78 message AssetEntry { 79 80 // AssetFlags specifies properties about this AssetEntry. 81 AssetFlags Flags = 1; 82 83 // URI is a unix-style pathname that identifies an asset within a crate. 84 // By convention this URI does *not* start or end with '/' 85 // An asset URI has the form "{CrateURI}/{EntryURI}" 86 // If two or more assets have same EntryURI then only one is accessible. 87 string EntryURI = 2; 88 89 // Name is the human-readable label for this asset. 90 string Label = 3; 91 92 // CenterX and CenterZ specify the positional center of this asset (and are typically 0). 93 // CenterY is the distance above the baseline (y=0) to the y center-point height of this asset. 94 // Y is considered to be the *vertical* (up) direction and by convention rest on the plane y=0. 95 float CenterX = 5; 96 float CenterY = 6; 97 float CenterZ = 7; 98 99 // Extents specify the extents as distance from the center to the extent of the asset on each axis. 100 float ExtentsX = 10; 101 float ExtentsY = 11; 102 float ExtentsZ = 12; 103 104 // Reserved for runtime use -- defaults to empty 105 string LocalURI = 30; 106 107 // Comma delimited and whitespace-trimmed list of of tags 108 string Tags = 31; 109 110 // A short phrase or fragment describing this asset, starting with an article where appropriate. e.g.: 111 // "A typical 6 crew member fire truck" 112 // "A leading U.S. naval ship-based helicopter" 113 // "The Texas capital building located in Austin" 114 // "An animated scared-geometry inspired flat seal" 115 string ShortDesc = 32; 116 117 } 118 119 120 message BundleManifest { 121 122 // BundleTitle is how the outside world sees this bundle and has no other impact. 123 // This means it can change from build to build and contain any Unicode characters. 124 string BundleTitle = 2; 125 126 // BundleNameID is how this bundle is internally identified and expressed the filename of this bundle 127 // This is case sensitive, contains only path-safe characters (sans /:\<>|?*\"), and does not terminate in '.' or whitespace. 128 string BundleNameID = 3; 129 130 repeated AssetEntry Assets = 10; 131 132 bool LoadAllHint = 20; 133 134 } 135 136 137 // Enum values should be three base10 digits corresponding to the major, minor, and revision number. 138 enum CrateSchema { 139 UndefinedSchema = 0; 140 141 // v100 (April 2020) should be used for CrateInfo.CrateSchema 142 v100 = 100; 143 } 144 145 146 // CrateInfo represents a Crate, the fundamental unit of PLAN's asset/package manager. 147 message CrateInfo { 148 149 // CrateSchema communicates which build and packaging schema was used for this crate build . 150 // This value should be the integer value of a valid CrateSchema.vNNN enum. 151 int32 CrateSchema = 1; 152 153 // InstID is 0 by default and reserved for a runtime manager to reference a crate via issuing integers. 154 // If non-zero, it will not change and no other instance will have the same value. 155 uint32 InstID = 2; 156 157 // CrateURI takes the form "{PublisherID}/{CrateID}" is used to globally reference assets in this crate. 158 // This URI string can only contains chars in [A-Za-z0-9_.-] (other than the separating '/' char). 159 // PublisherID uniquely identifies the author/owner/publisher of this crate (and potentially other crates). 160 // CrateID uniquely identifies this crate for the given publisher and all subsequent revisions. 161 // "plan-systems.org/plan.app.ui" 162 // "plan-systems.org/about-plan-systems" 163 // "themushroom.farm/land" 164 // "themushroom.farm/mycology-201" 165 // "the-smiths.family/123-Maple" 166 string CrateURI = 4; 167 168 // PublisherName is a human-readable of the author/owner/publisher of this crate and can change without repercussions (i.e. is purely optical). 169 string PublisherName = 6; 170 171 // CrateName is a human-readable title for this crate and can change without repercussions. 172 string CrateName = 10; 173 174 // ShortDesc describes this crate in a brief phrase 175 string ShortDesc = 11; 176 177 // Comma delimited and whitespace-trimmed list of of tags 178 string Tags = 15; 179 180 // TimeCreated is UTC value (in seconds) when this crate first created (and does not change) 181 int64 TimeCreated = 30; 182 183 // TimeBuilt is UTC value (in seconds) when this crate was built. 184 int64 TimeBuilt = 31; 185 186 // VersionID uniquely identifies this build and has the form "v{MajorNum}.{MinorNum}.{BuildNum}" 187 // e.g. "v1.11.201" 188 int32 MajorVersion = 40; 189 int32 MinorVersion = 41; 190 int32 BuildNumber = 42; 191 192 // BuildID uniquely identifies a particular crate build/version. 193 // This value should have no spaces and only have '.', '_', or '-' (and starts and ends with an alpha-numeric) 194 // By convention, the format is "yyMMdd-{VersionID}" (so that sorting by BuildID string yields the most recent release). 195 // e.g. "210320-v0.1.11" 196 string BuildID = 45; 197 198 // HomeURL is an optional link that allows a human to learn more about this crate. 199 string HomeURL = 50; 200 201 // URL is an optional string available to specifying URL to download this crate. 202 string URL = 55; 203 204 // Approximate size of this crate in bytes (or 0 if unknown) 205 int64 ApproxSize = 60; 206 207 } 208 209 210 211 // CrateManifest is the top-level manifest/catalog for a PLAN asset module called a "crate". 212 // It contains catalog and type info that PLAN loads at runtime to know what's inside binary asset bundles without having to load them. 213 // 214 // A reference to a PLAN asset is via a URI with the form: 215 // assetURI := "PublisherID/CrateID[@CrateBuildID]/{AssetEntry.Pathname}" 216 // 217 message CrateManifest { 218 219 CrateInfo Info = 1; 220 221 // IconBundleName is the bundle name ID of the bundle containing icons (Sprites) used to represent the "real" crate assets. 222 // Asset name IDs in this bundle correspond to assets in all the other Crate's bundles. 223 string IconBundleName = 5; 224 225 repeated BundleManifest Bundles = 10; 226 } 227 228 229 230 // CratesSnapshot is a general purpose container to track multiple crates and associated build IDs. 231 message CratesSnapshot { 232 233 int64 RevID = 1; 234 235 // This is a template URL where the symbols "CrateURI", "CrateBuildID", "PlatformID" are delimited with { }. 236 // The symbol "{.}" is to be replaced with a local pathname if the URL refers to a local file system pathname. 237 // e.g. "https://whatever.com/{CrateURI}__{CrateBuildID}.{PlatformID}.crate" 238 // "{.}/{CrateURI}__{CrateBuildID}.{PlatformID}.crate" 239 string DownloadURL = 3; 240 241 repeated CrateInfo Crates = 10; 242 243 } 244