8000 GitHub - hibare/headscale-client-go: A client implementation for the Headscale HTTP API
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hibare/headscale-client-go

Repository files navigation

headscale-cleint-go Logo

Headscale Client Go

A Go client for the Headscale HTTP API.

Go Reference Go Report Card FOSSA Status FOSSA Status

Caution

This project is under active development and may not yet be stable. If you encounter any issues, please open an issue report.

Features

  • Manage API Keys: List, create, expire, and delete API keys.
  • Manage 8474 Nodes: List, get, register, delete, expire, rename, tag, update user, and backfill IPs for nodes.
  • Manage Users: List, create, delete, and rename users.
  • Manage Policies: Get and update policy documents.
  • Manage Pre-Auth Keys: List, create, and expire pre-auth keys.
  • Customizable HTTP client, user agent, and logger support.
  • Idiomatic Go API with context support.

Installation

Requires Go 1.24+ and Headscale v0.26.0 & above.

go get github.com/hibare/headscale-client-go

Usage

See the examples/ directory for usage examples.

API Overview

The client exposes resource interfaces for each Headscale API resource:

  • client.APIKeys() – Manage API keys
  • client.Nodes() – Manage nodes
  • client.Users() – Manage users
  • client.Policy() – Manage policy
  • client.PreAuthKeys() – Manage pre-auth keys

Each resource provides methods for CRUD and management operations. See pkg.go.dev for full API documentation.


Development & Contributing

  • Run tests:
    make test
  • Lint:
    make install-golangci-lint
    golangci-lint run
  • Pre-commit hooks:
    make install-pre-commit
    pre-commit run --all-files
  • Formatting:
    go fmt ./...

Contributions are welcome! Please open issues or pull requests.


License

This project is licensed under the MIT License. See LICENSE for details.


Links

About

A client implementation for the Headscale HTTP API

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  
0