model

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capacity

type Capacity struct {
	CPU              string `json:"cpu"`
	Memory           string `json:"memory"`
	Pods             string `json:"pods"`
	EphemeralStorage string `json:"ephemeral_storage"`
}

type Cluster

type Cluster struct {
	Name         string     `json:"name"`
	CACertDigest string     `json:"ca_cert_digest"`
	K8sVersion   string     `json:"k8s_version"`
	CNIVersion   string     `json:"cni_version,omitempty"`
	Location     *Location  `json:"location"`
	NodesCount   int        `json:"nodes_count"`
	Nodes        []Node     `json:"nodes"`
	Components   Components `json:"components"`
}

func (*Cluster) BOMName added in v0.2.5

func (c *Cluster) BOMName() string

func (*Cluster) BOMRef added in v0.2.5

func (c *Cluster) BOMRef() string

type Components added in v0.2.0

type Components struct {
	Images    []Image                 `json:"images,omitempty"`
	Resources map[string]ResourceList `json:"resources"`
}

type Image

type Image struct {
	FullName     string `json:"full_name"`
	Name         string `json:"name"`
	Version      string `json:"version"`
	Digest       string `json:"digest"`
	ControlPlane bool   `json:"-"`
}

func (*Image) PkgID added in v0.2.0

func (i *Image) PkgID() string

type KBOM

type KBOM struct {
	ID          string    `json:"id"`
	BOMFormat   string    `json:"bom_format"`
	SpecVersion string    `json:"spec_version"`
	GeneratedAt time.Time `json:"generated_at"`
	GeneratedBy Tool      `json:"generated_by"`

	Cluster Cluster `json:"cluster"`
}

type Location

type Location struct {
	Name   string `json:"name"`
	Region string `json:"region"`
	Zone   string `json:"zone"`
}

type Node

type Node struct {
	Name                    string            `json:"name"`
	Type                    string            `json:"type"`
	Hostname                string            `json:"hostname"`
	Capacity                *Capacity         `json:"capacity"`
	Allocatable             *Capacity         `json:"allocatable"`
	Labels                  map[string]string `json:"labels"`
	Annotations             map[string]string `json:"annotations"`
	MachineID               string            `json:"machine_id"`
	Architecture            string            `json:"architecture"`
	ContainerRuntimeVersion string            `json:"container_runtime_version"`
	BootID                  string            `json:"boot_id"`
	KernelVersion           string            `json:"kernel_version"`
	KubeProxyVersion        string            `json:"kube_proxy_version"`
	KubeletVersion          string            `json:"kubelet_version"`
	OperatingSystem         string            `json:"operating_system"`
	OsImage                 string            `json:"os_image"`
}

type Resource

type Resource struct {
	Kind       string `json:"kind,omitempty"`
	APIVersion string `json:"api_version,omitempty"`
	Name       string `json:"name"`
	Namespace  string `json:"namespace,omitempty"`
}

type ResourceList

type ResourceList struct {
	Kind           string     `json:"kind"`
	APIVersion     string     `json:"api_version"`
	Namespaced     bool       `json:"namespaced"`
	ResourcesCount int        `json:"count"`
	Resources      []Resource `json:"resources,omitempty"`
}

type Tool

type Tool struct {
	Vendor     string `json:"vendor"`
	Name       string `json:"name"`
	BuildTime  string `json:"build_time"`
	Version    string `json:"version"`
	Commit     string `json:"commit"`
	CommitTime string `json:"commit_time"`
}

Jump to

Keyboard shortcuts

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