Skip to content

Commit

Permalink
chore: make metatadata pkg public
Browse files Browse the repository at this point in the history
Make metadata pkg public.

Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
frezbo committed Jul 18, 2024
1 parent 7a4de58 commit 8b4e0d9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion internal/frontend/http/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"gopkg.in/yaml.v3"

"github.com/siderolabs/image-factory/internal/artifacts"
"github.com/siderolabs/image-factory/internal/frontend/http/metadata"
"github.com/siderolabs/image-factory/internal/version"
"github.com/siderolabs/image-factory/pkg/metadata"
"github.com/siderolabs/image-factory/pkg/schematic"
)

Expand Down
5 changes: 5 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func New(baseURL string, options ...Option) (*Client, error) {
return c, nil
}

// BaseURL returns the base URL of the client.
func (c *Client) BaseURL() string {
return c.baseURL.String()
}

// SchematicCreate generates new schematic from the configuration.
func (c *Client) SchematicCreate(ctx context.Context, schematic schematic.Schematic) (string, error) {
data, err := schematic.Marshal()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import (
"github.com/siderolabs/image-factory/internal/artifacts"
)

// Arch represents an architecture supported by Talos.
type Arch = artifacts.Arch

// Platform represents a platform supported by Talos.
type Platform struct {
Name string
Expand All @@ -19,7 +22,7 @@ type Platform struct {
Description string

MinVersion semver.Version
Architectures []artifacts.Arch
Architectures []Arch
Documentation string
DiskImageSuffix string
BootMethods []string
Expand All @@ -45,7 +48,7 @@ func Platforms() []Platform {
Label: "Amazon Web Services (AWS)",
Description: "Runs on AWS VMs booted from an AMI",

Architectures: []artifacts.Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Architectures: []Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Documentation: "/talos-guides/install/cloud-platforms/aws/",
DiskImageSuffix: "raw.xz",
BootMethods: []string{
Expand All @@ -58,7 +61,7 @@ func Platforms() []Platform {
Label: "Google Cloud (GCP)",
Description: "Runs on Google Cloud VMs booted from a disk image",

Architectures: []artifacts.Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Architectures: []Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Documentation: "/talos-guides/install/cloud-platforms/gcp/",
DiskImageSuffix: "raw.tar.gz",
BootMethods: []string{
Expand All @@ -71,7 +74,7 @@ func Platforms() []Platform {
Label: "Equinix Metal",
Description: "Runs on Equinix Metal bare-metal servers",

Architectures: []artifacts.Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Architectures: []Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Documentation: "/talos-guides/install/bare-metal-platforms/equinix-metal/",
BootMethods: []string{
"pxe",
Expand All @@ -85,7 +88,7 @@ func Platforms() []Platform {
Label: "Microsoft Azure",
Description: "Runs on Microsoft Azure Linux Virtual Machines",

Architectures: []artifacts.Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Architectures: []Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Documentation: "/talos-guides/install/cloud-platforms/azure/",
DiskImageSuffix: "vhd.xz",
BootMethods: []string{
Expand All @@ -98,7 +101,7 @@ func Platforms() []Platform {
Label: "Digital Ocean",
Description: "Runs on Digital Ocean droplets",

Architectures: []artifacts.Arch{artifacts.ArchAmd64},
Architectures: []Arch{artifacts.ArchAmd64},
Documentation: "/talos-guides/install/cloud-platforms/digitalocean/",
DiskImageSuffix: "raw.gz",
BootMethods: []string{
Expand All @@ -111,7 +114,7 @@ func Platforms() []Platform {
Label: "OpenStack",
Description: "Runs on OpenStack virtual machines",

Architectures: []artifacts.Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Architectures: []Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Documentation: "/talos-guides/install/cloud-platforms/openstack/",
DiskImageSuffix: "raw.xz",
BootMethods: []string{
Expand All @@ -126,7 +129,7 @@ func Platforms() []Platform {
Label: "VMWare",
Description: "Runs on VMWare ESXi virtual machines",

Architectures: []artifacts.Arch{artifacts.ArchAmd64},
Architectures: []Arch{artifacts.ArchAmd64},
Documentation: "/talos-guides/install/virtualized-platforms/vmware/",
DiskImageSuffix: "ova",
BootMethods: []string{
Expand All @@ -141,7 +144,7 @@ func Platforms() []Platform {
Label: "Akamai",
Description: "Runs on Akamai Cloud (Linode) virtual machines",

Architectures: []artifacts.Arch{artifacts.ArchAmd64},
Architectures: []Arch{artifacts.ArchAmd64},
MinVersion: semver.MustParse("1.7.0"),
Documentation: "/talos-guides/install/cloud-platforms/akamai/",
DiskImageSuffix: "raw.gz",
Expand All @@ -156,7 +159,7 @@ func Platforms() []Platform {
Label: "Hetzner",
Description: "Runs on Hetzner virtual machines",

Architectures: []artifacts.Arch{artifacts.ArchAmd64},
Architectures: []Arch{artifacts.ArchAmd64},
Documentation: "/talos-guides/install/cloud-platforms/hetzner/",
DiskImageSuffix: "raw.xz",
BootMethods: []string{
Expand All @@ -169,7 +172,7 @@ func Platforms() []Platform {
Label: "Nocloud",
Description: "Runs on various hypervisors supporting 'nocloud' metadata (Proxmox, Oxide Computer, etc.)",

Architectures: []artifacts.Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Architectures: []Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Documentation: "/talos-guides/install/cloud-platforms/nocloud/",
DiskImageSuffix: "raw.xz",
BootMethods: []string{
Expand All @@ -185,7 +188,7 @@ func Platforms() []Platform {
Label: "Oracle Cloud",
Description: "Runs on Oracle Cloud virtual machines",

Architectures: []artifacts.Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Architectures: []Arch{artifacts.ArchAmd64, artifacts.ArchArm64},
Documentation: "/talos-guides/install/cloud-platforms/oracle/",
DiskImageSuffix: "raw.xz",
BootMethods: []string{
Expand All @@ -199,7 +202,7 @@ func Platforms() []Platform {
Label: "UpCloud",
Description: "Runs on UpCloud virtual machines",

Architectures: []artifacts.Arch{artifacts.ArchAmd64},
Architectures: []Arch{artifacts.ArchAmd64},
Documentation: "/talos-guides/install/cloud-platforms/ucloud/",
DiskImageSuffix: "raw.xz",
BootMethods: []string{
Expand All @@ -212,7 +215,7 @@ func Platforms() []Platform {
Label: "Vultr",
Description: "Runs on Vultr Cloud Compute virtual machines",

Architectures: []artifacts.Arch{artifacts.ArchAmd64},
Architectures: []Arch{artifacts.ArchAmd64},
Documentation: "/talos-guides/install/cloud-platforms/vultr/",
BootMethods: []string{
"iso",
Expand Down
File renamed without changes.

0 comments on commit 8b4e0d9

Please sign in to comment.