register

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegisterCmd = &cobra.Command{
	Use:   "register",
	Short: "Register this server with Alpacon",
	Long: `Register this server with Alpacon.
Requires an API token with servers:register scope.
Groups are automatically assigned from the token's allowed_groups configuration.

Examples:
  sudo alpamon register --url https://alpacon.example.com --token <TOKEN>
  sudo alpamon register --url https://alpacon.example.com --token <TOKEN> --name my-server

Options:
  --url         Alpacon server URL (required)
  --token       API token (servers:register scope required)
  --name        Server name (optional, defaults to hostname)
  --platform    Platform (debian/rhel, auto-detect if omitted)
  --ssl-verify  SSL certificate verification (default: true)
  --ca-cert     CA certificate path`,
	RunE: runRegister,
}

RegisterCmd represents the register command

Functions

This section is empty.

Types

type RegisterRequest

type RegisterRequest struct {
	Name     string `json:"name"`
	Platform string `json:"platform"`
}

RegisterRequest represents the request body for server registration

type RegisterResponse

type RegisterResponse struct {
	ID   string `json:"id"`
	Key  string `json:"key"`
	Name string `json:"name"`
}

RegisterResponse represents the response from server registration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL