schema

package
v0.1.0-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	Name          string         `yaml:"name" validate:"required,podname"`
	URL           string         `yaml:"url,omitempty" validate:"omitempty,url"`
	RegistryLogin *RegistryLogin `yaml:"registryLogin,omitempty"`
	Pods          []Pod          `yaml:"pods" validate:"required,dive"`
}

Application represents the application-level configuration.

type NexlayerYAML

type NexlayerYAML struct {
	Application Application `yaml:"application" validate:"required"`
}

NexlayerYAML represents the structure of a Nexlayer deployment template.

type Pod

type Pod struct {
	Name         string    `yaml:"name" validate:"required,podname"`
	Path         string    `yaml:"path,omitempty"`
	Image        string    `yaml:"image" validate:"required,image"`
	Volumes      []Volume  `yaml:"volumes,omitempty" validate:"omitempty,dive"`
	Secrets      []Secret  `yaml:"secrets,omitempty" validate:"omitempty,dive"`
	Vars         []VarPair `yaml:"vars,omitempty" validate:"omitempty,dive"`
	ServicePorts []int     `yaml:"servicePorts,omitempty" validate:"omitempty,dive,gt=0,lt=65536"`
}

Pod represents a pod configuration.

type RegistryLogin

type RegistryLogin struct {
	Registry            string `yaml:"registry" validate:"required"`
	Username            string `yaml:"username" validate:"required"`
	PersonalAccessToken string `yaml:"personalAccessToken" validate:"required"`
}

RegistryLogin contains authentication details for private registries.

type Secret

type Secret struct {
	Name      string `yaml:"name" validate:"required,filename"`
	Data      string `yaml:"data" validate:"required"`
	MountPath string `yaml:"mountPath" validate:"required"`
	FileName  string `yaml:"fileName" validate:"required,filename"`
}

Secret represents a secret file configuration.

type VarPair

type VarPair struct {
	Key   string `yaml:"key" validate:"required,envvar"`
	Value string `yaml:"value" validate:"required"`
}

VarPair represents an environment variable key-value pair.

type Volume

type Volume struct {
	Name      string `yaml:"name" validate:"required,filename"`
	Size      string `yaml:"size" validate:"required,volumesize"`
	MountPath string `yaml:"mountPath" validate:"required"`
}

Volume represents a storage volume configuration.

Jump to

Keyboard shortcuts

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