{"id":13481686,"url":"https://github.com/underarmour/dynago","last_synced_at":"2025-03-27T12:31:18.039Z","repository":{"id":32252283,"uuid":"35826631","full_name":"underarmour/dynago","owner":"underarmour","description":"A DynamoDB client for Go","archived":true,"fork":false,"pushed_at":"2017-08-07T22:07:05.000Z","size":208,"stargazers_count":68,"open_issues_count":3,"forks_count":15,"subscribers_count":118,"default_branch":"master","last_synced_at":"2024-07-31T01:24:21.893Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/underarmour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-18T15:40:20.000Z","updated_at":"2024-06-28T15:26:22.000Z","dependencies_parsed_at":"2022-07-30T06:07:50.205Z","dependency_job_id":null,"html_url":"https://github.com/underarmour/dynago","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/underarmour%2Fdynago","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/underarmour%2Fdynago/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/underarmour%2Fdynago/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/underarmour%2Fdynago/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/underarmour","download_url":"https://codeload.github.com/underarmour/dynago/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213388352,"owners_count":15579724,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:54.239Z","updated_at":"2024-07-31T17:06:45.535Z","avatar_url":"https://github.com/underarmour.png","language":"Go","funding_links":[],"categories":["Database Drivers","数据库驱动","数据库驱动`连接和操作数据库工具`","\u003cspan id=\"数据库驱动-database-drivers\"\u003e数据库驱动 Database Drivers\u003c/span\u003e"],"sub_categories":["Advanced Console UIs","SQL 查询语句构建库","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e"],"readme":"Dynago\n======\n\n[![Build Status](https://travis-ci.org/underarmour/dynago.svg?branch=master)](https://travis-ci.org/underarmour/dynago) [![GoDoc](https://godoc.org/gopkg.in/underarmour/dynago.v1?status.svg)](https://godoc.org/gopkg.in/underarmour/dynago.v1)\n\nDynago is a DynamoDB client API for Go.\n\nKey design tenets of Dynago:\n\n * Most actions are done via chaining to build filters and conditions\n * objects are completely safe for passing between goroutines (even queries and the like)\n * To make understanding easier via docs, we use Amazon's naming wherever possible.\n\nInstallation\n------------\nInstall using `go get`:\n\n    go get gopkg.in/underarmour/dynago.v1\n\nDocs are at http://godoc.org/gopkg.in/underarmour/dynago.v1\n\nExample\n-------\n\nRun a query:\n\n```go\nclient := dynago.NewAwsClient(region, accessKey, secretKey)\n// or you can use below if you have AWS credential values in ENV,\n// in case of running on AWS Lambda, etc.\n// client := dynago.NewAwsClientFromEnv()\n\nquery := client.Query(table).\n\tKeyConditionExpression(\"UserId = :uid\", dynago.P(\":uid\", 42)).\n\tFilterExpression(\"NumViews \u003e :views\").\n\tParam(\":views\", 50).\n\tDesc()\n\nresult, err := query.Execute()\nif err != nil {\n\t// do something\n}\nfor _, row := range result.Items {\n\tfmt.Printf(\"Name: %s, Views: %d\", row[\"Name\"], row[\"NumViews\"])\n}\n```\n\nType Marshaling\n---------------\n\nDynago lets you use go types instead of having to understand a whole lot about dynamo's internal type system.\n\nExample:\n\n```go\ndoc := dynago.Document{\n\t\"name\": \"Bob\",\n\t\"age\": 45,\n\t\"height\": 2.1,\n\t\"address\": dynago.Document{\n\t\t\"city\": \"Boston\",\n\t},\n\t\"tags\": dynago.StringSet{\"male\", \"middle_aged\"},\n}\nclient.PutItem(\"person\", doc).Execute()\n```\n\n * Strings use golang `string`\n * Numbers can be input as `int` (`int64`, `uint64`, etc) or `float64` but always are returned as [`dynago.Number`][dynagoNumber] to not lose precision.\n * Maps can be either `map[string]interface{}` or [`dynago.Document`][dynagoDocument]\n * Opaque binary data can be put in `[]byte`\n * String sets, number sets, binary sets are supported using [`dynago.StringSet`][dynagoStringSet] `dynago.NumberSet` `dynago.BinarySet`\n * Lists are supported using [`dynago.List`][dynagoList]\n * `time.Time` is only accepted if it's a UTC time, and is marshaled to a dynamo string in iso8601 compact format. It comes back as a string, an can be got back using `GetTime()` on `Document`.\n\n[dynagoDocument]: http://godoc.org/gopkg.in/underarmour/dynago.v1#Document\n[dynagoList]: http://godoc.org/gopkg.in/underarmour/dynago.v1#List\n[dynagoNumber]: http://godoc.org/gopkg.in/underarmour/dynago.v1#Number\n[dynagoStringSet]: http://godoc.org/gopkg.in/underarmour/dynago.v1#StringSet\n\nDebugging\n---------\n\nDynago can dump request or response information for you to use in debugging.\nSimply set [`dynago.Debug`][dynagoDebug] with the necessary flags:\n\n```go\ndynago.Debug = dynago.DebugRequests | dynago.DebugResponses\n```\n\nIf you would like to change how the debugging is printed, please set [`dynago.DebugFunc`][dynagoDebugFunc] to your preference.\n\n[dynagoDebug]: http://godoc.org/gopkg.in/underarmour/dynago.v1#Debug\n[dynagoDebugFunc]: http://godoc.org/gopkg.in/underarmour/dynago.v1#DebugFunc\n\nVersion Compatibility\n---------------------\n\nDynago follows [Semantic Versioning](http://semver.org/) via the gopkg.in interface, and within the v1 chain, we will not break the existing API or behaviour of existing code using Dynago. We will add new methods and features, but it again should not break code.\n\nAdditional resources\n--------------------\n * [DynamoDB's own API reference][apireference] explains the operations that DynamoDB supports, and as such will provide more information on how specific parameters and values within dynago actually work.\n * http://godoc.org/github.com/crast/dynatools is a collection of packages with \"edge\" functionality for Dynago, which includes additional libraries to add on, and some functionality which may be considered for merging into dynago core in the future. It includes bits such as pluggable authentication, [support for DynamoDB streams](http://godoc.org/github.com/crast/dynatools/streamer#Streamer), [safe update expressions](http://godoc.org/github.com/crast/dynatools/safeupdate) and more.\n\n[apireference]: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/Welcome.html\n\nThe past, and the future\n------------------------\n\nDynago currently implements all of its support for the underlying DynamoDB API encoding, AWS signing/authentication, etc. This happened in part because the existing libraries out there at the time of writing used deprecated API's and complicated methods, and it was actually cleaner at the time to support the API by fresh implementation.\n\n[AWS-SDK-Go](https://github.com/aws/aws-sdk-go) exists as of June 2015 and has a very up to date API, but the API is via bare structs which minimally wrap protocol-level details of DynamoDB, resulting in it being very verbose for writing applications (dealing with DynamoDB's internal type system is boilerplatey). Once Amazon has brought it out of developer preview, the plan is to have Dynago use it as the underlying protocol and signature implementation, but keep providing Dynago's clean and simple API for building queries and marshaling datatypes in DynamoDB.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funderarmour%2Fdynago","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funderarmour%2Fdynago","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funderarmour%2Fdynago/lists"}