{"id":38236866,"url":"https://github.com/lyubenblagoev/goprsc","last_synced_at":"2026-01-17T01:06:53.012Z","repository":{"id":57539703,"uuid":"95032602","full_name":"lyubenblagoev/goprsc","owner":"lyubenblagoev","description":"Goprsc is a GO client library for the Postfix Rest Server","archived":false,"fork":false,"pushed_at":"2021-03-16T15:50:15.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-07-27T22:19:59.787Z","etag":null,"topics":["golang","library","postfix-rest-server"],"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/lyubenblagoev.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":"2017-06-21T18:09:58.000Z","updated_at":"2021-04-14T23:24:03.000Z","dependencies_parsed_at":"2022-09-26T18:31:50.288Z","dependency_job_id":null,"html_url":"https://github.com/lyubenblagoev/goprsc","commit_stats":null,"previous_names":[],"tags_count":1,"template":null,"template_full_name":null,"purl":"pkg:github/lyubenblagoev/goprsc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyubenblagoev%2Fgoprsc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyubenblagoev%2Fgoprsc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyubenblagoev%2Fgoprsc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyubenblagoev%2Fgoprsc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyubenblagoev","download_url":"https://codeload.github.com/lyubenblagoev/goprsc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyubenblagoev%2Fgoprsc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T00:50:05.742Z","status":"ssl_error","status_checked_at":"2026-01-17T00:43:11.982Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","library","postfix-rest-server"],"created_at":"2026-01-17T01:06:49.135Z","updated_at":"2026-01-17T01:06:53.003Z","avatar_url":"https://github.com/lyubenblagoev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Goprsc\n\nGoprsc is a GO client library for accessing the [Postfix Rest Server][1] V1 API. \n\nGoprsc currently implements all [Postfix Rest Server][1] APIs (domains, accounts, aliases, automatic sender and recipient BCC).\n\n## Usage\n\n```go\nimport \"github.com/lyubenblagoev/goprsc\"\n```\n\nCreate a new client and use the exposed services to access different parts of the [Postfix Rest Server][1] API.\n\nUse the DefaultClient:\n\n```go\nclient := goprsc.DefaultClient\n```\n\nCreate a new Client using NewClient(*http.Client):\n\n```go\nvar httpClient *http.Client\n\n...\n\nclient := goprsc.NewClient(httpClient)\n```\n\nCreate a new client using NewClientWithOptions(*http.Client, ...ClientOption):\n\n```go\nclient := goprsc.NewClientWithOptions(nil, HTTPSProtocolOption())\n```\n\nClient options allow changing the default protocol, host, port and user agent string using HTTPSProtocolOption(), HostOption(), PortOption() and UserAgentOption() functions. These functions return a ClientOption which changes the corresponding option in the client.\n\n## Examples\n\nTo create a new domain:\n\n```go\nclient := goprsc.DefaultClient\n\ndomainName := \"example.com\"\n\nif err := client.Domains.Create(domainName); err != nil {\n    fmt.Printf(\"Unable to create domain %s\\n\\n\", domainName)\n    return err\n}\n```\n\nTo get a list of all accounts in a domain:\n\n```go\n\nclient := goprsc.DefaultClient\n\ndomainName := \"example.com\"\n\naccounts, err := client.Accounts.List(domainName)\nif err != nil {\n    fmt.Printf(\"Unable to list accounts for domain %s\\n\\n\", domainName)\n    return err\n}\n```\n\nSimilarly you can manage other entities.\n\nFor more usage examples, you may wish to take a look at [emailctl][2] (a CLI for the [Postfix Rest Server][1]).\n\n[1]: https://github.com/lyubenblagoev/postfix-rest-server \"Postfix Rest Server\"\n[2]: https://github.com/lyubenblagoev/emailctl \"emailctl\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyubenblagoev%2Fgoprsc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyubenblagoev%2Fgoprsc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyubenblagoev%2Fgoprsc/lists"}