norman

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package norman provides the Norman API client for Rancher management operations. Norman is Rancher's v3 API used for managing clusters, projects, and users.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotConfigured = fmt.Errorf("norman client not configured")

ErrNotConfigured is returned when the Norman client is not properly configured

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps the Rancher management client for Norman API operations

func NewClient

func NewClient(cfg *config.StaticConfig) (*Client, error)

NewClient creates a new Norman API client

func (*Client) GenerateKubeconfig

func (c *Client) GenerateKubeconfig(ctx context.Context, clusterID string) (string, error)

GenerateKubeconfig generates kubeconfig for a cluster

func (*Client) GetCluster

func (c *Client) GetCluster(ctx context.Context, clusterID string) (*managementClient.Cluster, error)

GetCluster returns a specific cluster by ID. Deprecated: Use LookupCluster instead for better error messages.

func (*Client) IsConfigured

func (c *Client) IsConfigured() bool

IsConfigured returns whether the client is properly configured

func (*Client) ListClusters

func (c *Client) ListClusters(ctx context.Context) ([]managementClient.Cluster, error)

ListClusters returns all clusters

func (*Client) ListProjects

func (c *Client) ListProjects(ctx context.Context, clusterID string) ([]managementClient.Project, error)

ListProjects returns all projects for a cluster

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context) ([]managementClient.User, error)

ListUsers returns all users

func (*Client) LookupCluster

func (c *Client) LookupCluster(ctx context.Context, clusterID string) (*Cluster, error)

LookupCluster finds a cluster by ID Returns the cluster if found, or a helpful error if not found

func (*Client) LookupProject

func (c *Client) LookupProject(ctx context.Context, clusterID, projectID string) (*Project, error)

LookupProject finds a project by ID within a cluster Returns the project if found, or a helpful error if not found

func (*Client) LookupUser

func (c *Client) LookupUser(ctx context.Context, userID string) (*User, error)

LookupUser finds a user by ID Returns the user if found, or a helpful error if not found

type Cluster

type Cluster = managementClient.Cluster

Type aliases for compatibility with existing code

type Project

type Project = managementClient.Project

Type aliases for compatibility with existing code

type User

type User = managementClient.User

Type aliases for compatibility with existing code

Jump to

Keyboard shortcuts

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