{"id":20645473,"url":"https://github.com/leboncoin/avrocado","last_synced_at":"2025-04-16T02:10:50.530Z","repository":{"id":55571355,"uuid":"124411047","full_name":"leboncoin/avrocado","owner":"leboncoin","description":"Avrocado is a convenience library to handle Avro in Golang","archived":false,"fork":false,"pushed_at":"2025-01-19T00:15:25.000Z","size":229,"stargazers_count":27,"open_issues_count":2,"forks_count":7,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-29T04:02:14.049Z","etag":null,"topics":["avro","go","golib","leboncoin"],"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/leboncoin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-08T15:30:50.000Z","updated_at":"2024-06-21T08:42:25.000Z","dependencies_parsed_at":"2022-08-15T03:20:50.228Z","dependency_job_id":null,"html_url":"https://github.com/leboncoin/avrocado","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leboncoin%2Favrocado","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leboncoin%2Favrocado/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leboncoin%2Favrocado/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leboncoin%2Favrocado/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leboncoin","download_url":"https://codeload.github.com/leboncoin/avrocado/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249183106,"owners_count":21226142,"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":["avro","go","golib","leboncoin"],"created_at":"2024-11-16T16:19:58.426Z","updated_at":"2025-04-16T02:10:50.486Z","avatar_url":"https://github.com/leboncoin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/leboncoin/avrocado.svg?branch=master)](https://travis-ci.org/leboncoin/avrocado)\n\n# Avrocado\n\nAvrocado is a convenience library to handle Avro in golang, built on top of [linkedin/goavro](https://github.com/linkedin/goavro).\nIt is split into three parts:\n* Avro marshalling/unmarshalling using structure fields annotations inspired by the JSON standard library.\n* A [confluentinc/schema-registry](https://github.com/confluentinc/schema-registry) client.\n* A codec registry which handles marshalling/unmarshalling schemas from the schema-registry.\n\n## Getting Started\n\nYou can start using the library after installing by importing it in your go code.\nYou need to annotate the types you want to marshal with the avro tag.\nFinally you will have to instantiate a codec with the corresponding Avro schema:\n\n```\nimport \"github.com/leboncoin/avrocado\"\n\nimport (\n        \"fmt\"\n)\n\ntype Someone struct {\n        Name string `avro:\"name\"`\n        Age  int32  `avro:\"age\"`\n}\n\nfunc ExampleCodec() {\n        val := Someone{\"MyName\", 3}\n        var decoded Someone\n\n        schema := `{\n          \"type\": \"record\",\n          \"name\": \"Someone\",\n          \"fields\": [\n            {\n              \"name\": \"name\",\n              \"type\": \"string\"\n            }, {\n              \"name\": \"age\",\n              \"type\": \"int\"\n            }\n          ]\n        }`\n\n        codec, err := NewCodec(schema)\n        if err != nil {\n                panic(fmt.Sprintf(\"wrong schema: %s\", err))\n        }\n\n        avro, err := codec.Marshal(\u0026val)\n        if err != nil {\n                panic(fmt.Sprintf(\"unable to serialize to avro: %s\", err))\n        }\n\n        err = codec.Unmarshal(avro, \u0026decoded)\n        if err != nil {\n                panic(fmt.Sprintf(\"unable to deserialize from avro: %s\", err))\n        }\n}\n\n```\n\nThe example can also be found [here](example_test.go).\n\n## Installing\n\nJust run `go get github.com/leboncoin/avrocado`.\n\n## Examples\n\nSee the test files for examples on how to use the library.\n\n## Running tests\nJust run `go test` at the root directory of this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleboncoin%2Favrocado","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleboncoin%2Favrocado","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleboncoin%2Favrocado/lists"}