Giter Site home page Giter Site logo

gocommon's People

Contributors

awensaunders avatar dependabot[bot] avatar ericnewcomer avatar keithnoguchi avatar koallann avatar nicpottier avatar norkans7 avatar rasoro avatar robi9 avatar rowanseymour avatar tybritten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gocommon's Issues

Tel Parsing should deal with full tel URNs better

urns.NewTelURNForCountry("tel:+12065551212", "US") -> tel:+tel12065551212

Which seems mighty unfortunate considering how many people probably intuitively want to use @urns.tel as the argument to things that expect a telephone number.

Detecting we are given a tel URN seems like it would probably be worth it? What are possible downsides there?

Also feels super weird that the current behavior ends up with + prefixed on the returned number.

@rowanseymour feels liken number parsing this has been under a lot of flux lately, any opinions here?

URN Normalization needs to be idempotent

Normalizing tel+2621112222 (invalid) returns tel:2621112222 (invalid) but normalizing that returns tel:+12621112222 (valid).

Maybe we need to combine normalization and validation, e.g. NormalizeAndValidate which will only ever return a number which passes phonenumber.parse.

Add more things!

This is more a urns package than a gocommon package.

There are a bunch of things which we could probably move from courier / goflow / mailroom to here to unify our use. Some ideas:

  • UUID handling / generation
  • fair queueing / task running
  • HTTP request / response logging and tracing
  • DB utilities for batch inserts / updates (in mailroom)

Bug when using S3 compatible (not amazon) services

I use Minio in my local development environment to support developing on attachments. It doesn't work properly right now, because all the URLs that courier passes to rapidpro are wrong, pointing to Amazon S3 rather than my local minio environment.

var s3BucketURL = "https://%s.s3.amazonaws.com%s"
is hardcoded to amazon's URL. If it pulled from the config instead, it would be portable to various S3 compatible services.

I could make a PR if you want.

httpx.Trace should include errors in response?

Looking to use Trace in swaggo and it is mostly great but there's a few things that feel like they are missing from a DRY perspective:

  • trace works great if we actually reach the HTTP server and get a response, but doesn't do much to help in the case of connection errors etc.. ideally we'd like to have these logged with the trace.
  • trace doesn't really have a concept of whether a request was successful or not (ie, was an error) Can easily see the argument that this belongs on the caller's side, but it does feel like checking for 4**/5** status codes (and err above) could automatically qualify a trace as being an "error"?

I guess it is balance between whether we think those two things would cause trouble elsewhere, but I certainly am finding myself wanting to use Trace as a way to say create an HTTPLog as a standalone thing and it isn't so convenient because of the above.

Thoughts @rowanseymour ?

BulkQuery should support more complex `VALUES` clauses

dbutil.BulkQuery currently only works when statement includes the exact text VALUES( but sometimes depending on formatting style it might be preferable to write it VALUES (.

Would be useful if it allowed casts as well, e.g. VALUES (:id::int) so that the column is created with type int and you don't have to use ::int elsewhere in the query.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.