{"id":17330614,"url":"https://github.com/adam12/ecto_network","last_synced_at":"2025-05-16T06:03:16.835Z","repository":{"id":46235899,"uuid":"62100444","full_name":"adam12/ecto_network","owner":"adam12","description":"Ecto types to support MACADDR and Network extensions provided by Postgrex.","archived":false,"fork":false,"pushed_at":"2025-03-24T01:29:26.000Z","size":131,"stargazers_count":61,"open_issues_count":0,"forks_count":21,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T12:05:56.111Z","etag":null,"topics":["ecto-types","postgrex","support-macaddr"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/adam12.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-28T01:35:32.000Z","updated_at":"2025-03-24T01:29:29.000Z","dependencies_parsed_at":"2023-12-12T16:49:47.982Z","dependency_job_id":"65c25b7a-f1e5-4e73-90fc-0f72b3ecae6f","html_url":"https://github.com/adam12/ecto_network","commit_stats":{"total_commits":96,"total_committers":12,"mean_commits":8.0,"dds":"0.13541666666666663","last_synced_commit":"d1b38510fb7ab942797a4b78f3a6db62d3b6f2fa"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Fecto_network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Fecto_network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Fecto_network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adam12%2Fecto_network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adam12","download_url":"https://codeload.github.com/adam12/ecto_network/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478160,"owners_count":22077675,"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":["ecto-types","postgrex","support-macaddr"],"created_at":"2024-10-15T14:51:48.653Z","updated_at":"2025-05-16T06:03:16.747Z","avatar_url":"https://github.com/adam12.png","language":"Elixir","readme":"# EctoNetwork\n\n[![Module Version](https://img.shields.io/hexpm/v/ecto_network.svg)](https://hex.pm/packages/ecto_network)\n[![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen.svg)](https://hexdocs.pm/ecto_network/)\n[![Total Download](https://img.shields.io/hexpm/dt/ecto_network.svg)](https://hex.pm/packages/ecto_network)\n[![License](https://img.shields.io/hexpm/l/ecto_network.svg)](https://github.com/adam12/ecto_network/blob/master/LICENSE)\n[![Last Updated](https://img.shields.io/github/last-commit/adam12/ecto_network.svg)](https://github.com/adam12/ecto_network/commits/master)\n\nEcto types to support MACADDR and Network extensions provided by Postgrex.\n\nAlthough this is primarily an Ecto library, it has a hard dependency on Postgrex\ndue to the types it is providing.\n\n## Installation\n\n1. Add `:ecto_network` to your list of dependencies in `mix.exs`:\n\n    ```elixir\n    def deps do\n      [\n        # or 0.7.0 if you're stuck on Ecto \u003c 3\n        {:ecto_network, \"~\u003e 1.5.0\"}\n      ]\n    end\n    ```\n\n2. Create your migrations using the Postgres types as atoms.\n\n    ```elixir\n    def change do\n      create table(:your_table) do\n        add :ip_address, :inet\n        add :mac_address, :macaddr\n        add :network, :cidr\n      end\n    end\n    ```\n\n3. Use the new types in your Ecto schemas.\n\n    ```elixir\n    schema \"your_table\" do\n      field :ip_address, EctoNetwork.INET\n      field :mac_address, EctoNetwork.MACADDR\n      field :network, EctoNetwork.CIDR\n    end\n    ```\n\n## Contributing\n\nI love pull requests! If you fork this project and modify it, please ping me to see\nif your changes can be incorporated back into this project.\n\nThat said, if your feature idea is nontrivial, you should probably open an issue to\n[discuss it](http://www.igvita.com/2011/12/19/dont-push-your-pull-requests/)\nbefore attempting a pull request.\n\n## Copyright and License\n\nCopyright (c) 2016 Adam Daniels and contributors\n\nEctoNetwork is released under the MIT License. See [LICENSE.md](./LICENSE.md) for\nmore information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam12%2Fecto_network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadam12%2Fecto_network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadam12%2Fecto_network/lists"}