nc

package
v0.0.0-...-5597880 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package nc implements a simple client for interacting with the Nais console API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(apiURL, apiKey, naisClusterName string, client *http.Client) *Client

func (*Client) GetTeamGoogleProjects

func (c *Client) GetTeamGoogleProjects(ctx context.Context) (map[string]string, error)

type Data

type Data struct {
	Teams Teams `json:"teams"`
}

type Environment

type Environment struct {
	Name         string `json:"name"`
	GcpProjectID string `json:"gcpProjectID"`
}

type Fetcher

type Fetcher interface {
	GetTeamGoogleProjects(ctx context.Context) (map[string]string, error)
}

type PageInfo

type PageInfo struct {
	HasNextPage bool `json:"hasNextPage"`
}

type Response

type Response struct {
	Data Data `json:"data"`
}

type Team

type Team struct {
	Slug         string        `json:"slug"`
	Environments []Environment `json:"environments"`
}

type Teams

type Teams struct {
	Nodes    []Team   `json:"nodes"`
	PageInfo PageInfo `json:"pageInfo"`
}

Jump to

Keyboard shortcuts

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