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: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int    `json:"statusCode"`
	Message    string `json:"message"`
	ErrorCode  string `json:"error"`
}

APIError represents an error returned by the API

func (*APIError) Error

func (e *APIError) Error() string

Error implements the error interface

type APIResponse

type APIResponse[T any] struct {
	Message string `json:"message"`
	Data    T      `json:"data"`
}

APIResponse is a generic response type for all API responses

type Application

type Application struct {
	Name          string         `json:"name"`
	URL           string         `json:"url,omitempty"`
	RegistryLogin *RegistryLogin `json:"registryLogin,omitempty"`
	Pods          []Pod          `json:"pods"`
}

Application represents the root configuration of a Nexlayer application

type Deployment

type Deployment struct {
	Namespace    string      `json:"namespace"`
	TemplateID   string      `json:"templateId"`
	TemplateName string      `json:"templateName"`
	Status       string      `json:"status"`
	URL          string      `json:"url"`
	CustomDomain string      `json:"customDomain"`
	Version      string      `json:"version"`
	CreatedAt    time.Time   `json:"createdAt"`
	LastUpdated  time.Time   `json:"lastUpdated"`
	PodStatuses  []PodStatus `json:"podStatuses"`
}

Deployment represents a deployment in the system

type DeploymentResponse

type DeploymentResponse struct {
	Namespace string `json:"namespace"`
	URL       string `json:"url"`
}

DeploymentResponse represents the response from starting a deployment

type EnvVar

type EnvVar struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

EnvVar represents an environment variable

type NexlayerYAML

type NexlayerYAML struct {
	Application Application `json:"application"`
}

NexlayerYAML represents the structure of a Nexlayer deployment YAML file

type Pod

type Pod struct {
	Name    string   `json:"name"`
	Path    string   `json:"path,omitempty"`
	Image   string   `json:"image"`
	Volumes []Volume `json:"volumes,omitempty"`
	Secrets []Secret `json:"secrets,omitempty"`
	Vars    []EnvVar `json:"vars,omitempty"`
	Ports   []Port   `json:"ports"`
}

Pod represents a container configuration in a Nexlayer application

type PodStatus

type PodStatus struct {
	Name      string    `json:"name"`
	Type      string    `json:"type"`
	Status    string    `json:"status"`
	Ready     bool      `json:"ready"`
	Restarts  int       `json:"restarts"`
	Image     string    `json:"image"`
	CreatedAt time.Time `json:"createdAt"`
}

PodStatus represents the status of a pod in a deployment

type Port

type Port struct {
	ContainerPort int    `json:"containerPort"`
	ServicePort   int    `json:"servicePort"`
	Name          string `json:"name"`
}

Port represents a port configuration in a pod

type RegistryLogin

type RegistryLogin struct {
	Registry            string `json:"registry"`
	Username            string `json:"username"`
	PersonalAccessToken string `json:"personalAccessToken"`
}

RegistryLogin represents registry authentication details

type Secret

type Secret struct {
	Name      string `json:"name"`
	Data      string `json:"data"`
	MountPath string `json:"mountPath"`
	FileName  string `json:"fileName"`
}

Secret represents a secret configuration

type Volume

type Volume struct {
	Name      string `json:"name"`
	Size      string `json:"size"`
	MountPath string `json:"mountPath"`
}

Volume represents a persistent volume configuration

Jump to

Keyboard shortcuts

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