···11-21
3244-indigo: atproto libraries and services in golang
55-================================================
33+# indigo: atproto libraries and services in golang
6475Some Bluesky software is developed in Typescript, and lives in the [bluesky-social/atproto](https://github.com/bluesky-social/atproto) repository. Some is developed in Go, and lives here.
86···108119**Go Services:**
12101313-* **bigsky** ([README](./cmd/bigsky/README.md)): "Big Graph Service" (BGS) reference implementation, running at `bsky.network`
1414-* **palomar** ([README](./cmd/palomar/README.md)): fulltext search service for <https://bsky.app>
1111+- **bigsky** ([README](./cmd/bigsky/README.md)): "Big Graph Service" (BGS) reference implementation, running at `bsky.network`
1212+- **palomar** ([README](./cmd/palomar/README.md)): fulltext search service for <https://bsky.app>
15131614**Go Packages:**
17151818-> ⚠️ All the packages in this repository are under active development. Features and software interfaces have not stabilized and may break or be removed.
1616+> ⚠️ All the packages in this repository are under active development. Features and software interfaces have not stabilized and may break or be removed.
19172020-| Package | Docs |
2121-| -------- | ---- |
2222-| `api/atproto`: generated types for `com.atproto.*` Lexicons | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/api/atproto) |
2323-| `api/bsky`: generated types for `app.bsky.*` Lexicons | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/api/bsky) |
2424-| `atproto/crypto`: crytographic signing and key serialization | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/atproto/crypto) |
2525-| `atproto/identity`: DID and handle resolution | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/atproto/identity) |
2626-| `atproto/syntax`: string types and parsers for identifiers | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/atproto/syntax) |
2727-| `mst`: Merkle Search Tree implementation | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/mst) |
2828-| `repo`: account data storage | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/repo) |
2929-| `xrpc`: HTTP API client | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/xrpc) |
1818+| Package | Docs |
1919+| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
2020+| `api/atproto`: generated types for `com.atproto.*` Lexicons | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/api/atproto) |
2121+| `api/bsky`: generated types for `app.bsky.*` Lexicons | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/api/bsky) |
2222+| `atproto/crypto`: crytographic signing and key serialization | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/atproto/crypto) |
2323+| `atproto/identity`: DID and handle resolution | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/atproto/identity) |
2424+| `atproto/syntax`: string types and parsers for identifiers | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/atproto/syntax) |
2525+| `mst`: Merkle Search Tree implementation | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/mst) |
2626+| `repo`: account data storage | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/repo) |
2727+| `xrpc`: HTTP API client | [](https://pkg.go.dev/mod/github.com/bluesky-social/indigo/xrpc) |
30283129The TypeScript reference implementation, including PDS and bsky AppView services, is at [bluesky-social/atproto](https://github.com/bluesky-social/atproto). Source code for the Bluesky Social client app (for web and mobile) can be found at [bluesky-social/social-app](https://github.com/bluesky-social/social-app).
3232-33303431## Development Quickstart
3532···4744 go run ./cmd/bigsky
48454946The [HACKING](./HACKING.md) file has a list of commands and packages in this repository and some other development tips.
5050-51475248## What is atproto?
53495454-*not to be confused with the [AT command set](https://en.wikipedia.org/wiki/Hayes_command_set) or [Adenosine triphosphate](https://en.wikipedia.org/wiki/Adenosine_triphosphate)*
5050+_not to be confused with the [AT command set](https://en.wikipedia.org/wiki/Hayes_command_set) or [Adenosine triphosphate](https://en.wikipedia.org/wiki/Adenosine_triphosphate)_
55515652The Authenticated Transfer Protocol ("ATP" or "atproto") is a decentralized social media protocol, developed by [Bluesky PBC](https://bsky.social). Learn more at:
5753···6157- [Blogpost on self-authenticating data structures](https://bsky.social/about/blog/3-6-2022-a-self-authenticating-social-protocol)
62586359The Bluesky Social application encompasses a set of schemas and APIs built in the overall AT Protocol framework. The namespace for these "Lexicons" is `app.bsky.*`.
6464-65606661## Contributions
6762···8883 - Introduce new unnecessary dependencies
89849085Remember, we serve a wide community of users. Our day-to-day involves us constantly asking "which top priority is our top priority." If you submit well-written PRs that solve problems concisely, that's an awesome contribution. Otherwise, as much as we'd love to accept your ideas and contributions, we really don't have the bandwidth.
9191-92869387## Are you a developer interested in building on atproto?
9488
+6-2
search/parse_query.go
···2121 return r == ' ' && !quoted
2222 })
23232424- keep := make([]string, len(parts))
2424+ keep := make([]string, 0, len(parts))
2525 for _, p := range parts {
2626 p = strings.Trim(p, "\"")
2727···6060 out := ""
6161 for _, p := range keep {
6262 if strings.ContainsRune(p, ' ') {
6363- out += fmt.Sprintf(" \"%s\"", p)
6363+ if out == "" {
6464+ out = fmt.Sprintf(`"%s"`, p)
6565+ } else {
6666+ out += " " + fmt.Sprintf(`"%s"`, p)
6767+ }
6468 } else {
6569 if out == "" {
6670 out = p
+5
search/parse_query_test.go
···4545 q, f = ParseQuery(ctx, &dir, p4)
4646 assert.Equal("*", q)
4747 assert.Equal(1, len(f))
4848+4949+ p5 := `from:known.example.com "multi word phrase" coolio blorg`
5050+ q, f = ParseQuery(ctx, &dir, p5)
5151+ assert.Equal(`"multi word phrase" coolio blorg`, q)
5252+ assert.Equal(1, len(f))
4853}