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 ¶
- Variables
- type Client
- func (c *Client) GenerateKubeconfig(ctx context.Context, clusterID string) (string, error)
- func (c *Client) GetCluster(ctx context.Context, clusterID string) (*managementClient.Cluster, error)
- func (c *Client) IsConfigured() bool
- func (c *Client) ListClusters(ctx context.Context) ([]managementClient.Cluster, error)
- func (c *Client) ListProjects(ctx context.Context, clusterID string) ([]managementClient.Project, error)
- func (c *Client) ListUsers(ctx context.Context) ([]managementClient.User, error)
- func (c *Client) LookupCluster(ctx context.Context, clusterID string) (*Cluster, error)
- func (c *Client) LookupProject(ctx context.Context, clusterID, projectID string) (*Project, error)
- func (c *Client) LookupUser(ctx context.Context, userID string) (*User, error)
- type Cluster
- type Project
- type User
Constants ¶
This section is empty.
Variables ¶
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 ¶
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 ¶
IsConfigured returns whether the client is properly configured
func (*Client) ListClusters ¶
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) LookupCluster ¶
LookupCluster finds a cluster by ID Returns the cluster if found, or a helpful error if not found
func (*Client) LookupProject ¶
LookupProject finds a project by ID within a cluster Returns the project 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