๐Ÿ€ ATproto library for gleam
atproto library gleam
34

Configure Feed

Select the types of activity you want to include in your feed.

possum/handle: add doc comments to error variants

kacaii.dev (Jul 10, 2026, 8:05 PM -0300) de9d0ef0 906acaff

+16 -2
+16 -2
src/possum/handle.gleam
··· 8 8 import gleam/result 9 9 import gleam/string 10 10 11 + /// Available on: https://atproto.com/specs/handle#additional-non-syntax-restrictions#handle-identifier-syntax 11 12 const pattern = "^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$" 12 13 13 14 pub type ParseError { 15 + /// Regex failed to compile 14 16 InvalidRegexPattern(pattern: String) 17 + /// String does not have a valid handle format 15 18 InvalidFormat(value: String) 16 19 /// "Reserved" top-level domains should not fail syntax validation, 17 - /// but they must immediately fail any attempt at registration, 18 - /// resolution, etc. 20 + /// but they must immediately fail any attempt at registration. 21 + /// 22 + /// The following TLD are not allowed: 23 + /// 24 + /// - .alt 25 + /// - .arpa 26 + /// - .internal 27 + /// - .invalid 28 + /// - .local 29 + /// - .localhost 30 + /// - .onion 31 + /// 32 + /// Documentation: [Non-syntax Retrictions](https://atproto.com/specs/handle#additional-non-syntax-restrictions) 19 33 DisallowedTopLevelDomain(domain: String) 20 34 } 21 35