{"id":20887500,"url":"https://github.com/netscaler/adc-nitro-go","last_synced_at":"2025-05-12T19:33:44.655Z","repository":{"id":37100195,"uuid":"359447990","full_name":"netscaler/adc-nitro-go","owner":"netscaler","description":"NITRO API SDK for Golang","archived":false,"fork":false,"pushed_at":"2023-10-12T08:38:34.000Z","size":855,"stargazers_count":11,"open_issues_count":14,"forks_count":11,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-03-27T01:13:50.537Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netscaler.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,"governance":null}},"created_at":"2021-04-19T12:16:43.000Z","updated_at":"2023-10-02T21:14:17.000Z","dependencies_parsed_at":"2023-01-28T17:15:15.863Z","dependency_job_id":"6efad303-797f-4d19-a9ce-78d6f7700d44","html_url":"https://github.com/netscaler/adc-nitro-go","commit_stats":null,"previous_names":["netscaler/adc-nitro-go","citrix/adc-nitro-go"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netscaler%2Fadc-nitro-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netscaler%2Fadc-nitro-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netscaler%2Fadc-nitro-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netscaler%2Fadc-nitro-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netscaler","download_url":"https://codeload.github.com/netscaler/adc-nitro-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253808559,"owners_count":21967557,"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-18T08:20:25.899Z","updated_at":"2025-05-12T19:33:42.795Z","avatar_url":"https://github.com/netscaler.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go client for configuring Citrix ADC\n\n## About\n\nThe Citrix®ADC® NITRO for GO allows you to configure and monitor the NetScaler appliance programmatically in GO based applications.\n\n## Installation\n- From github\n\n```\ngo get github.com/citrix/adc-nitro-go\n```\n- When downloaded from Citrix ADC GUI\n\nOnce you have a copy of the source archive unpacked into a similarly-named directory, run following command:\n```\n./install.sh\n```\n`install.sh` will copy the lib to `$GOPATH/src/github.com/citrix/adc-nitro-go`.\n\n## Usage\nImport the SDK from github.com/citrix/adc-nitro-go/service. Config objects are available at github.com/citrix/adc-nitro-go/resource/config.\nInstantiate a client using `NewNitroClient`. To initialize the client from environment variables:\n\n```\nexport NS_URL=http://\u003cip-address\u003e\nexport NS_LOGIN=\u003cadc-username\u003e\nexport NS_PASSWORD=\u003cadc-password\u003e\n```\n\nConfig object types can be passed in as strings (\"lbvserver\"), or looked up from `service.\u003cconfig object type\u003e.Type()`.\nThe general pattern for NetScaler config objects is some combination of  `AddResource`, `UpdateResource`, `BindResource`, `UnbindResource` and `DeleteResource`.\n\nLogging level can be set using env variable `NS_LOG` or calling function `client.SetLogLevel(\"debug\")`.\n## Example\n\n```\npackage main\n\nimport (\n        \"github.com/citrix/adc-nitro-go/resource/config/lb\"\n        \"github.com/citrix/adc-nitro-go/service\"\n)\n\nfunc main() {\n        client, _ := service.NewNitroClientFromEnv()\n        lb1 := lb.Lbvserver{\n                Name:        \"sample_lb\",\n                Ipv46:       \"10.71.136.50\",\n                Lbmethod:    \"ROUNDROBIN\",\n                Servicetype: \"HTTP\",\n                Port:        8000,\n        }\n        _, err := client.AddResource(service.Lbvserver.Type(), \"sample_lb\", \u0026lb1)\n        if err == nil {\n            client.SaveConfig()\n        }\n}\n\n```\n\n### Unit Tests\nThe unit tests are invoked with `make unit`. Note that they are actually functional tests and need a running NetScaler. The tests also need the environment variables `NS_URL`, `NS_LOGIN` and `NS_PASSWORD` to be set. Additionaly `NS_LOG` can be set for setting log level and `ADC_PLATFORM` to `CPX` for skipping some tests which don't work for CPX.\n\n### Using HTTPS\nIf you specify `https` in the URL then the client will use HTTPS. By default it will verify the presented certificate. If you want to use the default or self-signed certificates without verification, specify `sslVerify=false` in the constructor `NewNitroClientFromParams` or set the environment variable `NS_SSLVERIFY` to `false` and use the `NewNitroClientFromEnv` constructor\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetscaler%2Fadc-nitro-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetscaler%2Fadc-nitro-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetscaler%2Fadc-nitro-go/lists"}