go scratch code for atproto
at main 168 lines 3.7 kB view raw
1[ 2 { 3 "scope": "resource", 4 "generic": { 5 "resource": "resource", 6 "positional": "", 7 "params": {} 8 } 9 }, 10 { 11 "scope": "resource:positional?key=val", 12 "generic": { 13 "resource": "resource", 14 "positional": "positional", 15 "params": { 16 "key": ["val"] 17 } 18 } 19 }, 20 { 21 "scope": "resource:positional?thing&key=val", 22 "generic": { 23 "resource": "resource", 24 "positional": "positional", 25 "params": { 26 "thing": [""], 27 "key": ["val"] 28 } 29 } 30 }, 31 { 32 "scope": "service:did:web:com.example#type?key=val", 33 "generic": { 34 "resource": "service", 35 "positional": "did:web:com.example#type", 36 "params": { 37 "key": ["val"] 38 } 39 } 40 }, 41 { 42 "scope": "resource:", 43 "generic": { 44 "resource": "resource", 45 "positional": "", 46 "params": {} 47 } 48 }, 49 { 50 "scope": "resource:?", 51 "generic": { 52 "resource": "resource", 53 "positional": "", 54 "params": {} 55 } 56 }, 57 { 58 "scope": "resource:&", 59 "generic": { 60 "resource": "resource", 61 "positional": "&", 62 "params": {} 63 } 64 }, 65 { 66 "scope": "resource?", 67 "generic": { 68 "resource": "resource", 69 "positional": "", 70 "params": {} 71 } 72 }, 73 { 74 "scope": "res:pos?p=true", 75 "generic": { 76 "resource": "res", 77 "positional": "pos", 78 "params": { 79 "p": ["true"] 80 } 81 } 82 }, 83 { 84 "scope": "my-res", 85 "generic": { 86 "resource": "my-res", 87 "positional": "", 88 "params": {} 89 } 90 }, 91 { 92 "scope": "my-res:my-pos", 93 "generic": { 94 "resource": "my-res", 95 "positional": "my-pos", 96 "params": {} 97 } 98 }, 99 { 100 "scope": "my-res:", 101 "generic": { 102 "resource": "my-res", 103 "positional": "", 104 "params": {} 105 } 106 }, 107 { 108 "scope": "my-res:foo?x=value&y=value-y", 109 "generic": { 110 "resource": "my-res", 111 "positional": "foo", 112 "params": { 113 "x": ["value"], 114 "y": ["value-y"] 115 } 116 } 117 }, 118 { 119 "scope": "my-res?x=value&y=value-y", 120 "generic": { 121 "resource": "my-res", 122 "positional": "", 123 "params": { 124 "x": ["value"], 125 "y": ["value-y"] 126 } 127 } 128 }, 129 { 130 "scope": "my-res?x=foo&x=bar&x=baz", 131 "generic": { 132 "resource": "my-res", 133 "positional": "", 134 "params": { 135 "x": ["foo", "bar", "baz"] 136 } 137 } 138 }, 139 140 { 141 "scope": "rpc:foo.bar?aud=did:foo:bar?lxm=bar.baz", 142 "generic": { 143 "resource": "rpc", 144 "positional": "foo.bar", 145 "params": { 146 "aud": ["did:foo:bar?lxm=bar.baz"] 147 } 148 } 149 }, 150 { 151 "scope": "my-res?x=my%20value", 152 "generic": { 153 "resource": "my-res", 154 "positional": "", 155 "params": { 156 "x": ["my value"] 157 } 158 } 159 }, 160 { 161 "scope": "my-res:my:pos", 162 "generic": { 163 "resource": "my-res", 164 "positional": "my:pos", 165 "params": {} 166 } 167 } 168]