Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
GenerateKeyPair generates a new ED25519 key pair for registration
func SaveRegistration ¶
func SaveRegistration(dir string, reg *StoredRegistration) error
SaveRegistration saves the registration data to the specified directory
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles the cluster registration flow
type Config ¶
type Config struct {
ClusterName string `json:"cluster_name"`
OrganizationID string `json:"organization_id,omitempty"` // Optional - user will select in UI
Tags map[string]string `json:"tags,omitempty"`
PublicKey string `json:"public_key,omitempty"` // PEM encoded public key
}
Config contains the configuration for cluster registration
type Result ¶
type Result struct {
RegistrationID string `json:"registration_id"`
AuthURL string `json:"auth_url"`
PollURL string `json:"poll_url"`
ExpiresAt time.Time `json:"expires_at"`
}
Result contains the result of registration initiation
type Status ¶
type Status struct {
Status string `json:"status"`
ClusterID string `json:"cluster_id,omitempty"`
OrganizationID string `json:"organization_id,omitempty"`
ServiceAccountID string `json:"service_account_id,omitempty"`
DNSHostname string `json:"dns_hostname,omitempty"`
}
Status represents the status of a registration during polling
type StoredRegistration ¶
type StoredRegistration struct {
ClusterID string `json:"cluster_id"`
ClusterName string `json:"cluster_name"`
OrganizationID string `json:"organization_id"`
ServiceAccountID string `json:"service_account_id"`
DNSHostname string `json:"dns_hostname,omitempty"` // Auto-provisioned DNS hostname from cloud
PrivateKey string `json:"private_key"` // PEM encoded private key
CloudURL string `json:"cloud_url"`
RegisteredAt time.Time `json:"registered_at"`
Tags map[string]string `json:"tags,omitempty"`
// Pending registration fields
Status string `json:"status,omitempty"` // "pending" or "approved"
RegistrationID string `json:"registration_id,omitempty"`
PollURL string `json:"poll_url,omitempty"`
ExpiresAt time.Time `json:"expires_at,omitempty"`
}
StoredRegistration contains the registration data stored on disk
func LoadRegistration ¶
func LoadRegistration(dir string) (*StoredRegistration, error)
LoadRegistration loads the registration data from the specified directory
Click to show internal directories.
Click to hide internal directories.