{"id":20954393,"url":"https://github.com/devsisters/go-caplit","last_synced_at":"2025-05-14T04:32:46.042Z","repository":{"id":57520203,"uuid":"55600646","full_name":"devsisters/go-caplit","owner":"devsisters","description":"Go caplit message deserializer","archived":false,"fork":false,"pushed_at":"2018-10-29T12:43:19.000Z","size":38,"stargazers_count":17,"open_issues_count":1,"forks_count":0,"subscribers_count":47,"default_branch":"master","last_synced_at":"2024-06-20T10:18:17.737Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/devsisters.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":"2016-04-06T11:35:17.000Z","updated_at":"2019-02-04T21:33:12.000Z","dependencies_parsed_at":"2022-09-05T11:30:06.330Z","dependency_job_id":null,"html_url":"https://github.com/devsisters/go-caplit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2Fgo-caplit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2Fgo-caplit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2Fgo-caplit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsisters%2Fgo-caplit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsisters","download_url":"https://codeload.github.com/devsisters/go-caplit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225275657,"owners_count":17448389,"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-11-19T01:14:33.661Z","updated_at":"2024-11-19T01:14:34.318Z","avatar_url":"https://github.com/devsisters.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-caplit\nIt is CapLit message deserializer for Go. CapLit stands for 'capnproto literal'. So, this library converts a text(CapLit format) to a Go Object.  \nFor instance, if you have 'Person' Struct with 2 attributes(name, age), you can make a Person object from string '(name=\"gopher\", age=10)' using this library.\n\n# Install\n```\ngo get -u github.com/devsisters/go-caplit\n```\nThere are no dependencies for this library.\n\n# Usage\nSince Go does not support Generic Type, we have to generate 'ReadCapLit' method for each capnp structs.  \nTo generate ReadCapLit function, we need the go codes generated by 'capnp compile'  \nYou can use ReadCapLit function with follwing 3 steps.\n\n\n1. Compile your .capnp files  \n ```\n  $ capnp compile -ogo --src-prefix=import {path}/*.capnp\n ```\n2. Generate ReadCapLit functions with 'GenCapnpReadCapLit' function  \n GenCapnpReadCapLit function generates ReadCapLit functions. It takes 5 parameters :  \n  - Path of Input capnp.go files\n  - Output file name\n  - Output file package\n  - List of enums\n    - You can make 'EnumList' with 'GetEnumList'. If your capnp struct includes other capnp package's enums, you have to give them.\n  - Extra imports in generated go file\n    - If your capnp struct includes other capnp package's structs or enums, you have to give them.  \n  \n It is recommended to use this function with `go generate` command. There are 2 example code that works with 'go generate' - example/singlepackage/gen/generate.go, example/multipackage/gen/generate.go.\n3. Use ReadCapLit function with your own caplit string\n\n# Examples\nYou can get 2 examples in `example` folder - the examples work with `make` command.  \n\n# License\nMIT License. see LICENSE file.\n\n# What is Cap'n Proto?\n\"Cap’n Proto is an insanely fast data interchange format and capability-based RPC system.\"\n\nSee details : http://kentonv.github.io/capnproto/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsisters%2Fgo-caplit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsisters%2Fgo-caplit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsisters%2Fgo-caplit/lists"}