justinmclean opened a new issue, #4491:
URL: https://github.com/apache/iggy/issues/4491

   The Rust client parses `iggy://` connection strings 
(`core/common/src/types/configuration/auth_config/connection_string.rs`), and 
the Node and C# SDKs do too. The Go SDK has no parser, so Go users build the 
TCP options by hand.
   
   ## What to do
   
   - Add `func ParseConnectionString(connectionString string) ([]tcp.Option, 
error)` in a new file, `foreign/go/client/connection_string.go`.
   - Accept `iggy://` and `iggy+tcp://`, with `user:password@host:port` or a 
personal access token before the `@`, and `tls=true` as a query option. Reject 
other schemes such as `iggy+quic://`. Follow `parseConnectionString` in 
`foreign/node/src/client/client.connection-string.ts`.
   - Build the result from the existing options in 
`foreign/go/client/tcp/tcp_core.go`: `WithServerAddress`, `WithAutoLogin` with 
`NewUsernamePasswordCredentials` or `NewPersonalAccessTokenCredentials`, and 
`WithTLS`. Do not add new credential or TLS types.
   - Add a table test in `foreign/go/client/connection_string_test.go` for 
valid strings, `tls=true`, both credential types, and rejected input. 
`client.connection-string.test.ts` has cases to copy.
   
   ## Done when
   
   `client.NewIggyClient(client.WithTcp(opts...))`, with `opts` from 
`client.ParseConnectionString("iggy://iggy:iggy@localhost:8090")`, connects and 
logs in against a running server, and the tests pass.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to