Compare commits

...

15 Commits

Author SHA1 Message Date
allanice001
334df457ce feat: complete node pool api, sdk and ui
Signed-off-by: allanice001 <allanice001@gmail.com>
2025-11-08 10:22:45 +00:00
Alanis
c478a8d10f fix: ui dependencies update
Signed-off-by: allanice001 <allanice001@gmail.com>
2025-11-06 13:04:29 +00:00
public-glueops-renovatebot[bot]
3463b2cb33 chore: lock file maintenance (#241)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 08:34:50 +00:00
allanice001
325e162d39 fix: add DockerIgnore to exclude terraform & sdk Directories, build process should reduce the container image size 2025-11-06 08:18:55 +00:00
allanice001
30e91bfd88 fix: add DockerIgnore to exclude terraform Directories 2025-11-06 08:17:05 +00:00
allanice001
12f2c5e1c5 feat: dynamically set swagger host, and some ui improvements on ssh page 2025-11-06 05:52:06 +00:00
public-glueops-renovatebot[bot]
7dc7d1a1f1 chore(pindigest): update golang to d2ede9f #patch (#239)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 05:16:38 +00:00
allanice001
6a16eccce5 fix: relax csp 2025-11-06 05:07:53 +00:00
allanice001
adb3c01382 Merge remote-tracking branch 'origin/main' 2025-11-06 04:43:36 +00:00
allanice001
35b42c6b19 fix: go upgrades didnt patch Dockerfile 2025-11-06 04:43:28 +00:00
public-glueops-renovatebot[bot]
ac12c48c27 chore(pindigest): update postgres to 00bc866 #patch (#237)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 04:38:07 +00:00
allanice001
04fc75a699 fix: go mod upgrades 2025-11-06 04:37:14 +00:00
allanice001
f4c41cfed7 Merge branch 'main' of github.com:GlueOps/autoglue
# Conflicts:
#	go.mod
#	go.sum
2025-11-06 04:31:49 +00:00
public-glueops-renovatebot[bot]
d7a87c3add feat: update github.com/swaggo/swag to v1.16.6 #minor (#236)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 04:23:21 +00:00
public-glueops-renovatebot[bot]
6b824769ba feat: update github.com/swaggo/swag to v1.9.0 #minor (#235)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 04:19:50 +00:00
140 changed files with 20095 additions and 549 deletions

3
.dockerignore Normal file
View File

@@ -0,0 +1,3 @@
terraform
terraform-provider-autoglue
sdk

View File

@@ -1,7 +1,7 @@
#################################
# Builder: Go + Node in one
#################################
FROM golang:1.25.3-alpine@sha256:aee43c3ccbf24fdffb7295693b6e33b21e01baec1b2a55acc351fde345e9ec34 AS builder
FROM golang:1.25.4-alpine@sha256:d2ede9f3341a67413127cf5366bb25bbad9b0a66e8173cae3a900ab00e84861f AS builder
RUN apk add --no-cache \
bash git ca-certificates tzdata \
@@ -15,7 +15,7 @@ RUN npm i -g yarn pnpm
WORKDIR /src
COPY . .
RUN make clean && make swagger && make -j3 sdk-all && make ui && make build
RUN make clean && make swagger && make sdk-ts-ui && make ui && make build
#################################
# Runtime

View File

@@ -28,8 +28,8 @@ SDK_PKG ?= ${BIN} # package name inside the SDK
UI_SSG_ROUTES ?= /,/login,/docs,/pricing
# Go versioning (go.mod uses major.minor; youre on 1.25.3)
GO_VERSION ?= 1.25.3
# Go versioning (go.mod uses major.minor; youre on 1.25.4)
GO_VERSION ?= 1.25.4
# SDK / package settings (TypeScript)
SDK_TS_OUTDIR ?= sdk/ts

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/glueops/autoglue
go 1.25.3
go 1.25.4
require (
github.com/alexedwards/argon2id v1.0.0

View File

@@ -49,7 +49,7 @@ func SecurityHeaders(next http.Handler) http.Handler {
"default-src 'self'",
"base-uri 'self'",
"form-action 'self'",
"script-src 'self'",
"script-src 'self' 'unsafe-inline'",
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
"img-src 'self' data: blob:",
"font-src 'self' data: https://fonts.gstatic.com",

View File

@@ -79,15 +79,17 @@ func NewRouter(db *gorm.DB, jobs *bg.Jobs) http.Handler {
a.Post("/logout", handlers.Logout(db))
})
v1.Route("/admin/archer", func(a chi.Router) {
a.Use(authUser)
a.Use(httpmiddleware.RequirePlatformAdmin())
v1.Route("/admin", func(admin chi.Router) {
admin.Route("/archer", func(archer chi.Router) {
archer.Use(authUser)
archer.Use(httpmiddleware.RequirePlatformAdmin())
a.Get("/jobs", handlers.AdminListArcherJobs(db))
a.Post("/jobs", handlers.AdminEnqueueArcherJob(db, jobs))
a.Post("/jobs/{id}/retry", handlers.AdminRetryArcherJob(db))
a.Post("/jobs/{id}/cancel", handlers.AdminCancelArcherJob(db))
a.Get("/queues", handlers.AdminListArcherQueues(db))
archer.Get("/jobs", handlers.AdminListArcherJobs(db))
archer.Post("/jobs", handlers.AdminEnqueueArcherJob(db, jobs))
archer.Post("/jobs/{id}/retry", handlers.AdminRetryArcherJob(db))
archer.Post("/jobs/{id}/cancel", handlers.AdminCancelArcherJob(db))
archer.Get("/queues", handlers.AdminListArcherQueues(db))
})
})
v1.Route("/me", func(me chi.Router) {
@@ -168,6 +170,35 @@ func NewRouter(db *gorm.DB, jobs *bg.Jobs) http.Handler {
a.Patch("/{id}", handlers.UpdateAnnotation(db))
a.Delete("/{id}", handlers.DeleteAnnotation(db))
})
v1.Route("/node-pools", func(n chi.Router) {
n.Use(authOrg)
n.Get("/", handlers.ListNodePools(db))
n.Post("/", handlers.CreateNodePool(db))
n.Get("/{id}", handlers.GetNodePool(db))
n.Patch("/{id}", handlers.UpdateNodePool(db))
n.Delete("/{id}", handlers.DeleteNodePool(db))
// Servers
n.Get("/{id}/servers", handlers.ListNodePoolServers(db))
n.Post("/{id}/servers", handlers.AttachNodePoolServers(db))
n.Delete("/{id}/servers/{serverId}", handlers.DetachNodePoolServer(db))
// Taints
n.Get("/{id}/taints", handlers.ListNodePoolTaints(db))
n.Post("/{id}/taints", handlers.AttachNodePoolTaints(db))
n.Delete("/{id}/taints/{taintId}", handlers.DetachNodePoolTaint(db))
// Labels
n.Get("/{id}/labels", handlers.ListNodePoolLabels(db))
n.Post("/{id}/labels", handlers.AttachNodePoolLabels(db))
n.Delete("/{id}/labels/{labelId}", handlers.DetachNodePoolLabel(db))
// Annotations
n.Get("/{id}/annotations", handlers.ListNodePoolAnnotations(db))
n.Post("/{id}/annotations", handlers.AttachNodePoolAnnotations(db))
n.Delete("/{id}/annotations/{annotationId}", handlers.DetachNodePoolAnnotation(db))
})
})
})
if config.IsDebug() {

View File

@@ -38,7 +38,10 @@ func NewRuntime() *Runtime {
&models.Taint{},
&models.Label{},
&models.Annotation{},
&models.NodePool{},
&models.Cluster{},
)
if err != nil {
log.Fatalf("Error initializing database: %v", err)
}

View File

@@ -225,19 +225,242 @@ func sshInstallDockerWithOutput(ctx context.Context, host, user string, privateK
script := `
set -euxo pipefail
if ! command -v docker >/dev/null 2>&1; then
curl -fsSL https://get.docker.com | sh
# ----------- toggles (set to 0 to skip) -----------
: "${BASELINE_PKGS:=1}"
: "${INSTALL_DOCKER:=1}"
: "${SSH_HARDEN:=1}"
: "${FIREWALL:=1}"
: "${AUTO_UPDATES:=1}"
: "${TIME_SYNC:=1}"
: "${FAIL2BAN:=1}"
: "${BANNER:=1}"
# ----------- helpers -----------
have() { command -v "$1" >/dev/null 2>&1; }
pm=""
if have apt-get; then pm="apt"
elif have dnf; then pm="dnf"
elif have yum; then pm="yum"
elif have zypper; then pm="zypper"
elif have apk; then pm="apk"
fi
# try to enable/start (handles distros with systemd)
if command -v systemctl >/dev/null 2>&1; then
sudo systemctl enable --now docker || true
pm_update_install() {
case "$pm" in
apt)
sudo apt-get update -y
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends "$@"
;;
dnf) sudo dnf install -y "$@" ;;
yum) sudo yum install -y "$@" ;;
zypper) sudo zypper --non-interactive install -y "$@" || true ;;
apk) sudo apk add --no-cache "$@" ;;
*)
echo "Unsupported distro: couldn't detect package manager" >&2
return 1
;;
esac
}
systemd_enable_now() {
if have systemctl; then
sudo systemctl enable --now "$1" || true
fi
}
sshd_reload() {
if have systemctl && systemctl is-enabled ssh >/dev/null 2>&1; then
sudo systemctl reload ssh || true
elif have systemctl && systemctl is-enabled sshd >/dev/null 2>&1; then
sudo systemctl reload sshd || true
fi
}
# ----------- baseline packages -----------
if [ "$BASELINE_PKGS" = "1" ] && [ -n "$pm" ]; then
pkgs_common="curl ca-certificates gnupg git jq unzip tar vim tmux htop net-tools"
case "$pm" in
apt) pkgs="$pkgs_common ufw openssh-client" ;;
dnf|yum) pkgs="$pkgs_common firewalld openssh-clients" ;;
zypper) pkgs="$pkgs_common firewalld openssh" ;;
apk) pkgs="$pkgs_common openssh-client" ;;
esac
pm_update_install $pkgs || true
fi
# add current ssh user to docker group if exists
if getent group docker >/dev/null 2>&1; then
sudo usermod -aG docker "$(id -un)" || true
# ----------- docker & compose v2 -----------
if [ "$INSTALL_DOCKER" = "1" ]; then
if ! have docker; then
curl -fsSL https://get.docker.com | sh
fi
# try to enable/start (handles distros with systemd)
if have systemctl; then
sudo systemctl enable --now docker || true
fi
# add current ssh user to docker group if exists
if getent group docker >/dev/null 2>&1; then
sudo usermod -aG docker "$(id -un)" || true
fi
# docker compose v2 (plugin) if missing
if ! docker compose version >/dev/null 2>&1; then
# Try package first (Debian/Ubuntu name)
if [ "$pm" = "apt" ]; then
sudo apt-get update -y
sudo apt-get install -y docker-compose-plugin || true
fi
# Fallback: install static plugin binary under ~/.docker/cli-plugins
if ! docker compose version >/dev/null 2>&1; then
mkdir -p ~/.docker/cli-plugins
arch="$(uname -m)"
case "$arch" in
x86_64|amd64) arch="x86_64" ;;
aarch64|arm64) arch="aarch64" ;;
esac
curl -fsSL -o ~/.docker/cli-plugins/docker-compose \
"https://github.com/docker/compose/releases/download/v2.29.7/docker-compose-$(uname -s)-$arch"
chmod +x ~/.docker/cli-plugins/docker-compose
fi
fi
fi
# ----------- SSH hardening (non-destructive: separate conf file) -----------
if [ "$SSH_HARDEN" = "1" ]; then
confd="/etc/ssh/sshd_config.d"
if [ -d "$confd" ] && [ -w "$confd" ]; then
sudo tee "$confd/10-bastion.conf" >/dev/null <<'EOF'
# Bastion hardening
PasswordAuthentication no
ChallengeResponseAuthentication no
KbdInteractiveAuthentication no
UsePAM yes
PermitEmptyPasswords no
PubkeyAuthentication yes
ClientAliveInterval 300
ClientAliveCountMax 2
LoginGraceTime 20
MaxAuthTries 3
MaxSessions 10
AllowAgentForwarding no
X11Forwarding no
EOF
sshd_reload
else
echo "Skipping SSH hardening: $confd not present or not writable" >&2
fi
# lock root password (no effect if already locked)
if have passwd; then
sudo passwd -l root || true
fi
fi
# ----------- firewall -----------
if [ "$FIREWALL" = "1" ]; then
if have ufw; then
# Keep it minimal: allow SSH and rate-limit
sudo ufw --force reset || true
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH || sudo ufw allow 22/tcp
sudo ufw limit OpenSSH || true
sudo ufw --force enable
elif have firewall-cmd; then
systemd_enable_now firewalld
sudo firewall-cmd --permanent --add-service=ssh || sudo firewall-cmd --permanent --add-port=22/tcp
sudo firewall-cmd --reload || true
else
echo "No supported firewall tool detected; skipping." >&2
fi
fi
# ----------- unattended / automatic updates -----------
if [ "$AUTO_UPDATES" = "1" ] && [ -n "$pm" ]; then
case "$pm" in
apt)
pm_update_install unattended-upgrades apt-listchanges || true
sudo dpkg-reconfigure -f noninteractive unattended-upgrades || true
sudo tee /etc/apt/apt.conf.d/20auto-upgrades >/dev/null <<'EOF'
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::AutocleanInterval "7";
EOF
;;
dnf)
pm_update_install dnf-automatic || true
sudo sed -i 's/^apply_updates = .*/apply_updates = yes/' /etc/dnf/automatic.conf || true
systemd_enable_now dnf-automatic.timer
;;
yum)
pm_update_install yum-cron || true
sudo sed -i 's/apply_updates = no/apply_updates = yes/' /etc/yum/yum-cron.conf || true
systemd_enable_now yum-cron
;;
zypper)
pm_update_install pkgconf-pkg-config || true
# SUSE has automatic updates via transactional-update / yast2-online-update; skipping heavy config.
;;
apk)
# Alpine: no official unattended updater; consider periodic 'apk upgrade' via cron (skipped by default).
;;
esac
fi
# ----------- time sync -----------
if [ "$TIME_SYNC" = "1" ]; then
if have timedatectl; then
# Prefer systemd-timesyncd if available; else install/enable chrony
if [ -f /lib/systemd/system/systemd-timesyncd.service ] || [ -f /usr/lib/systemd/system/systemd-timesyncd.service ]; then
systemd_enable_now systemd-timesyncd
else
pm_update_install chrony || true
systemd_enable_now chronyd || systemd_enable_now chrony || true
fi
timedatectl set-ntp true || true
else
pm_update_install chrony || true
systemd_enable_now chronyd || systemd_enable_now chrony || true
fi
fi
# ----------- fail2ban (basic sshd jail) -----------
if [ "$FAIL2BAN" = "1" ]; then
pm_update_install fail2ban || true
if [ -d /etc/fail2ban ]; then
sudo tee /etc/fail2ban/jail.d/sshd.local >/dev/null <<'EOF'
[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
maxretry = 4
bantime = 1h
findtime = 10m
EOF
systemd_enable_now fail2ban
fi
fi
# ----------- SSH banner / MOTD -----------
if [ "$BANNER" = "1" ]; then
if [ -w /etc/issue.net ] || sudo test -w /etc/issue.net; then
sudo tee /etc/issue.net >/dev/null <<'EOF'
NOTICE: Authorized use only. Activity may be monitored and reported.
EOF
# Ensure banner is enabled via our bastion conf
if [ -d /etc/ssh/sshd_config.d ]; then
if ! grep -q '^Banner ' /etc/ssh/sshd_config.d/10-bastion.conf 2>/dev/null; then
echo 'Banner /etc/issue.net' | sudo tee -a /etc/ssh/sshd_config.d/10-bastion.conf >/dev/null
sshd_reload
fi
fi
fi
fi
echo "Bootstrap complete. If you were added to the docker group, log out and back in to apply."
`
// Send script via stdin to avoid quoting/escaping issues

View File

@@ -24,10 +24,11 @@ type Config struct {
GithubClientID string
GithubClientSecret string
UIDev bool
Env string
Debug bool
Swagger bool
UIDev bool
Env string
Debug bool
Swagger bool
SwaggerHost string
}
var (
@@ -52,6 +53,7 @@ func Load() (Config, error) {
v.SetDefault("env", "development")
v.SetDefault("debug", false)
v.SetDefault("swagger", false)
v.SetDefault("swagger.host", "localhost:8080")
// Env setup and binding
v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
@@ -73,6 +75,7 @@ func Load() (Config, error) {
"env",
"debug",
"swagger",
"swagger.host",
}
for _, k := range keys {
_ = v.BindEnv(k)
@@ -92,10 +95,11 @@ func Load() (Config, error) {
GithubClientID: v.GetString("github.client.id"),
GithubClientSecret: v.GetString("github.client.secret"),
UIDev: v.GetBool("ui.dev"),
Env: v.GetString("env"),
Debug: v.GetBool("debug"),
Swagger: v.GetBool("swagger"),
UIDev: v.GetBool("ui.dev"),
Env: v.GetString("env"),
Debug: v.GetBool("debug"),
Swagger: v.GetBool("swagger"),
SwaggerHost: v.GetString("swagger.host"),
}
// Validate

View File

@@ -0,0 +1,46 @@
package dto
import "github.com/glueops/autoglue/internal/common"
type NodeRole string
const (
NodeRoleMaster NodeRole = "master"
NodeRoleWorker NodeRole = "worker"
)
type CreateNodePoolRequest struct {
Name string `json:"name"`
Role NodeRole `json:"role" enums:"master,worker" swaggertype:"string"`
}
type UpdateNodePoolRequest struct {
Name *string `json:"name"`
Role *NodeRole `json:"role" enums:"master,worker" swaggertype:"string"`
}
type NodePoolResponse struct {
common.AuditFields
Name string `json:"name"`
Role NodeRole `json:"role" enums:"master,worker" swaggertype:"string"`
Servers []ServerResponse `json:"servers"`
Annotations []AnnotationResponse `json:"annotations"`
Labels []LabelResponse `json:"labels"`
Taints []TaintResponse `json:"taints"`
}
type AttachServersRequest struct {
ServerIDs []string `json:"server_ids"`
}
type AttachTaintsRequest struct {
TaintIDs []string `json:"taint_ids"`
}
type AttachLabelsRequest struct {
LabelIDs []string `json:"label_ids"`
}
type AttachAnnotationsRequest struct {
AnnotationIDs []string `json:"annotation_ids"`
}

View File

@@ -8,8 +8,8 @@ type CreateServerRequest struct {
PrivateIPAddress string `json:"private_ip_address"`
SSHUser string `json:"ssh_user"`
SshKeyID string `json:"ssh_key_id"`
Role string `json:"role" example:"master|worker|bastion"`
Status string `json:"status,omitempty" example:"pending|provisioning|ready|failed"`
Role string `json:"role" example:"master|worker|bastion" enums:"master,worker,bastion"`
Status string `json:"status,omitempty" example:"pending|provisioning|ready|failed" enums:"pending,provisioning,ready,failed"`
}
type UpdateServerRequest struct {
@@ -18,8 +18,8 @@ type UpdateServerRequest struct {
PrivateIPAddress *string `json:"private_ip_address,omitempty"`
SSHUser *string `json:"ssh_user,omitempty"`
SshKeyID *string `json:"ssh_key_id,omitempty"`
Role *string `json:"role,omitempty" example:"master|worker|bastion"`
Status *string `json:"status,omitempty" example:"pending|provisioning|ready|failed"`
Role *string `json:"role" example:"master|worker|bastion" enums:"master,worker,bastion"`
Status *string `json:"status,omitempty" example:"pending|provisioning|ready|failed" enums:"pending,provisioning,ready,failed"`
}
type ServerResponse struct {
@@ -30,8 +30,8 @@ type ServerResponse struct {
PrivateIPAddress string `json:"private_ip_address"`
SSHUser string `json:"ssh_user"`
SshKeyID uuid.UUID `json:"ssh_key_id"`
Role string `json:"role"`
Status string `json:"status"`
Role string `json:"role" example:"master|worker|bastion" enums:"master,worker,bastion"`
Status string `json:"status,omitempty" example:"pending|provisioning|ready|failed" enums:"pending,provisioning,ready,failed"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
}

File diff suppressed because it is too large Load Diff

View File

@@ -62,6 +62,9 @@ func ListPublicSshKeys(db *gorm.DB) http.HandlerFunc {
return
}
if out == nil {
out = []dto.SshResponse{}
}
utils.WriteJSON(w, http.StatusOK, out)
}
}
@@ -379,7 +382,6 @@ func DownloadSSHKey(db *gorm.DB) http.HandlerFunc {
}
if mode == "json" {
prefix := keyFilenamePrefix(key.PublicKey)
resp := dto.SshMaterialJSON{
ID: key.ID.String(),
Name: key.Name,
@@ -389,7 +391,7 @@ func DownloadSSHKey(db *gorm.DB) http.HandlerFunc {
case "public":
pub := key.PublicKey
resp.PublicKey = &pub
resp.Filenames = []string{fmt.Sprintf("%s_%s.pub", prefix, key.ID.String())}
resp.Filenames = []string{fmt.Sprintf("%s.pub", key.ID.String())}
utils.WriteJSON(w, http.StatusOK, resp)
return
@@ -400,7 +402,7 @@ func DownloadSSHKey(db *gorm.DB) http.HandlerFunc {
return
}
resp.PrivatePEM = &plain
resp.Filenames = []string{fmt.Sprintf("%s_%s.pem", prefix, key.ID.String())}
resp.Filenames = []string{fmt.Sprintf("%s.pem", key.ID.String())}
utils.WriteJSON(w, http.StatusOK, resp)
return
@@ -413,16 +415,16 @@ func DownloadSSHKey(db *gorm.DB) http.HandlerFunc {
var buf bytes.Buffer
zw := zip.NewWriter(&buf)
_ = toZipFile(fmt.Sprintf("%s_%s.pem", prefix, key.ID.String()), []byte(plain), zw)
_ = toZipFile(fmt.Sprintf("%s_%s.pub", prefix, key.ID.String()), []byte(key.PublicKey), zw)
_ = toZipFile(fmt.Sprintf("%s.pem", key.ID.String()), []byte(plain), zw)
_ = toZipFile(fmt.Sprintf("%s.pub", key.ID.String()), []byte(key.PublicKey), zw)
_ = zw.Close()
b64 := utils.EncodeB64(buf.Bytes())
resp.ZipBase64 = &b64
resp.Filenames = []string{
fmt.Sprintf("%s_%s.zip", prefix, key.ID.String()),
fmt.Sprintf("%s_%s.pem", prefix, key.ID.String()),
fmt.Sprintf("%s_%s.pub", prefix, key.ID.String()),
fmt.Sprintf("%s.zip", key.ID.String()),
fmt.Sprintf("%s.pem", key.ID.String()),
fmt.Sprintf("%s.pub", key.ID.String()),
}
utils.WriteJSON(w, http.StatusOK, resp)
return
@@ -433,11 +435,9 @@ func DownloadSSHKey(db *gorm.DB) http.HandlerFunc {
}
}
prefix := keyFilenamePrefix(key.PublicKey)
switch part {
case "public":
filename := fmt.Sprintf("%s_%s.pub", prefix, key.ID.String())
filename := fmt.Sprintf("%s.pub", key.ID.String())
w.Header().Set("Content-Type", "text/plain")
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, filename))
_, _ = w.Write([]byte(key.PublicKey))
@@ -449,7 +449,7 @@ func DownloadSSHKey(db *gorm.DB) http.HandlerFunc {
utils.WriteError(w, http.StatusInternalServerError, "db_error", "failed to decrypt ssh key")
return
}
filename := fmt.Sprintf("%s_%s.pem", prefix, key.ID.String())
filename := fmt.Sprintf("%s.pem", key.ID.String())
w.Header().Set("Content-Type", "application/x-pem-file")
w.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, filename))
_, _ = w.Write([]byte(plain))
@@ -464,8 +464,8 @@ func DownloadSSHKey(db *gorm.DB) http.HandlerFunc {
var buf bytes.Buffer
zw := zip.NewWriter(&buf)
_ = toZipFile(fmt.Sprintf("%s_%s.pem", prefix, key.ID.String()), []byte(plain), zw)
_ = toZipFile(fmt.Sprintf("%s_%s.pub", prefix, key.ID.String()), []byte(key.PublicKey), zw)
_ = toZipFile(fmt.Sprintf("%s.pem", key.ID.String()), []byte(plain), zw)
_ = toZipFile(fmt.Sprintf("%s.pub", key.ID.String()), []byte(key.PublicKey), zw)
_ = zw.Close()
filename := fmt.Sprintf("ssh_key_%s.zip", key.ID.String())

View File

@@ -9,4 +9,5 @@ type Annotation struct {
Organization Organization `gorm:"foreignKey:OrganizationID;constraint:OnDelete:CASCADE" json:"organization"`
Key string `gorm:"not null" json:"key"`
Value string `gorm:"not null" json:"value"`
NodePools []NodePool `gorm:"many2many:node_annotations;constraint:OnDelete:CASCADE" json:"node_pools,omitempty"`
}

View File

@@ -0,0 +1,29 @@
package models
import (
"time"
"github.com/google/uuid"
)
type Cluster struct {
ID uuid.UUID `gorm:"type:uuid;default:gen_random_uuid();primaryKey" json:"id"`
OrganizationID uuid.UUID `gorm:"type:uuid;not null" json:"organization_id"`
Organization Organization `gorm:"foreignKey:OrganizationID;constraint:OnDelete:CASCADE" json:"organization"`
Name string `gorm:"not null" json:"name"`
Provider string `json:"provider"`
Region string `json:"region"`
Status string `json:"status"`
CaptainDomain string `gorm:"not null" json:"captain_domain"`
ClusterLoadBalancer string `json:"cluster_load_balancer"`
RandomToken string `json:"random_token"`
CertificateKey string `json:"certificate_key"`
EncryptedKubeconfig string `gorm:"type:text" json:"-"`
KubeIV string `json:"-"`
KubeTag string `json:"-"`
NodePools []NodePool `gorm:"many2many:cluster_node_pools;constraint:OnDelete:CASCADE" json:"node_pools,omitempty"`
BastionServerID *uuid.UUID `gorm:"type:uuid" json:"bastion_server_id,omitempty"`
BastionServer *Server `gorm:"foreignKey:BastionServerID" json:"bastion_server,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty" gorm:"type:timestamptz;column:created_at;not null;default:now()"`
UpdatedAt time.Time `json:"updated_at,omitempty" gorm:"type:timestamptz;autoUpdateTime;column:updated_at;not null;default:now()"`
}

View File

@@ -9,5 +9,5 @@ type Label struct {
Organization Organization `gorm:"foreignKey:OrganizationID;constraint:OnDelete:CASCADE" json:"organization"`
Key string `gorm:"not null" json:"key"`
Value string `gorm:"not null" json:"value"`
NodePools []NodePool `gorm:"many2many:node_labels;constraint:OnDelete:CASCADE" json:"servers,omitempty"`
NodePools []NodePool `gorm:"many2many:node_labels;constraint:OnDelete:CASCADE" json:"node_pools,omitempty"`
}

View File

@@ -1,23 +1,18 @@
package models
import (
"time"
"github.com/google/uuid"
"github.com/glueops/autoglue/internal/common"
)
type NodePool struct {
ID uuid.UUID `gorm:"type:uuid;primaryKey;default:gen_random_uuid()" json:"id"`
OrganizationID uuid.UUID `gorm:"type:uuid;not null" json:"organization_id"`
Organization Organization `gorm:"foreignKey:OrganizationID;constraint:OnDelete:CASCADE" json:"organization"`
Name string `gorm:"not null" json:"name"`
Servers []Server `gorm:"many2many:node_servers;constraint:OnDelete:CASCADE" json:"servers,omitempty"`
Annotations []Annotation `gorm:"many2many:node_annotations;constraint:OnDelete:CASCADE" json:"annotations,omitempty"`
Labels []Label `gorm:"many2many:node_labels;constraint:OnDelete:CASCADE" json:"labels,omitempty"`
Taints []Taint `gorm:"many2many:node_taints;constraint:OnDelete:CASCADE" json:"taints,omitempty"`
common.AuditFields
Organization Organization `gorm:"foreignKey:OrganizationID;constraint:OnDelete:CASCADE" json:"organization"`
Name string `gorm:"not null" json:"name"`
Servers []Server `gorm:"many2many:node_servers;constraint:OnDelete:CASCADE" json:"servers,omitempty"`
Annotations []Annotation `gorm:"many2many:node_annotations;constraint:OnDelete:CASCADE" json:"annotations,omitempty"`
Labels []Label `gorm:"many2many:node_labels;constraint:OnDelete:CASCADE" json:"labels,omitempty"`
Taints []Taint `gorm:"many2many:node_taints;constraint:OnDelete:CASCADE" json:"taints,omitempty"`
//Clusters []Cluster `gorm:"many2many:cluster_node_pools;constraint:OnDelete:CASCADE" json:"clusters,omitempty"`
//Topology string `gorm:"not null,default:'stacked'" json:"topology,omitempty"` // stacked or external
Role string `gorm:"not null,default:'worker'" json:"role,omitempty"` // master, worker, or etcd (etcd only if topology = external
CreatedAt time.Time `gorm:"not null;default:now()" json:"created_at" format:"date-time"`
UpdatedAt time.Time `gorm:"not null;default:now()" json:"updated_at" format:"date-time"`
Role string `gorm:"not null,default:'worker'" json:"role,omitempty"` // master, worker, or etcd (etcd only if topology = external
}

View File

@@ -19,8 +19,9 @@ type Server struct {
SSHUser string `gorm:"not null" json:"ssh_user"`
SshKeyID uuid.UUID `gorm:"type:uuid;not null" json:"ssh_key_id"`
SshKey SshKey `gorm:"foreignKey:SshKeyID" json:"ssh_key"`
Role string `gorm:"not null" json:"role"` // e.g., "master", "worker", "bastion"
Status string `gorm:"default:'pending'" json:"status"` // pending, provisioning, ready, failed
Role string `gorm:"not null" json:"role" enums:"master,worker,bastion"` // e.g., "master", "worker", "bastion"
Status string `gorm:"default:'pending'" json:"status" enums:"pending, provisioning, ready, failed"` // pending, provisioning, ready, failed
NodePools []NodePool `gorm:"many2many:node_servers;constraint:OnDelete:CASCADE" json:"node_pools,omitempty"`
CreatedAt time.Time `gorm:"not null;default:now()" json:"created_at" format:"date-time"`
UpdatedAt time.Time `gorm:"not null;default:now()" json:"updated_at" format:"date-time"`
}

11
main.go
View File

@@ -1,6 +1,12 @@
package main
import "github.com/glueops/autoglue/cmd"
import (
"os"
"github.com/glueops/autoglue/cmd"
"github.com/glueops/autoglue/docs"
"github.com/joho/godotenv"
)
// @title AutoGlue API
// @version 1.0
@@ -10,7 +16,6 @@ import "github.com/glueops/autoglue/cmd"
// @BasePath /api/v1
// @schemes http https
// @host localhost:8080
// @securityDefinitions.apikey BearerAuth
// @in header
@@ -33,5 +38,7 @@ import "github.com/glueops/autoglue/cmd"
// @description Org-level secret
func main() {
_ = godotenv.Load()
docs.SwaggerInfo.Host = os.Getenv("SWAGGER_HOST")
cmd.Execute()
}

View File

@@ -1,4 +1,4 @@
FROM postgres:latest@sha256:feff5b24fedd610975a1f5e743c51a4b360437f4dc3a11acf740dcd708f413f6
FROM postgres:17.6@sha256:00bc86618629af00d2937fdc5a5d63db3ff8450acf52f0636ec813c7f4902929
RUN cd /var/lib/postgresql/ && \
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem && \

View File

@@ -10,6 +10,7 @@ api_health.go
api_labels.go
api_me.go
api_me_api_keys.go
api_node_pools.go
api_orgs.go
api_servers.go
api_ssh.go
@@ -20,9 +21,14 @@ docs/AnnotationsAPI.md
docs/ArcherAdminAPI.md
docs/AuthAPI.md
docs/DtoAnnotationResponse.md
docs/DtoAttachAnnotationsRequest.md
docs/DtoAttachLabelsRequest.md
docs/DtoAttachServersRequest.md
docs/DtoAttachTaintsRequest.md
docs/DtoAuthStartResponse.md
docs/DtoCreateAnnotationRequest.md
docs/DtoCreateLabelRequest.md
docs/DtoCreateNodePoolRequest.md
docs/DtoCreateSSHRequest.md
docs/DtoCreateServerRequest.md
docs/DtoCreateTaintRequest.md
@@ -32,6 +38,7 @@ docs/DtoJob.md
docs/DtoJobStatus.md
docs/DtoLabelResponse.md
docs/DtoLogoutRequest.md
docs/DtoNodePoolResponse.md
docs/DtoPageJob.md
docs/DtoQueueInfo.md
docs/DtoRefreshRequest.md
@@ -42,6 +49,7 @@ docs/DtoTaintResponse.md
docs/DtoTokenPair.md
docs/DtoUpdateAnnotationRequest.md
docs/DtoUpdateLabelRequest.md
docs/DtoUpdateNodePoolRequest.md
docs/DtoUpdateServerRequest.md
docs/DtoUpdateTaintRequest.md
docs/HandlersCreateUserKeyRequest.md
@@ -63,6 +71,7 @@ docs/ModelsAPIKey.md
docs/ModelsOrganization.md
docs/ModelsUser.md
docs/ModelsUserEmail.md
docs/NodePoolsAPI.md
docs/OrgsAPI.md
docs/ServersAPI.md
docs/SshAPI.md
@@ -72,9 +81,14 @@ git_push.sh
go.mod
go.sum
model_dto_annotation_response.go
model_dto_attach_annotations_request.go
model_dto_attach_labels_request.go
model_dto_attach_servers_request.go
model_dto_attach_taints_request.go
model_dto_auth_start_response.go
model_dto_create_annotation_request.go
model_dto_create_label_request.go
model_dto_create_node_pool_request.go
model_dto_create_server_request.go
model_dto_create_ssh_request.go
model_dto_create_taint_request.go
@@ -84,6 +98,7 @@ model_dto_jwk.go
model_dto_jwks.go
model_dto_label_response.go
model_dto_logout_request.go
model_dto_node_pool_response.go
model_dto_page_job.go
model_dto_queue_info.go
model_dto_refresh_request.go
@@ -94,6 +109,7 @@ model_dto_taint_response.go
model_dto_token_pair.go
model_dto_update_annotation_request.go
model_dto_update_label_request.go
model_dto_update_node_pool_request.go
model_dto_update_server_request.go
model_dto_update_taint_request.go
model_handlers_create_user_key_request.go
@@ -120,6 +136,7 @@ test/api_health_test.go
test/api_labels_test.go
test/api_me_api_keys_test.go
test/api_me_test.go
test/api_node_pools_test.go
test/api_orgs_test.go
test/api_servers_test.go
test/api_ssh_test.go

View File

@@ -74,7 +74,7 @@ ctx = context.WithValue(context.Background(), autoglue.ContextOperationServerVar
## Documentation for API Endpoints
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
@@ -104,6 +104,23 @@ Class | Method | HTTP request | Description
*MeAPIKeysAPI* | [**CreateUserAPIKey**](docs/MeAPIKeysAPI.md#createuserapikey) | **Post** /me/api-keys | Create a new user API key
*MeAPIKeysAPI* | [**DeleteUserAPIKey**](docs/MeAPIKeysAPI.md#deleteuserapikey) | **Delete** /me/api-keys/{id} | Delete a user API key
*MeAPIKeysAPI* | [**ListUserAPIKeys**](docs/MeAPIKeysAPI.md#listuserapikeys) | **Get** /me/api-keys | List my API keys
*NodePoolsAPI* | [**AttachNodePoolAnnotations**](docs/NodePoolsAPI.md#attachnodepoolannotations) | **Post** /node-pools/{id}/annotations | Attach annotation to a node pool (org scoped)
*NodePoolsAPI* | [**AttachNodePoolLabels**](docs/NodePoolsAPI.md#attachnodepoollabels) | **Post** /node-pools/{id}/labels | Attach labels to a node pool (org scoped)
*NodePoolsAPI* | [**AttachNodePoolServers**](docs/NodePoolsAPI.md#attachnodepoolservers) | **Post** /node-pools/{id}/servers | Attach servers to a node pool (org scoped)
*NodePoolsAPI* | [**AttachNodePoolTaints**](docs/NodePoolsAPI.md#attachnodepooltaints) | **Post** /node-pools/{id}/taints | Attach taints to a node pool (org scoped)
*NodePoolsAPI* | [**CreateNodePool**](docs/NodePoolsAPI.md#createnodepool) | **Post** /node-pools | Create node pool (org scoped)
*NodePoolsAPI* | [**DeleteNodePool**](docs/NodePoolsAPI.md#deletenodepool) | **Delete** /node-pools/{id} | Delete node pool (org scoped)
*NodePoolsAPI* | [**DetachNodePoolAnnotation**](docs/NodePoolsAPI.md#detachnodepoolannotation) | **Delete** /node-pools/{id}/annotations/{annotationId} | Detach one annotation from a node pool (org scoped)
*NodePoolsAPI* | [**DetachNodePoolLabel**](docs/NodePoolsAPI.md#detachnodepoollabel) | **Delete** /node-pools/{id}/labels/{labelId} | Detach one label from a node pool (org scoped)
*NodePoolsAPI* | [**DetachNodePoolServer**](docs/NodePoolsAPI.md#detachnodepoolserver) | **Delete** /node-pools/{id}/servers/{serverId} | Detach one server from a node pool (org scoped)
*NodePoolsAPI* | [**DetachNodePoolTaint**](docs/NodePoolsAPI.md#detachnodepooltaint) | **Delete** /node-pools/{id}/taints/{taintId} | Detach one taint from a node pool (org scoped)
*NodePoolsAPI* | [**GetNodePool**](docs/NodePoolsAPI.md#getnodepool) | **Get** /node-pools/{id} | Get node pool by ID (org scoped)
*NodePoolsAPI* | [**ListNodePoolAnnotations**](docs/NodePoolsAPI.md#listnodepoolannotations) | **Get** /node-pools/{id}/annotations | List annotations attached to a node pool (org scoped)
*NodePoolsAPI* | [**ListNodePoolLabels**](docs/NodePoolsAPI.md#listnodepoollabels) | **Get** /node-pools/{id}/labels | List labels attached to a node pool (org scoped)
*NodePoolsAPI* | [**ListNodePoolServers**](docs/NodePoolsAPI.md#listnodepoolservers) | **Get** /node-pools/{id}/servers | List servers attached to a node pool (org scoped)
*NodePoolsAPI* | [**ListNodePoolTaints**](docs/NodePoolsAPI.md#listnodepooltaints) | **Get** /node-pools/{id}/taints | List taints attached to a node pool (org scoped)
*NodePoolsAPI* | [**ListNodePools**](docs/NodePoolsAPI.md#listnodepools) | **Get** /node-pools | List node pools (org scoped)
*NodePoolsAPI* | [**UpdateNodePool**](docs/NodePoolsAPI.md#updatenodepool) | **Patch** /node-pools/{id} | Update node pool (org scoped)
*OrgsAPI* | [**AddOrUpdateMember**](docs/OrgsAPI.md#addorupdatemember) | **Post** /orgs/{id}/members | Add or update a member (owner/admin)
*OrgsAPI* | [**CreateOrg**](docs/OrgsAPI.md#createorg) | **Post** /orgs | Create organization
*OrgsAPI* | [**CreateOrgKey**](docs/OrgsAPI.md#createorgkey) | **Post** /orgs/{id}/api-keys | Create org key/secret pair (owner/admin)
@@ -135,9 +152,14 @@ Class | Method | HTTP request | Description
## Documentation For Models
- [DtoAnnotationResponse](docs/DtoAnnotationResponse.md)
- [DtoAttachAnnotationsRequest](docs/DtoAttachAnnotationsRequest.md)
- [DtoAttachLabelsRequest](docs/DtoAttachLabelsRequest.md)
- [DtoAttachServersRequest](docs/DtoAttachServersRequest.md)
- [DtoAttachTaintsRequest](docs/DtoAttachTaintsRequest.md)
- [DtoAuthStartResponse](docs/DtoAuthStartResponse.md)
- [DtoCreateAnnotationRequest](docs/DtoCreateAnnotationRequest.md)
- [DtoCreateLabelRequest](docs/DtoCreateLabelRequest.md)
- [DtoCreateNodePoolRequest](docs/DtoCreateNodePoolRequest.md)
- [DtoCreateSSHRequest](docs/DtoCreateSSHRequest.md)
- [DtoCreateServerRequest](docs/DtoCreateServerRequest.md)
- [DtoCreateTaintRequest](docs/DtoCreateTaintRequest.md)
@@ -147,6 +169,7 @@ Class | Method | HTTP request | Description
- [DtoJobStatus](docs/DtoJobStatus.md)
- [DtoLabelResponse](docs/DtoLabelResponse.md)
- [DtoLogoutRequest](docs/DtoLogoutRequest.md)
- [DtoNodePoolResponse](docs/DtoNodePoolResponse.md)
- [DtoPageJob](docs/DtoPageJob.md)
- [DtoQueueInfo](docs/DtoQueueInfo.md)
- [DtoRefreshRequest](docs/DtoRefreshRequest.md)
@@ -157,6 +180,7 @@ Class | Method | HTTP request | Description
- [DtoTokenPair](docs/DtoTokenPair.md)
- [DtoUpdateAnnotationRequest](docs/DtoUpdateAnnotationRequest.md)
- [DtoUpdateLabelRequest](docs/DtoUpdateLabelRequest.md)
- [DtoUpdateNodePoolRequest](docs/DtoUpdateNodePoolRequest.md)
- [DtoUpdateServerRequest](docs/DtoUpdateServerRequest.md)
- [DtoUpdateTaintRequest](docs/DtoUpdateTaintRequest.md)
- [HandlersCreateUserKeyRequest](docs/HandlersCreateUserKeyRequest.md)

File diff suppressed because it is too large Load Diff

3615
sdk/go/api_node_pools.go Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -62,6 +62,8 @@ type APIClient struct {
MeAPIKeysAPI *MeAPIKeysAPIService
NodePoolsAPI *NodePoolsAPIService
OrgsAPI *OrgsAPIService
ServersAPI *ServersAPIService
@@ -94,6 +96,7 @@ func NewAPIClient(cfg *Configuration) *APIClient {
c.LabelsAPI = (*LabelsAPIService)(&c.common)
c.MeAPI = (*MeAPIService)(&c.common)
c.MeAPIKeysAPI = (*MeAPIKeysAPIService)(&c.common)
c.NodePoolsAPI = (*NodePoolsAPIService)(&c.common)
c.OrgsAPI = (*OrgsAPIService)(&c.common)
c.ServersAPI = (*ServersAPIService)(&c.common)
c.SshAPI = (*SshAPIService)(&c.common)

View File

@@ -93,11 +93,7 @@ func NewConfiguration() *Configuration {
Debug: false,
Servers: ServerConfigurations{
{
URL: "http://localhost:8080/api/v1",
Description: "No description provided",
},
{
URL: "https://localhost:8080/api/v1",
URL: "/api/v1",
Description: "No description provided",
},
},

View File

@@ -1,6 +1,6 @@
# \AnnotationsAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
# \ArcherAdminAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
# \AuthAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -0,0 +1,56 @@
# DtoAttachAnnotationsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AnnotationIds** | Pointer to **[]string** | | [optional]
## Methods
### NewDtoAttachAnnotationsRequest
`func NewDtoAttachAnnotationsRequest() *DtoAttachAnnotationsRequest`
NewDtoAttachAnnotationsRequest instantiates a new DtoAttachAnnotationsRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDtoAttachAnnotationsRequestWithDefaults
`func NewDtoAttachAnnotationsRequestWithDefaults() *DtoAttachAnnotationsRequest`
NewDtoAttachAnnotationsRequestWithDefaults instantiates a new DtoAttachAnnotationsRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAnnotationIds
`func (o *DtoAttachAnnotationsRequest) GetAnnotationIds() []string`
GetAnnotationIds returns the AnnotationIds field if non-nil, zero value otherwise.
### GetAnnotationIdsOk
`func (o *DtoAttachAnnotationsRequest) GetAnnotationIdsOk() (*[]string, bool)`
GetAnnotationIdsOk returns a tuple with the AnnotationIds field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAnnotationIds
`func (o *DtoAttachAnnotationsRequest) SetAnnotationIds(v []string)`
SetAnnotationIds sets AnnotationIds field to given value.
### HasAnnotationIds
`func (o *DtoAttachAnnotationsRequest) HasAnnotationIds() bool`
HasAnnotationIds returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,56 @@
# DtoAttachLabelsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**LabelIds** | Pointer to **[]string** | | [optional]
## Methods
### NewDtoAttachLabelsRequest
`func NewDtoAttachLabelsRequest() *DtoAttachLabelsRequest`
NewDtoAttachLabelsRequest instantiates a new DtoAttachLabelsRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDtoAttachLabelsRequestWithDefaults
`func NewDtoAttachLabelsRequestWithDefaults() *DtoAttachLabelsRequest`
NewDtoAttachLabelsRequestWithDefaults instantiates a new DtoAttachLabelsRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetLabelIds
`func (o *DtoAttachLabelsRequest) GetLabelIds() []string`
GetLabelIds returns the LabelIds field if non-nil, zero value otherwise.
### GetLabelIdsOk
`func (o *DtoAttachLabelsRequest) GetLabelIdsOk() (*[]string, bool)`
GetLabelIdsOk returns a tuple with the LabelIds field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetLabelIds
`func (o *DtoAttachLabelsRequest) SetLabelIds(v []string)`
SetLabelIds sets LabelIds field to given value.
### HasLabelIds
`func (o *DtoAttachLabelsRequest) HasLabelIds() bool`
HasLabelIds returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,56 @@
# DtoAttachServersRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ServerIds** | Pointer to **[]string** | | [optional]
## Methods
### NewDtoAttachServersRequest
`func NewDtoAttachServersRequest() *DtoAttachServersRequest`
NewDtoAttachServersRequest instantiates a new DtoAttachServersRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDtoAttachServersRequestWithDefaults
`func NewDtoAttachServersRequestWithDefaults() *DtoAttachServersRequest`
NewDtoAttachServersRequestWithDefaults instantiates a new DtoAttachServersRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetServerIds
`func (o *DtoAttachServersRequest) GetServerIds() []string`
GetServerIds returns the ServerIds field if non-nil, zero value otherwise.
### GetServerIdsOk
`func (o *DtoAttachServersRequest) GetServerIdsOk() (*[]string, bool)`
GetServerIdsOk returns a tuple with the ServerIds field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetServerIds
`func (o *DtoAttachServersRequest) SetServerIds(v []string)`
SetServerIds sets ServerIds field to given value.
### HasServerIds
`func (o *DtoAttachServersRequest) HasServerIds() bool`
HasServerIds returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,56 @@
# DtoAttachTaintsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TaintIds** | Pointer to **[]string** | | [optional]
## Methods
### NewDtoAttachTaintsRequest
`func NewDtoAttachTaintsRequest() *DtoAttachTaintsRequest`
NewDtoAttachTaintsRequest instantiates a new DtoAttachTaintsRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDtoAttachTaintsRequestWithDefaults
`func NewDtoAttachTaintsRequestWithDefaults() *DtoAttachTaintsRequest`
NewDtoAttachTaintsRequestWithDefaults instantiates a new DtoAttachTaintsRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetTaintIds
`func (o *DtoAttachTaintsRequest) GetTaintIds() []string`
GetTaintIds returns the TaintIds field if non-nil, zero value otherwise.
### GetTaintIdsOk
`func (o *DtoAttachTaintsRequest) GetTaintIdsOk() (*[]string, bool)`
GetTaintIdsOk returns a tuple with the TaintIds field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTaintIds
`func (o *DtoAttachTaintsRequest) SetTaintIds(v []string)`
SetTaintIds sets TaintIds field to given value.
### HasTaintIds
`func (o *DtoAttachTaintsRequest) HasTaintIds() bool`
HasTaintIds returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,82 @@
# DtoCreateNodePoolRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Role** | Pointer to **string** | | [optional]
## Methods
### NewDtoCreateNodePoolRequest
`func NewDtoCreateNodePoolRequest() *DtoCreateNodePoolRequest`
NewDtoCreateNodePoolRequest instantiates a new DtoCreateNodePoolRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDtoCreateNodePoolRequestWithDefaults
`func NewDtoCreateNodePoolRequestWithDefaults() *DtoCreateNodePoolRequest`
NewDtoCreateNodePoolRequestWithDefaults instantiates a new DtoCreateNodePoolRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *DtoCreateNodePoolRequest) GetName() string`
GetName returns the Name field if non-nil, zero value otherwise.
### GetNameOk
`func (o *DtoCreateNodePoolRequest) GetNameOk() (*string, bool)`
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetName
`func (o *DtoCreateNodePoolRequest) SetName(v string)`
SetName sets Name field to given value.
### HasName
`func (o *DtoCreateNodePoolRequest) HasName() bool`
HasName returns a boolean if a field has been set.
### GetRole
`func (o *DtoCreateNodePoolRequest) GetRole() string`
GetRole returns the Role field if non-nil, zero value otherwise.
### GetRoleOk
`func (o *DtoCreateNodePoolRequest) GetRoleOk() (*string, bool)`
GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRole
`func (o *DtoCreateNodePoolRequest) SetRole(v string)`
SetRole sets Role field to given value.
### HasRole
`func (o *DtoCreateNodePoolRequest) HasRole() bool`
HasRole returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,290 @@
# DtoNodePoolResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Annotations** | Pointer to [**[]DtoAnnotationResponse**](DtoAnnotationResponse.md) | | [optional]
**CreatedAt** | Pointer to **string** | | [optional]
**Id** | Pointer to **string** | | [optional]
**Labels** | Pointer to [**[]DtoLabelResponse**](DtoLabelResponse.md) | | [optional]
**Name** | Pointer to **string** | | [optional]
**OrganizationId** | Pointer to **string** | | [optional]
**Role** | Pointer to **string** | | [optional]
**Servers** | Pointer to [**[]DtoServerResponse**](DtoServerResponse.md) | | [optional]
**Taints** | Pointer to [**[]DtoTaintResponse**](DtoTaintResponse.md) | | [optional]
**UpdatedAt** | Pointer to **string** | | [optional]
## Methods
### NewDtoNodePoolResponse
`func NewDtoNodePoolResponse() *DtoNodePoolResponse`
NewDtoNodePoolResponse instantiates a new DtoNodePoolResponse object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDtoNodePoolResponseWithDefaults
`func NewDtoNodePoolResponseWithDefaults() *DtoNodePoolResponse`
NewDtoNodePoolResponseWithDefaults instantiates a new DtoNodePoolResponse object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAnnotations
`func (o *DtoNodePoolResponse) GetAnnotations() []DtoAnnotationResponse`
GetAnnotations returns the Annotations field if non-nil, zero value otherwise.
### GetAnnotationsOk
`func (o *DtoNodePoolResponse) GetAnnotationsOk() (*[]DtoAnnotationResponse, bool)`
GetAnnotationsOk returns a tuple with the Annotations field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAnnotations
`func (o *DtoNodePoolResponse) SetAnnotations(v []DtoAnnotationResponse)`
SetAnnotations sets Annotations field to given value.
### HasAnnotations
`func (o *DtoNodePoolResponse) HasAnnotations() bool`
HasAnnotations returns a boolean if a field has been set.
### GetCreatedAt
`func (o *DtoNodePoolResponse) GetCreatedAt() string`
GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise.
### GetCreatedAtOk
`func (o *DtoNodePoolResponse) GetCreatedAtOk() (*string, bool)`
GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCreatedAt
`func (o *DtoNodePoolResponse) SetCreatedAt(v string)`
SetCreatedAt sets CreatedAt field to given value.
### HasCreatedAt
`func (o *DtoNodePoolResponse) HasCreatedAt() bool`
HasCreatedAt returns a boolean if a field has been set.
### GetId
`func (o *DtoNodePoolResponse) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *DtoNodePoolResponse) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *DtoNodePoolResponse) SetId(v string)`
SetId sets Id field to given value.
### HasId
`func (o *DtoNodePoolResponse) HasId() bool`
HasId returns a boolean if a field has been set.
### GetLabels
`func (o *DtoNodePoolResponse) GetLabels() []DtoLabelResponse`
GetLabels returns the Labels field if non-nil, zero value otherwise.
### GetLabelsOk
`func (o *DtoNodePoolResponse) GetLabelsOk() (*[]DtoLabelResponse, bool)`
GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetLabels
`func (o *DtoNodePoolResponse) SetLabels(v []DtoLabelResponse)`
SetLabels sets Labels field to given value.
### HasLabels
`func (o *DtoNodePoolResponse) HasLabels() bool`
HasLabels returns a boolean if a field has been set.
### GetName
`func (o *DtoNodePoolResponse) GetName() string`
GetName returns the Name field if non-nil, zero value otherwise.
### GetNameOk
`func (o *DtoNodePoolResponse) GetNameOk() (*string, bool)`
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetName
`func (o *DtoNodePoolResponse) SetName(v string)`
SetName sets Name field to given value.
### HasName
`func (o *DtoNodePoolResponse) HasName() bool`
HasName returns a boolean if a field has been set.
### GetOrganizationId
`func (o *DtoNodePoolResponse) GetOrganizationId() string`
GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise.
### GetOrganizationIdOk
`func (o *DtoNodePoolResponse) GetOrganizationIdOk() (*string, bool)`
GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetOrganizationId
`func (o *DtoNodePoolResponse) SetOrganizationId(v string)`
SetOrganizationId sets OrganizationId field to given value.
### HasOrganizationId
`func (o *DtoNodePoolResponse) HasOrganizationId() bool`
HasOrganizationId returns a boolean if a field has been set.
### GetRole
`func (o *DtoNodePoolResponse) GetRole() string`
GetRole returns the Role field if non-nil, zero value otherwise.
### GetRoleOk
`func (o *DtoNodePoolResponse) GetRoleOk() (*string, bool)`
GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRole
`func (o *DtoNodePoolResponse) SetRole(v string)`
SetRole sets Role field to given value.
### HasRole
`func (o *DtoNodePoolResponse) HasRole() bool`
HasRole returns a boolean if a field has been set.
### GetServers
`func (o *DtoNodePoolResponse) GetServers() []DtoServerResponse`
GetServers returns the Servers field if non-nil, zero value otherwise.
### GetServersOk
`func (o *DtoNodePoolResponse) GetServersOk() (*[]DtoServerResponse, bool)`
GetServersOk returns a tuple with the Servers field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetServers
`func (o *DtoNodePoolResponse) SetServers(v []DtoServerResponse)`
SetServers sets Servers field to given value.
### HasServers
`func (o *DtoNodePoolResponse) HasServers() bool`
HasServers returns a boolean if a field has been set.
### GetTaints
`func (o *DtoNodePoolResponse) GetTaints() []DtoTaintResponse`
GetTaints returns the Taints field if non-nil, zero value otherwise.
### GetTaintsOk
`func (o *DtoNodePoolResponse) GetTaintsOk() (*[]DtoTaintResponse, bool)`
GetTaintsOk returns a tuple with the Taints field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTaints
`func (o *DtoNodePoolResponse) SetTaints(v []DtoTaintResponse)`
SetTaints sets Taints field to given value.
### HasTaints
`func (o *DtoNodePoolResponse) HasTaints() bool`
HasTaints returns a boolean if a field has been set.
### GetUpdatedAt
`func (o *DtoNodePoolResponse) GetUpdatedAt() string`
GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise.
### GetUpdatedAtOk
`func (o *DtoNodePoolResponse) GetUpdatedAtOk() (*string, bool)`
GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUpdatedAt
`func (o *DtoNodePoolResponse) SetUpdatedAt(v string)`
SetUpdatedAt sets UpdatedAt field to given value.
### HasUpdatedAt
`func (o *DtoNodePoolResponse) HasUpdatedAt() bool`
HasUpdatedAt returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -0,0 +1,82 @@
# DtoUpdateNodePoolRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | Pointer to **string** | | [optional]
**Role** | Pointer to **string** | | [optional]
## Methods
### NewDtoUpdateNodePoolRequest
`func NewDtoUpdateNodePoolRequest() *DtoUpdateNodePoolRequest`
NewDtoUpdateNodePoolRequest instantiates a new DtoUpdateNodePoolRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDtoUpdateNodePoolRequestWithDefaults
`func NewDtoUpdateNodePoolRequestWithDefaults() *DtoUpdateNodePoolRequest`
NewDtoUpdateNodePoolRequestWithDefaults instantiates a new DtoUpdateNodePoolRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetName
`func (o *DtoUpdateNodePoolRequest) GetName() string`
GetName returns the Name field if non-nil, zero value otherwise.
### GetNameOk
`func (o *DtoUpdateNodePoolRequest) GetNameOk() (*string, bool)`
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetName
`func (o *DtoUpdateNodePoolRequest) SetName(v string)`
SetName sets Name field to given value.
### HasName
`func (o *DtoUpdateNodePoolRequest) HasName() bool`
HasName returns a boolean if a field has been set.
### GetRole
`func (o *DtoUpdateNodePoolRequest) GetRole() string`
GetRole returns the Role field if non-nil, zero value otherwise.
### GetRoleOk
`func (o *DtoUpdateNodePoolRequest) GetRoleOk() (*string, bool)`
GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRole
`func (o *DtoUpdateNodePoolRequest) SetRole(v string)`
SetRole sets Role field to given value.
### HasRole
`func (o *DtoUpdateNodePoolRequest) HasRole() bool`
HasRole returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@@ -1,6 +1,6 @@
# \HealthAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
# \LabelsAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
# \MeAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
# \MeAPIKeysAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

1239
sdk/go/docs/NodePoolsAPI.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
# \OrgsAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
# \ServersAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
# \SshAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
# \TaintsAPI
All URIs are relative to *http://localhost:8080/api/v1*
All URIs are relative to */api/v1*
Method | HTTP request | Description
------------- | ------------- | -------------

View File

@@ -1,6 +1,6 @@
module github.com/glueops/autoglue-sdk-go
go 1.25.3
go 1.25.4
require github.com/stretchr/testify v1.11.1

View File

@@ -0,0 +1,124 @@
/*
AutoGlue API
API for managing K3s clusters across cloud providers
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package autoglue
import (
"encoding/json"
)
// checks if the DtoAttachAnnotationsRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoAttachAnnotationsRequest{}
// DtoAttachAnnotationsRequest struct for DtoAttachAnnotationsRequest
type DtoAttachAnnotationsRequest struct {
AnnotationIds []string `json:"annotation_ids,omitempty"`
}
// NewDtoAttachAnnotationsRequest instantiates a new DtoAttachAnnotationsRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDtoAttachAnnotationsRequest() *DtoAttachAnnotationsRequest {
this := DtoAttachAnnotationsRequest{}
return &this
}
// NewDtoAttachAnnotationsRequestWithDefaults instantiates a new DtoAttachAnnotationsRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDtoAttachAnnotationsRequestWithDefaults() *DtoAttachAnnotationsRequest {
this := DtoAttachAnnotationsRequest{}
return &this
}
// GetAnnotationIds returns the AnnotationIds field value if set, zero value otherwise.
func (o *DtoAttachAnnotationsRequest) GetAnnotationIds() []string {
if o == nil || IsNil(o.AnnotationIds) {
var ret []string
return ret
}
return o.AnnotationIds
}
// GetAnnotationIdsOk returns a tuple with the AnnotationIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoAttachAnnotationsRequest) GetAnnotationIdsOk() ([]string, bool) {
if o == nil || IsNil(o.AnnotationIds) {
return nil, false
}
return o.AnnotationIds, true
}
// HasAnnotationIds returns a boolean if a field has been set.
func (o *DtoAttachAnnotationsRequest) HasAnnotationIds() bool {
if o != nil && !IsNil(o.AnnotationIds) {
return true
}
return false
}
// SetAnnotationIds gets a reference to the given []string and assigns it to the AnnotationIds field.
func (o *DtoAttachAnnotationsRequest) SetAnnotationIds(v []string) {
o.AnnotationIds = v
}
func (o DtoAttachAnnotationsRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DtoAttachAnnotationsRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AnnotationIds) {
toSerialize["annotation_ids"] = o.AnnotationIds
}
return toSerialize, nil
}
type NullableDtoAttachAnnotationsRequest struct {
value *DtoAttachAnnotationsRequest
isSet bool
}
func (v NullableDtoAttachAnnotationsRequest) Get() *DtoAttachAnnotationsRequest {
return v.value
}
func (v *NullableDtoAttachAnnotationsRequest) Set(val *DtoAttachAnnotationsRequest) {
v.value = val
v.isSet = true
}
func (v NullableDtoAttachAnnotationsRequest) IsSet() bool {
return v.isSet
}
func (v *NullableDtoAttachAnnotationsRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDtoAttachAnnotationsRequest(val *DtoAttachAnnotationsRequest) *NullableDtoAttachAnnotationsRequest {
return &NullableDtoAttachAnnotationsRequest{value: val, isSet: true}
}
func (v NullableDtoAttachAnnotationsRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDtoAttachAnnotationsRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -0,0 +1,124 @@
/*
AutoGlue API
API for managing K3s clusters across cloud providers
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package autoglue
import (
"encoding/json"
)
// checks if the DtoAttachLabelsRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoAttachLabelsRequest{}
// DtoAttachLabelsRequest struct for DtoAttachLabelsRequest
type DtoAttachLabelsRequest struct {
LabelIds []string `json:"label_ids,omitempty"`
}
// NewDtoAttachLabelsRequest instantiates a new DtoAttachLabelsRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDtoAttachLabelsRequest() *DtoAttachLabelsRequest {
this := DtoAttachLabelsRequest{}
return &this
}
// NewDtoAttachLabelsRequestWithDefaults instantiates a new DtoAttachLabelsRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDtoAttachLabelsRequestWithDefaults() *DtoAttachLabelsRequest {
this := DtoAttachLabelsRequest{}
return &this
}
// GetLabelIds returns the LabelIds field value if set, zero value otherwise.
func (o *DtoAttachLabelsRequest) GetLabelIds() []string {
if o == nil || IsNil(o.LabelIds) {
var ret []string
return ret
}
return o.LabelIds
}
// GetLabelIdsOk returns a tuple with the LabelIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoAttachLabelsRequest) GetLabelIdsOk() ([]string, bool) {
if o == nil || IsNil(o.LabelIds) {
return nil, false
}
return o.LabelIds, true
}
// HasLabelIds returns a boolean if a field has been set.
func (o *DtoAttachLabelsRequest) HasLabelIds() bool {
if o != nil && !IsNil(o.LabelIds) {
return true
}
return false
}
// SetLabelIds gets a reference to the given []string and assigns it to the LabelIds field.
func (o *DtoAttachLabelsRequest) SetLabelIds(v []string) {
o.LabelIds = v
}
func (o DtoAttachLabelsRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DtoAttachLabelsRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.LabelIds) {
toSerialize["label_ids"] = o.LabelIds
}
return toSerialize, nil
}
type NullableDtoAttachLabelsRequest struct {
value *DtoAttachLabelsRequest
isSet bool
}
func (v NullableDtoAttachLabelsRequest) Get() *DtoAttachLabelsRequest {
return v.value
}
func (v *NullableDtoAttachLabelsRequest) Set(val *DtoAttachLabelsRequest) {
v.value = val
v.isSet = true
}
func (v NullableDtoAttachLabelsRequest) IsSet() bool {
return v.isSet
}
func (v *NullableDtoAttachLabelsRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDtoAttachLabelsRequest(val *DtoAttachLabelsRequest) *NullableDtoAttachLabelsRequest {
return &NullableDtoAttachLabelsRequest{value: val, isSet: true}
}
func (v NullableDtoAttachLabelsRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDtoAttachLabelsRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -0,0 +1,124 @@
/*
AutoGlue API
API for managing K3s clusters across cloud providers
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package autoglue
import (
"encoding/json"
)
// checks if the DtoAttachServersRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoAttachServersRequest{}
// DtoAttachServersRequest struct for DtoAttachServersRequest
type DtoAttachServersRequest struct {
ServerIds []string `json:"server_ids,omitempty"`
}
// NewDtoAttachServersRequest instantiates a new DtoAttachServersRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDtoAttachServersRequest() *DtoAttachServersRequest {
this := DtoAttachServersRequest{}
return &this
}
// NewDtoAttachServersRequestWithDefaults instantiates a new DtoAttachServersRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDtoAttachServersRequestWithDefaults() *DtoAttachServersRequest {
this := DtoAttachServersRequest{}
return &this
}
// GetServerIds returns the ServerIds field value if set, zero value otherwise.
func (o *DtoAttachServersRequest) GetServerIds() []string {
if o == nil || IsNil(o.ServerIds) {
var ret []string
return ret
}
return o.ServerIds
}
// GetServerIdsOk returns a tuple with the ServerIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoAttachServersRequest) GetServerIdsOk() ([]string, bool) {
if o == nil || IsNil(o.ServerIds) {
return nil, false
}
return o.ServerIds, true
}
// HasServerIds returns a boolean if a field has been set.
func (o *DtoAttachServersRequest) HasServerIds() bool {
if o != nil && !IsNil(o.ServerIds) {
return true
}
return false
}
// SetServerIds gets a reference to the given []string and assigns it to the ServerIds field.
func (o *DtoAttachServersRequest) SetServerIds(v []string) {
o.ServerIds = v
}
func (o DtoAttachServersRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DtoAttachServersRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ServerIds) {
toSerialize["server_ids"] = o.ServerIds
}
return toSerialize, nil
}
type NullableDtoAttachServersRequest struct {
value *DtoAttachServersRequest
isSet bool
}
func (v NullableDtoAttachServersRequest) Get() *DtoAttachServersRequest {
return v.value
}
func (v *NullableDtoAttachServersRequest) Set(val *DtoAttachServersRequest) {
v.value = val
v.isSet = true
}
func (v NullableDtoAttachServersRequest) IsSet() bool {
return v.isSet
}
func (v *NullableDtoAttachServersRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDtoAttachServersRequest(val *DtoAttachServersRequest) *NullableDtoAttachServersRequest {
return &NullableDtoAttachServersRequest{value: val, isSet: true}
}
func (v NullableDtoAttachServersRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDtoAttachServersRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -0,0 +1,124 @@
/*
AutoGlue API
API for managing K3s clusters across cloud providers
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package autoglue
import (
"encoding/json"
)
// checks if the DtoAttachTaintsRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoAttachTaintsRequest{}
// DtoAttachTaintsRequest struct for DtoAttachTaintsRequest
type DtoAttachTaintsRequest struct {
TaintIds []string `json:"taint_ids,omitempty"`
}
// NewDtoAttachTaintsRequest instantiates a new DtoAttachTaintsRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDtoAttachTaintsRequest() *DtoAttachTaintsRequest {
this := DtoAttachTaintsRequest{}
return &this
}
// NewDtoAttachTaintsRequestWithDefaults instantiates a new DtoAttachTaintsRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDtoAttachTaintsRequestWithDefaults() *DtoAttachTaintsRequest {
this := DtoAttachTaintsRequest{}
return &this
}
// GetTaintIds returns the TaintIds field value if set, zero value otherwise.
func (o *DtoAttachTaintsRequest) GetTaintIds() []string {
if o == nil || IsNil(o.TaintIds) {
var ret []string
return ret
}
return o.TaintIds
}
// GetTaintIdsOk returns a tuple with the TaintIds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoAttachTaintsRequest) GetTaintIdsOk() ([]string, bool) {
if o == nil || IsNil(o.TaintIds) {
return nil, false
}
return o.TaintIds, true
}
// HasTaintIds returns a boolean if a field has been set.
func (o *DtoAttachTaintsRequest) HasTaintIds() bool {
if o != nil && !IsNil(o.TaintIds) {
return true
}
return false
}
// SetTaintIds gets a reference to the given []string and assigns it to the TaintIds field.
func (o *DtoAttachTaintsRequest) SetTaintIds(v []string) {
o.TaintIds = v
}
func (o DtoAttachTaintsRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DtoAttachTaintsRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.TaintIds) {
toSerialize["taint_ids"] = o.TaintIds
}
return toSerialize, nil
}
type NullableDtoAttachTaintsRequest struct {
value *DtoAttachTaintsRequest
isSet bool
}
func (v NullableDtoAttachTaintsRequest) Get() *DtoAttachTaintsRequest {
return v.value
}
func (v *NullableDtoAttachTaintsRequest) Set(val *DtoAttachTaintsRequest) {
v.value = val
v.isSet = true
}
func (v NullableDtoAttachTaintsRequest) IsSet() bool {
return v.isSet
}
func (v *NullableDtoAttachTaintsRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDtoAttachTaintsRequest(val *DtoAttachTaintsRequest) *NullableDtoAttachTaintsRequest {
return &NullableDtoAttachTaintsRequest{value: val, isSet: true}
}
func (v NullableDtoAttachTaintsRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDtoAttachTaintsRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -0,0 +1,160 @@
/*
AutoGlue API
API for managing K3s clusters across cloud providers
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package autoglue
import (
"encoding/json"
)
// checks if the DtoCreateNodePoolRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoCreateNodePoolRequest{}
// DtoCreateNodePoolRequest struct for DtoCreateNodePoolRequest
type DtoCreateNodePoolRequest struct {
Name *string `json:"name,omitempty"`
Role *string `json:"role,omitempty"`
}
// NewDtoCreateNodePoolRequest instantiates a new DtoCreateNodePoolRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDtoCreateNodePoolRequest() *DtoCreateNodePoolRequest {
this := DtoCreateNodePoolRequest{}
return &this
}
// NewDtoCreateNodePoolRequestWithDefaults instantiates a new DtoCreateNodePoolRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDtoCreateNodePoolRequestWithDefaults() *DtoCreateNodePoolRequest {
this := DtoCreateNodePoolRequest{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DtoCreateNodePoolRequest) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoCreateNodePoolRequest) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *DtoCreateNodePoolRequest) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *DtoCreateNodePoolRequest) SetName(v string) {
o.Name = &v
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *DtoCreateNodePoolRequest) GetRole() string {
if o == nil || IsNil(o.Role) {
var ret string
return ret
}
return *o.Role
}
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoCreateNodePoolRequest) GetRoleOk() (*string, bool) {
if o == nil || IsNil(o.Role) {
return nil, false
}
return o.Role, true
}
// HasRole returns a boolean if a field has been set.
func (o *DtoCreateNodePoolRequest) HasRole() bool {
if o != nil && !IsNil(o.Role) {
return true
}
return false
}
// SetRole gets a reference to the given string and assigns it to the Role field.
func (o *DtoCreateNodePoolRequest) SetRole(v string) {
o.Role = &v
}
func (o DtoCreateNodePoolRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DtoCreateNodePoolRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Role) {
toSerialize["role"] = o.Role
}
return toSerialize, nil
}
type NullableDtoCreateNodePoolRequest struct {
value *DtoCreateNodePoolRequest
isSet bool
}
func (v NullableDtoCreateNodePoolRequest) Get() *DtoCreateNodePoolRequest {
return v.value
}
func (v *NullableDtoCreateNodePoolRequest) Set(val *DtoCreateNodePoolRequest) {
v.value = val
v.isSet = true
}
func (v NullableDtoCreateNodePoolRequest) IsSet() bool {
return v.isSet
}
func (v *NullableDtoCreateNodePoolRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDtoCreateNodePoolRequest(val *DtoCreateNodePoolRequest) *NullableDtoCreateNodePoolRequest {
return &NullableDtoCreateNodePoolRequest{value: val, isSet: true}
}
func (v NullableDtoCreateNodePoolRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDtoCreateNodePoolRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -0,0 +1,448 @@
/*
AutoGlue API
API for managing K3s clusters across cloud providers
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package autoglue
import (
"encoding/json"
)
// checks if the DtoNodePoolResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoNodePoolResponse{}
// DtoNodePoolResponse struct for DtoNodePoolResponse
type DtoNodePoolResponse struct {
Annotations []DtoAnnotationResponse `json:"annotations,omitempty"`
CreatedAt *string `json:"created_at,omitempty"`
Id *string `json:"id,omitempty"`
Labels []DtoLabelResponse `json:"labels,omitempty"`
Name *string `json:"name,omitempty"`
OrganizationId *string `json:"organization_id,omitempty"`
Role *string `json:"role,omitempty"`
Servers []DtoServerResponse `json:"servers,omitempty"`
Taints []DtoTaintResponse `json:"taints,omitempty"`
UpdatedAt *string `json:"updated_at,omitempty"`
}
// NewDtoNodePoolResponse instantiates a new DtoNodePoolResponse object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDtoNodePoolResponse() *DtoNodePoolResponse {
this := DtoNodePoolResponse{}
return &this
}
// NewDtoNodePoolResponseWithDefaults instantiates a new DtoNodePoolResponse object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDtoNodePoolResponseWithDefaults() *DtoNodePoolResponse {
this := DtoNodePoolResponse{}
return &this
}
// GetAnnotations returns the Annotations field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetAnnotations() []DtoAnnotationResponse {
if o == nil || IsNil(o.Annotations) {
var ret []DtoAnnotationResponse
return ret
}
return o.Annotations
}
// GetAnnotationsOk returns a tuple with the Annotations field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetAnnotationsOk() ([]DtoAnnotationResponse, bool) {
if o == nil || IsNil(o.Annotations) {
return nil, false
}
return o.Annotations, true
}
// HasAnnotations returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasAnnotations() bool {
if o != nil && !IsNil(o.Annotations) {
return true
}
return false
}
// SetAnnotations gets a reference to the given []DtoAnnotationResponse and assigns it to the Annotations field.
func (o *DtoNodePoolResponse) SetAnnotations(v []DtoAnnotationResponse) {
o.Annotations = v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetCreatedAt() string {
if o == nil || IsNil(o.CreatedAt) {
var ret string
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetCreatedAtOk() (*string, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
func (o *DtoNodePoolResponse) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DtoNodePoolResponse) SetId(v string) {
o.Id = &v
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetLabels() []DtoLabelResponse {
if o == nil || IsNil(o.Labels) {
var ret []DtoLabelResponse
return ret
}
return o.Labels
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetLabelsOk() ([]DtoLabelResponse, bool) {
if o == nil || IsNil(o.Labels) {
return nil, false
}
return o.Labels, true
}
// HasLabels returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasLabels() bool {
if o != nil && !IsNil(o.Labels) {
return true
}
return false
}
// SetLabels gets a reference to the given []DtoLabelResponse and assigns it to the Labels field.
func (o *DtoNodePoolResponse) SetLabels(v []DtoLabelResponse) {
o.Labels = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *DtoNodePoolResponse) SetName(v string) {
o.Name = &v
}
// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetOrganizationId() string {
if o == nil || IsNil(o.OrganizationId) {
var ret string
return ret
}
return *o.OrganizationId
}
// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetOrganizationIdOk() (*string, bool) {
if o == nil || IsNil(o.OrganizationId) {
return nil, false
}
return o.OrganizationId, true
}
// HasOrganizationId returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasOrganizationId() bool {
if o != nil && !IsNil(o.OrganizationId) {
return true
}
return false
}
// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field.
func (o *DtoNodePoolResponse) SetOrganizationId(v string) {
o.OrganizationId = &v
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetRole() string {
if o == nil || IsNil(o.Role) {
var ret string
return ret
}
return *o.Role
}
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetRoleOk() (*string, bool) {
if o == nil || IsNil(o.Role) {
return nil, false
}
return o.Role, true
}
// HasRole returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasRole() bool {
if o != nil && !IsNil(o.Role) {
return true
}
return false
}
// SetRole gets a reference to the given string and assigns it to the Role field.
func (o *DtoNodePoolResponse) SetRole(v string) {
o.Role = &v
}
// GetServers returns the Servers field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetServers() []DtoServerResponse {
if o == nil || IsNil(o.Servers) {
var ret []DtoServerResponse
return ret
}
return o.Servers
}
// GetServersOk returns a tuple with the Servers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetServersOk() ([]DtoServerResponse, bool) {
if o == nil || IsNil(o.Servers) {
return nil, false
}
return o.Servers, true
}
// HasServers returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasServers() bool {
if o != nil && !IsNil(o.Servers) {
return true
}
return false
}
// SetServers gets a reference to the given []DtoServerResponse and assigns it to the Servers field.
func (o *DtoNodePoolResponse) SetServers(v []DtoServerResponse) {
o.Servers = v
}
// GetTaints returns the Taints field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetTaints() []DtoTaintResponse {
if o == nil || IsNil(o.Taints) {
var ret []DtoTaintResponse
return ret
}
return o.Taints
}
// GetTaintsOk returns a tuple with the Taints field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetTaintsOk() ([]DtoTaintResponse, bool) {
if o == nil || IsNil(o.Taints) {
return nil, false
}
return o.Taints, true
}
// HasTaints returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasTaints() bool {
if o != nil && !IsNil(o.Taints) {
return true
}
return false
}
// SetTaints gets a reference to the given []DtoTaintResponse and assigns it to the Taints field.
func (o *DtoNodePoolResponse) SetTaints(v []DtoTaintResponse) {
o.Taints = v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *DtoNodePoolResponse) GetUpdatedAt() string {
if o == nil || IsNil(o.UpdatedAt) {
var ret string
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoNodePoolResponse) GetUpdatedAtOk() (*string, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *DtoNodePoolResponse) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
func (o *DtoNodePoolResponse) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
func (o DtoNodePoolResponse) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DtoNodePoolResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Annotations) {
toSerialize["annotations"] = o.Annotations
}
if !IsNil(o.CreatedAt) {
toSerialize["created_at"] = o.CreatedAt
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Labels) {
toSerialize["labels"] = o.Labels
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.OrganizationId) {
toSerialize["organization_id"] = o.OrganizationId
}
if !IsNil(o.Role) {
toSerialize["role"] = o.Role
}
if !IsNil(o.Servers) {
toSerialize["servers"] = o.Servers
}
if !IsNil(o.Taints) {
toSerialize["taints"] = o.Taints
}
if !IsNil(o.UpdatedAt) {
toSerialize["updated_at"] = o.UpdatedAt
}
return toSerialize, nil
}
type NullableDtoNodePoolResponse struct {
value *DtoNodePoolResponse
isSet bool
}
func (v NullableDtoNodePoolResponse) Get() *DtoNodePoolResponse {
return v.value
}
func (v *NullableDtoNodePoolResponse) Set(val *DtoNodePoolResponse) {
v.value = val
v.isSet = true
}
func (v NullableDtoNodePoolResponse) IsSet() bool {
return v.isSet
}
func (v *NullableDtoNodePoolResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDtoNodePoolResponse(val *DtoNodePoolResponse) *NullableDtoNodePoolResponse {
return &NullableDtoNodePoolResponse{value: val, isSet: true}
}
func (v NullableDtoNodePoolResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDtoNodePoolResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -0,0 +1,160 @@
/*
AutoGlue API
API for managing K3s clusters across cloud providers
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package autoglue
import (
"encoding/json"
)
// checks if the DtoUpdateNodePoolRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DtoUpdateNodePoolRequest{}
// DtoUpdateNodePoolRequest struct for DtoUpdateNodePoolRequest
type DtoUpdateNodePoolRequest struct {
Name *string `json:"name,omitempty"`
Role *string `json:"role,omitempty"`
}
// NewDtoUpdateNodePoolRequest instantiates a new DtoUpdateNodePoolRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewDtoUpdateNodePoolRequest() *DtoUpdateNodePoolRequest {
this := DtoUpdateNodePoolRequest{}
return &this
}
// NewDtoUpdateNodePoolRequestWithDefaults instantiates a new DtoUpdateNodePoolRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewDtoUpdateNodePoolRequestWithDefaults() *DtoUpdateNodePoolRequest {
this := DtoUpdateNodePoolRequest{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DtoUpdateNodePoolRequest) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoUpdateNodePoolRequest) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *DtoUpdateNodePoolRequest) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *DtoUpdateNodePoolRequest) SetName(v string) {
o.Name = &v
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *DtoUpdateNodePoolRequest) GetRole() string {
if o == nil || IsNil(o.Role) {
var ret string
return ret
}
return *o.Role
}
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DtoUpdateNodePoolRequest) GetRoleOk() (*string, bool) {
if o == nil || IsNil(o.Role) {
return nil, false
}
return o.Role, true
}
// HasRole returns a boolean if a field has been set.
func (o *DtoUpdateNodePoolRequest) HasRole() bool {
if o != nil && !IsNil(o.Role) {
return true
}
return false
}
// SetRole gets a reference to the given string and assigns it to the Role field.
func (o *DtoUpdateNodePoolRequest) SetRole(v string) {
o.Role = &v
}
func (o DtoUpdateNodePoolRequest) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DtoUpdateNodePoolRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Role) {
toSerialize["role"] = o.Role
}
return toSerialize, nil
}
type NullableDtoUpdateNodePoolRequest struct {
value *DtoUpdateNodePoolRequest
isSet bool
}
func (v NullableDtoUpdateNodePoolRequest) Get() *DtoUpdateNodePoolRequest {
return v.value
}
func (v *NullableDtoUpdateNodePoolRequest) Set(val *DtoUpdateNodePoolRequest) {
v.value = val
v.isSet = true
}
func (v NullableDtoUpdateNodePoolRequest) IsSet() bool {
return v.isSet
}
func (v *NullableDtoUpdateNodePoolRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDtoUpdateNodePoolRequest(val *DtoUpdateNodePoolRequest) *NullableDtoUpdateNodePoolRequest {
return &NullableDtoUpdateNodePoolRequest{value: val, isSet: true}
}
func (v NullableDtoUpdateNodePoolRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDtoUpdateNodePoolRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View File

@@ -0,0 +1,264 @@
/*
AutoGlue API
Testing NodePoolsAPIService
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
package autoglue
import (
"context"
"testing"
openapiclient "github.com/glueops/autoglue-sdk-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_autoglue_NodePoolsAPIService(t *testing.T) {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test NodePoolsAPIService AttachNodePoolAnnotations", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.AttachNodePoolAnnotations(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService AttachNodePoolLabels", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.AttachNodePoolLabels(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService AttachNodePoolServers", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.AttachNodePoolServers(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService AttachNodePoolTaints", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.AttachNodePoolTaints(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService CreateNodePool", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.NodePoolsAPI.CreateNodePool(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService DeleteNodePool", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.DeleteNodePool(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService DetachNodePoolAnnotation", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
var annotationId string
resp, httpRes, err := apiClient.NodePoolsAPI.DetachNodePoolAnnotation(context.Background(), id, annotationId).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService DetachNodePoolLabel", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
var labelId string
resp, httpRes, err := apiClient.NodePoolsAPI.DetachNodePoolLabel(context.Background(), id, labelId).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService DetachNodePoolServer", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
var serverId string
resp, httpRes, err := apiClient.NodePoolsAPI.DetachNodePoolServer(context.Background(), id, serverId).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService DetachNodePoolTaint", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
var taintId string
resp, httpRes, err := apiClient.NodePoolsAPI.DetachNodePoolTaint(context.Background(), id, taintId).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService GetNodePool", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.GetNodePool(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService ListNodePoolAnnotations", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePoolAnnotations(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService ListNodePoolLabels", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePoolLabels(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService ListNodePoolServers", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePoolServers(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService ListNodePoolTaints", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePoolTaints(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService ListNodePools", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePools(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test NodePoolsAPIService UpdateNodePool", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var id string
resp, httpRes, err := apiClient.NodePoolsAPI.UpdateNodePool(context.Background(), id).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
}

View File

@@ -6,9 +6,14 @@ docs/AnnotationsApi.md
docs/ArcherAdminApi.md
docs/AuthApi.md
docs/DtoAnnotationResponse.md
docs/DtoAttachAnnotationsRequest.md
docs/DtoAttachLabelsRequest.md
docs/DtoAttachServersRequest.md
docs/DtoAttachTaintsRequest.md
docs/DtoAuthStartResponse.md
docs/DtoCreateAnnotationRequest.md
docs/DtoCreateLabelRequest.md
docs/DtoCreateNodePoolRequest.md
docs/DtoCreateSSHRequest.md
docs/DtoCreateServerRequest.md
docs/DtoCreateTaintRequest.md
@@ -18,6 +23,7 @@ docs/DtoJob.md
docs/DtoJobStatus.md
docs/DtoLabelResponse.md
docs/DtoLogoutRequest.md
docs/DtoNodePoolResponse.md
docs/DtoPageJob.md
docs/DtoQueueInfo.md
docs/DtoRefreshRequest.md
@@ -28,6 +34,7 @@ docs/DtoTaintResponse.md
docs/DtoTokenPair.md
docs/DtoUpdateAnnotationRequest.md
docs/DtoUpdateLabelRequest.md
docs/DtoUpdateNodePoolRequest.md
docs/DtoUpdateServerRequest.md
docs/DtoUpdateTaintRequest.md
docs/HandlersCreateUserKeyRequest.md
@@ -49,6 +56,7 @@ docs/ModelsAPIKey.md
docs/ModelsOrganization.md
docs/ModelsUser.md
docs/ModelsUserEmail.md
docs/NodePoolsApi.md
docs/OrgsApi.md
docs/ServersApi.md
docs/SshApi.md
@@ -62,6 +70,7 @@ src/apis/HealthApi.ts
src/apis/LabelsApi.ts
src/apis/MeAPIKeysApi.ts
src/apis/MeApi.ts
src/apis/NodePoolsApi.ts
src/apis/OrgsApi.ts
src/apis/ServersApi.ts
src/apis/SshApi.ts
@@ -69,9 +78,14 @@ src/apis/TaintsApi.ts
src/apis/index.ts
src/index.ts
src/models/DtoAnnotationResponse.ts
src/models/DtoAttachAnnotationsRequest.ts
src/models/DtoAttachLabelsRequest.ts
src/models/DtoAttachServersRequest.ts
src/models/DtoAttachTaintsRequest.ts
src/models/DtoAuthStartResponse.ts
src/models/DtoCreateAnnotationRequest.ts
src/models/DtoCreateLabelRequest.ts
src/models/DtoCreateNodePoolRequest.ts
src/models/DtoCreateSSHRequest.ts
src/models/DtoCreateServerRequest.ts
src/models/DtoCreateTaintRequest.ts
@@ -81,6 +95,7 @@ src/models/DtoJob.ts
src/models/DtoJobStatus.ts
src/models/DtoLabelResponse.ts
src/models/DtoLogoutRequest.ts
src/models/DtoNodePoolResponse.ts
src/models/DtoPageJob.ts
src/models/DtoQueueInfo.ts
src/models/DtoRefreshRequest.ts
@@ -91,6 +106,7 @@ src/models/DtoTaintResponse.ts
src/models/DtoTokenPair.ts
src/models/DtoUpdateAnnotationRequest.ts
src/models/DtoUpdateLabelRequest.ts
src/models/DtoUpdateNodePoolRequest.ts
src/models/DtoUpdateServerRequest.ts
src/models/DtoUpdateTaintRequest.ts
src/models/HandlersCreateUserKeyRequest.ts

View File

@@ -54,69 +54,91 @@ example().catch(console.error);
### API Endpoints
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Class | Method | HTTP request | Description |
| ---------------- | ------------------------------------------------------------------------- | --------------------------------------- | ----------------------------------------------- |
| _AnnotationsApi_ | [**createAnnotation**](docs/AnnotationsApi.md#createannotation) | **POST** /annotations | Create annotation (org scoped) |
| _AnnotationsApi_ | [**deleteAnnotation**](docs/AnnotationsApi.md#deleteannotation) | **DELETE** /annotations/{id} | Delete annotation (org scoped) |
| _AnnotationsApi_ | [**getAnnotation**](docs/AnnotationsApi.md#getannotation) | **GET** /annotations/{id} | Get annotation by ID (org scoped) |
| _AnnotationsApi_ | [**listAnnotations**](docs/AnnotationsApi.md#listannotations) | **GET** /annotations | List annotations (org scoped) |
| _AnnotationsApi_ | [**updateAnnotation**](docs/AnnotationsApi.md#updateannotation) | **PATCH** /annotations/{id} | Update annotation (org scoped) |
| _ArcherAdminApi_ | [**adminCancelArcherJob**](docs/ArcherAdminApi.md#admincancelarcherjob) | **POST** /admin/archer/jobs/{id}/cancel | Cancel an Archer job (admin) |
| _ArcherAdminApi_ | [**adminEnqueueArcherJob**](docs/ArcherAdminApi.md#adminenqueuearcherjob) | **POST** /admin/archer/jobs | Enqueue a new Archer job (admin) |
| _ArcherAdminApi_ | [**adminListArcherJobs**](docs/ArcherAdminApi.md#adminlistarcherjobs) | **GET** /admin/archer/jobs | List Archer jobs (admin) |
| _ArcherAdminApi_ | [**adminListArcherQueues**](docs/ArcherAdminApi.md#adminlistarcherqueues) | **GET** /admin/archer/queues | List Archer queues (admin) |
| _ArcherAdminApi_ | [**adminRetryArcherJob**](docs/ArcherAdminApi.md#adminretryarcherjob) | **POST** /admin/archer/jobs/{id}/retry | Retry a failed/canceled Archer job (admin) |
| _AuthApi_ | [**authCallback**](docs/AuthApi.md#authcallback) | **GET** /auth/{provider}/callback | Handle social login callback |
| _AuthApi_ | [**authStart**](docs/AuthApi.md#authstart) | **POST** /auth/{provider}/start | Begin social login |
| _AuthApi_ | [**getJWKS**](docs/AuthApi.md#getjwks) | **GET** /.well-known/jwks.json | Get JWKS |
| _AuthApi_ | [**logout**](docs/AuthApi.md#logout) | **POST** /auth/logout | Revoke refresh token family (logout everywhere) |
| _AuthApi_ | [**refresh**](docs/AuthApi.md#refresh) | **POST** /auth/refresh | Rotate refresh token |
| _HealthApi_ | [**healthCheckOperationId**](docs/HealthApi.md#healthcheckoperationid) | **GET** /healthz | Basic health check |
| _LabelsApi_ | [**createLabel**](docs/LabelsApi.md#createlabel) | **POST** /labels | Create label (org scoped) |
| _LabelsApi_ | [**deleteLabel**](docs/LabelsApi.md#deletelabel) | **DELETE** /labels/{id} | Delete label (org scoped) |
| _LabelsApi_ | [**getLabel**](docs/LabelsApi.md#getlabel) | **GET** /labels/{id} | Get label by ID (org scoped) |
| _LabelsApi_ | [**listLabels**](docs/LabelsApi.md#listlabels) | **GET** /labels | List node labels (org scoped) |
| _LabelsApi_ | [**updateLabel**](docs/LabelsApi.md#updatelabel) | **PATCH** /labels/{id} | Update label (org scoped) |
| _MeApi_ | [**getMe**](docs/MeApi.md#getme) | **GET** /me | Get current user profile |
| _MeApi_ | [**updateMe**](docs/MeApi.md#updateme) | **PATCH** /me | Update current user profile |
| _MeAPIKeysApi_ | [**createUserAPIKey**](docs/MeAPIKeysApi.md#createuserapikey) | **POST** /me/api-keys | Create a new user API key |
| _MeAPIKeysApi_ | [**deleteUserAPIKey**](docs/MeAPIKeysApi.md#deleteuserapikey) | **DELETE** /me/api-keys/{id} | Delete a user API key |
| _MeAPIKeysApi_ | [**listUserAPIKeys**](docs/MeAPIKeysApi.md#listuserapikeys) | **GET** /me/api-keys | List my API keys |
| _OrgsApi_ | [**addOrUpdateMember**](docs/OrgsApi.md#addorupdatemember) | **POST** /orgs/{id}/members | Add or update a member (owner/admin) |
| _OrgsApi_ | [**createOrg**](docs/OrgsApi.md#createorg) | **POST** /orgs | Create organization |
| _OrgsApi_ | [**createOrgKey**](docs/OrgsApi.md#createorgkey) | **POST** /orgs/{id}/api-keys | Create org key/secret pair (owner/admin) |
| _OrgsApi_ | [**deleteOrg**](docs/OrgsApi.md#deleteorg) | **DELETE** /orgs/{id} | Delete organization (owner) |
| _OrgsApi_ | [**deleteOrgKey**](docs/OrgsApi.md#deleteorgkey) | **DELETE** /orgs/{id}/api-keys/{key_id} | Delete org key (owner/admin) |
| _OrgsApi_ | [**getOrg**](docs/OrgsApi.md#getorg) | **GET** /orgs/{id} | Get organization |
| _OrgsApi_ | [**listMembers**](docs/OrgsApi.md#listmembers) | **GET** /orgs/{id}/members | List members in org |
| _OrgsApi_ | [**listMyOrgs**](docs/OrgsApi.md#listmyorgs) | **GET** /orgs | List organizations I belong to |
| _OrgsApi_ | [**listOrgKeys**](docs/OrgsApi.md#listorgkeys) | **GET** /orgs/{id}/api-keys | List org-scoped API keys (no secrets) |
| _OrgsApi_ | [**removeMember**](docs/OrgsApi.md#removemember) | **DELETE** /orgs/{id}/members/{user_id} | Remove a member (owner/admin) |
| _OrgsApi_ | [**updateOrg**](docs/OrgsApi.md#updateorg) | **PATCH** /orgs/{id} | Update organization (owner/admin) |
| _ServersApi_ | [**createServer**](docs/ServersApi.md#createserver) | **POST** /servers | Create server (org scoped) |
| _ServersApi_ | [**deleteServer**](docs/ServersApi.md#deleteserver) | **DELETE** /servers/{id} | Delete server (org scoped) |
| _ServersApi_ | [**getServer**](docs/ServersApi.md#getserver) | **GET** /servers/{id} | Get server by ID (org scoped) |
| _ServersApi_ | [**listServers**](docs/ServersApi.md#listservers) | **GET** /servers | List servers (org scoped) |
| _ServersApi_ | [**updateServer**](docs/ServersApi.md#updateserver) | **PATCH** /servers/{id} | Update server (org scoped) |
| _SshApi_ | [**createSSHKey**](docs/SshApi.md#createsshkey) | **POST** /ssh | Create ssh keypair (org scoped) |
| _SshApi_ | [**deleteSSHKey**](docs/SshApi.md#deletesshkey) | **DELETE** /ssh/{id} | Delete ssh keypair (org scoped) |
| _SshApi_ | [**downloadSSHKey**](docs/SshApi.md#downloadsshkey) | **GET** /ssh/{id}/download | Download ssh key files by ID (org scoped) |
| _SshApi_ | [**getSSHKey**](docs/SshApi.md#getsshkey) | **GET** /ssh/{id} | Get ssh key by ID (org scoped) |
| _SshApi_ | [**listPublicSshKeys**](docs/SshApi.md#listpublicsshkeys) | **GET** /ssh | List ssh keys (org scoped) |
| _TaintsApi_ | [**createTaint**](docs/TaintsApi.md#createtaint) | **POST** /taints | Create node taint (org scoped) |
| _TaintsApi_ | [**deleteTaint**](docs/TaintsApi.md#deletetaint) | **DELETE** /taints/{id} | Delete taint (org scoped) |
| _TaintsApi_ | [**getTaint**](docs/TaintsApi.md#gettaint) | **GET** /taints/{id} | Get node taint by ID (org scoped) |
| _TaintsApi_ | [**listTaints**](docs/TaintsApi.md#listtaints) | **GET** /taints | List node pool taints (org scoped) |
| _TaintsApi_ | [**updateTaint**](docs/TaintsApi.md#updatetaint) | **PATCH** /taints/{id} | Update node taint (org scoped) |
| Class | Method | HTTP request | Description |
| ---------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------ | ----------------------------------------------------- |
| _AnnotationsApi_ | [**createAnnotation**](docs/AnnotationsApi.md#createannotation) | **POST** /annotations | Create annotation (org scoped) |
| _AnnotationsApi_ | [**deleteAnnotation**](docs/AnnotationsApi.md#deleteannotation) | **DELETE** /annotations/{id} | Delete annotation (org scoped) |
| _AnnotationsApi_ | [**getAnnotation**](docs/AnnotationsApi.md#getannotation) | **GET** /annotations/{id} | Get annotation by ID (org scoped) |
| _AnnotationsApi_ | [**listAnnotations**](docs/AnnotationsApi.md#listannotations) | **GET** /annotations | List annotations (org scoped) |
| _AnnotationsApi_ | [**updateAnnotation**](docs/AnnotationsApi.md#updateannotation) | **PATCH** /annotations/{id} | Update annotation (org scoped) |
| _ArcherAdminApi_ | [**adminCancelArcherJob**](docs/ArcherAdminApi.md#admincancelarcherjob) | **POST** /admin/archer/jobs/{id}/cancel | Cancel an Archer job (admin) |
| _ArcherAdminApi_ | [**adminEnqueueArcherJob**](docs/ArcherAdminApi.md#adminenqueuearcherjob) | **POST** /admin/archer/jobs | Enqueue a new Archer job (admin) |
| _ArcherAdminApi_ | [**adminListArcherJobs**](docs/ArcherAdminApi.md#adminlistarcherjobs) | **GET** /admin/archer/jobs | List Archer jobs (admin) |
| _ArcherAdminApi_ | [**adminListArcherQueues**](docs/ArcherAdminApi.md#adminlistarcherqueues) | **GET** /admin/archer/queues | List Archer queues (admin) |
| _ArcherAdminApi_ | [**adminRetryArcherJob**](docs/ArcherAdminApi.md#adminretryarcherjob) | **POST** /admin/archer/jobs/{id}/retry | Retry a failed/canceled Archer job (admin) |
| _AuthApi_ | [**authCallback**](docs/AuthApi.md#authcallback) | **GET** /auth/{provider}/callback | Handle social login callback |
| _AuthApi_ | [**authStart**](docs/AuthApi.md#authstart) | **POST** /auth/{provider}/start | Begin social login |
| _AuthApi_ | [**getJWKS**](docs/AuthApi.md#getjwks) | **GET** /.well-known/jwks.json | Get JWKS |
| _AuthApi_ | [**logout**](docs/AuthApi.md#logout) | **POST** /auth/logout | Revoke refresh token family (logout everywhere) |
| _AuthApi_ | [**refresh**](docs/AuthApi.md#refresh) | **POST** /auth/refresh | Rotate refresh token |
| _HealthApi_ | [**healthCheckOperationId**](docs/HealthApi.md#healthcheckoperationid) | **GET** /healthz | Basic health check |
| _LabelsApi_ | [**createLabel**](docs/LabelsApi.md#createlabel) | **POST** /labels | Create label (org scoped) |
| _LabelsApi_ | [**deleteLabel**](docs/LabelsApi.md#deletelabel) | **DELETE** /labels/{id} | Delete label (org scoped) |
| _LabelsApi_ | [**getLabel**](docs/LabelsApi.md#getlabel) | **GET** /labels/{id} | Get label by ID (org scoped) |
| _LabelsApi_ | [**listLabels**](docs/LabelsApi.md#listlabels) | **GET** /labels | List node labels (org scoped) |
| _LabelsApi_ | [**updateLabel**](docs/LabelsApi.md#updatelabel) | **PATCH** /labels/{id} | Update label (org scoped) |
| _MeApi_ | [**getMe**](docs/MeApi.md#getme) | **GET** /me | Get current user profile |
| _MeApi_ | [**updateMe**](docs/MeApi.md#updateme) | **PATCH** /me | Update current user profile |
| _MeAPIKeysApi_ | [**createUserAPIKey**](docs/MeAPIKeysApi.md#createuserapikey) | **POST** /me/api-keys | Create a new user API key |
| _MeAPIKeysApi_ | [**deleteUserAPIKey**](docs/MeAPIKeysApi.md#deleteuserapikey) | **DELETE** /me/api-keys/{id} | Delete a user API key |
| _MeAPIKeysApi_ | [**listUserAPIKeys**](docs/MeAPIKeysApi.md#listuserapikeys) | **GET** /me/api-keys | List my API keys |
| _NodePoolsApi_ | [**attachNodePoolAnnotations**](docs/NodePoolsApi.md#attachnodepoolannotations) | **POST** /node-pools/{id}/annotations | Attach annotation to a node pool (org scoped) |
| _NodePoolsApi_ | [**attachNodePoolLabels**](docs/NodePoolsApi.md#attachnodepoollabels) | **POST** /node-pools/{id}/labels | Attach labels to a node pool (org scoped) |
| _NodePoolsApi_ | [**attachNodePoolServers**](docs/NodePoolsApi.md#attachnodepoolservers) | **POST** /node-pools/{id}/servers | Attach servers to a node pool (org scoped) |
| _NodePoolsApi_ | [**attachNodePoolTaints**](docs/NodePoolsApi.md#attachnodepooltaints) | **POST** /node-pools/{id}/taints | Attach taints to a node pool (org scoped) |
| _NodePoolsApi_ | [**createNodePool**](docs/NodePoolsApi.md#createnodepool) | **POST** /node-pools | Create node pool (org scoped) |
| _NodePoolsApi_ | [**deleteNodePool**](docs/NodePoolsApi.md#deletenodepool) | **DELETE** /node-pools/{id} | Delete node pool (org scoped) |
| _NodePoolsApi_ | [**detachNodePoolAnnotation**](docs/NodePoolsApi.md#detachnodepoolannotation) | **DELETE** /node-pools/{id}/annotations/{annotationId} | Detach one annotation from a node pool (org scoped) |
| _NodePoolsApi_ | [**detachNodePoolLabel**](docs/NodePoolsApi.md#detachnodepoollabel) | **DELETE** /node-pools/{id}/labels/{labelId} | Detach one label from a node pool (org scoped) |
| _NodePoolsApi_ | [**detachNodePoolServer**](docs/NodePoolsApi.md#detachnodepoolserver) | **DELETE** /node-pools/{id}/servers/{serverId} | Detach one server from a node pool (org scoped) |
| _NodePoolsApi_ | [**detachNodePoolTaint**](docs/NodePoolsApi.md#detachnodepooltaint) | **DELETE** /node-pools/{id}/taints/{taintId} | Detach one taint from a node pool (org scoped) |
| _NodePoolsApi_ | [**getNodePool**](docs/NodePoolsApi.md#getnodepool) | **GET** /node-pools/{id} | Get node pool by ID (org scoped) |
| _NodePoolsApi_ | [**listNodePoolAnnotations**](docs/NodePoolsApi.md#listnodepoolannotations) | **GET** /node-pools/{id}/annotations | List annotations attached to a node pool (org scoped) |
| _NodePoolsApi_ | [**listNodePoolLabels**](docs/NodePoolsApi.md#listnodepoollabels) | **GET** /node-pools/{id}/labels | List labels attached to a node pool (org scoped) |
| _NodePoolsApi_ | [**listNodePoolServers**](docs/NodePoolsApi.md#listnodepoolservers) | **GET** /node-pools/{id}/servers | List servers attached to a node pool (org scoped) |
| _NodePoolsApi_ | [**listNodePoolTaints**](docs/NodePoolsApi.md#listnodepooltaints) | **GET** /node-pools/{id}/taints | List taints attached to a node pool (org scoped) |
| _NodePoolsApi_ | [**listNodePools**](docs/NodePoolsApi.md#listnodepools) | **GET** /node-pools | List node pools (org scoped) |
| _NodePoolsApi_ | [**updateNodePool**](docs/NodePoolsApi.md#updatenodepool) | **PATCH** /node-pools/{id} | Update node pool (org scoped) |
| _OrgsApi_ | [**addOrUpdateMember**](docs/OrgsApi.md#addorupdatemember) | **POST** /orgs/{id}/members | Add or update a member (owner/admin) |
| _OrgsApi_ | [**createOrg**](docs/OrgsApi.md#createorg) | **POST** /orgs | Create organization |
| _OrgsApi_ | [**createOrgKey**](docs/OrgsApi.md#createorgkey) | **POST** /orgs/{id}/api-keys | Create org key/secret pair (owner/admin) |
| _OrgsApi_ | [**deleteOrg**](docs/OrgsApi.md#deleteorg) | **DELETE** /orgs/{id} | Delete organization (owner) |
| _OrgsApi_ | [**deleteOrgKey**](docs/OrgsApi.md#deleteorgkey) | **DELETE** /orgs/{id}/api-keys/{key_id} | Delete org key (owner/admin) |
| _OrgsApi_ | [**getOrg**](docs/OrgsApi.md#getorg) | **GET** /orgs/{id} | Get organization |
| _OrgsApi_ | [**listMembers**](docs/OrgsApi.md#listmembers) | **GET** /orgs/{id}/members | List members in org |
| _OrgsApi_ | [**listMyOrgs**](docs/OrgsApi.md#listmyorgs) | **GET** /orgs | List organizations I belong to |
| _OrgsApi_ | [**listOrgKeys**](docs/OrgsApi.md#listorgkeys) | **GET** /orgs/{id}/api-keys | List org-scoped API keys (no secrets) |
| _OrgsApi_ | [**removeMember**](docs/OrgsApi.md#removemember) | **DELETE** /orgs/{id}/members/{user_id} | Remove a member (owner/admin) |
| _OrgsApi_ | [**updateOrg**](docs/OrgsApi.md#updateorg) | **PATCH** /orgs/{id} | Update organization (owner/admin) |
| _ServersApi_ | [**createServer**](docs/ServersApi.md#createserver) | **POST** /servers | Create server (org scoped) |
| _ServersApi_ | [**deleteServer**](docs/ServersApi.md#deleteserver) | **DELETE** /servers/{id} | Delete server (org scoped) |
| _ServersApi_ | [**getServer**](docs/ServersApi.md#getserver) | **GET** /servers/{id} | Get server by ID (org scoped) |
| _ServersApi_ | [**listServers**](docs/ServersApi.md#listservers) | **GET** /servers | List servers (org scoped) |
| _ServersApi_ | [**updateServer**](docs/ServersApi.md#updateserver) | **PATCH** /servers/{id} | Update server (org scoped) |
| _SshApi_ | [**createSSHKey**](docs/SshApi.md#createsshkey) | **POST** /ssh | Create ssh keypair (org scoped) |
| _SshApi_ | [**deleteSSHKey**](docs/SshApi.md#deletesshkey) | **DELETE** /ssh/{id} | Delete ssh keypair (org scoped) |
| _SshApi_ | [**downloadSSHKey**](docs/SshApi.md#downloadsshkey) | **GET** /ssh/{id}/download | Download ssh key files by ID (org scoped) |
| _SshApi_ | [**getSSHKey**](docs/SshApi.md#getsshkey) | **GET** /ssh/{id} | Get ssh key by ID (org scoped) |
| _SshApi_ | [**listPublicSshKeys**](docs/SshApi.md#listpublicsshkeys) | **GET** /ssh | List ssh keys (org scoped) |
| _TaintsApi_ | [**createTaint**](docs/TaintsApi.md#createtaint) | **POST** /taints | Create node taint (org scoped) |
| _TaintsApi_ | [**deleteTaint**](docs/TaintsApi.md#deletetaint) | **DELETE** /taints/{id} | Delete taint (org scoped) |
| _TaintsApi_ | [**getTaint**](docs/TaintsApi.md#gettaint) | **GET** /taints/{id} | Get node taint by ID (org scoped) |
| _TaintsApi_ | [**listTaints**](docs/TaintsApi.md#listtaints) | **GET** /taints | List node pool taints (org scoped) |
| _TaintsApi_ | [**updateTaint**](docs/TaintsApi.md#updatetaint) | **PATCH** /taints/{id} | Update node taint (org scoped) |
### Models
- [DtoAnnotationResponse](docs/DtoAnnotationResponse.md)
- [DtoAttachAnnotationsRequest](docs/DtoAttachAnnotationsRequest.md)
- [DtoAttachLabelsRequest](docs/DtoAttachLabelsRequest.md)
- [DtoAttachServersRequest](docs/DtoAttachServersRequest.md)
- [DtoAttachTaintsRequest](docs/DtoAttachTaintsRequest.md)
- [DtoAuthStartResponse](docs/DtoAuthStartResponse.md)
- [DtoCreateAnnotationRequest](docs/DtoCreateAnnotationRequest.md)
- [DtoCreateLabelRequest](docs/DtoCreateLabelRequest.md)
- [DtoCreateNodePoolRequest](docs/DtoCreateNodePoolRequest.md)
- [DtoCreateSSHRequest](docs/DtoCreateSSHRequest.md)
- [DtoCreateServerRequest](docs/DtoCreateServerRequest.md)
- [DtoCreateTaintRequest](docs/DtoCreateTaintRequest.md)
@@ -126,6 +148,7 @@ All URIs are relative to _http://localhost:8080/api/v1_
- [DtoJobStatus](docs/DtoJobStatus.md)
- [DtoLabelResponse](docs/DtoLabelResponse.md)
- [DtoLogoutRequest](docs/DtoLogoutRequest.md)
- [DtoNodePoolResponse](docs/DtoNodePoolResponse.md)
- [DtoPageJob](docs/DtoPageJob.md)
- [DtoQueueInfo](docs/DtoQueueInfo.md)
- [DtoRefreshRequest](docs/DtoRefreshRequest.md)
@@ -136,6 +159,7 @@ All URIs are relative to _http://localhost:8080/api/v1_
- [DtoTokenPair](docs/DtoTokenPair.md)
- [DtoUpdateAnnotationRequest](docs/DtoUpdateAnnotationRequest.md)
- [DtoUpdateLabelRequest](docs/DtoUpdateLabelRequest.md)
- [DtoUpdateNodePoolRequest](docs/DtoUpdateNodePoolRequest.md)
- [DtoUpdateServerRequest](docs/DtoUpdateServerRequest.md)
- [DtoUpdateTaintRequest](docs/DtoUpdateTaintRequest.md)
- [HandlersCreateUserKeyRequest](docs/HandlersCreateUserKeyRequest.md)

View File

@@ -1,6 +1,6 @@
# AnnotationsApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| ---------------------------------------------------------- | ---------------------------- | --------------------------------- |

View File

@@ -1,6 +1,6 @@
# ArcherAdminApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| -------------------------------------------------------------------- | --------------------------------------- | ------------------------------------------ |

View File

@@ -1,6 +1,6 @@
# AuthApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| ------------------------------------------- | --------------------------------- | ----------------------------------------------- |

View File

@@ -0,0 +1,30 @@
# DtoAttachAnnotationsRequest
## Properties
| Name | Type |
| ---------------- | ------------------- |
| `annotation_ids` | Array&lt;string&gt; |
## Example
```typescript
import type { DtoAttachAnnotationsRequest } from "@glueops/autoglue-sdk-go";
// TODO: Update the object below with actual values
const example = {
annotation_ids: null,
} satisfies DtoAttachAnnotationsRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoAttachAnnotationsRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# DtoAttachLabelsRequest
## Properties
| Name | Type |
| ----------- | ------------------- |
| `label_ids` | Array&lt;string&gt; |
## Example
```typescript
import type { DtoAttachLabelsRequest } from "@glueops/autoglue-sdk-go";
// TODO: Update the object below with actual values
const example = {
label_ids: null,
} satisfies DtoAttachLabelsRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoAttachLabelsRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# DtoAttachServersRequest
## Properties
| Name | Type |
| ------------ | ------------------- |
| `server_ids` | Array&lt;string&gt; |
## Example
```typescript
import type { DtoAttachServersRequest } from "@glueops/autoglue-sdk-go";
// TODO: Update the object below with actual values
const example = {
server_ids: null,
} satisfies DtoAttachServersRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoAttachServersRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,30 @@
# DtoAttachTaintsRequest
## Properties
| Name | Type |
| ----------- | ------------------- |
| `taint_ids` | Array&lt;string&gt; |
## Example
```typescript
import type { DtoAttachTaintsRequest } from "@glueops/autoglue-sdk-go";
// TODO: Update the object below with actual values
const example = {
taint_ids: null,
} satisfies DtoAttachTaintsRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoAttachTaintsRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,32 @@
# DtoCreateNodePoolRequest
## Properties
| Name | Type |
| ------ | ------ |
| `name` | string |
| `role` | string |
## Example
```typescript
import type { DtoCreateNodePoolRequest } from "@glueops/autoglue-sdk-go";
// TODO: Update the object below with actual values
const example = {
name: null,
role: null,
} satisfies DtoCreateNodePoolRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoCreateNodePoolRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -0,0 +1,48 @@
# DtoNodePoolResponse
## Properties
| Name | Type |
| ----------------- | -------------------------------------------------------------- |
| `annotations` | [Array&lt;DtoAnnotationResponse&gt;](DtoAnnotationResponse.md) |
| `created_at` | string |
| `id` | string |
| `labels` | [Array&lt;DtoLabelResponse&gt;](DtoLabelResponse.md) |
| `name` | string |
| `organization_id` | string |
| `role` | string |
| `servers` | [Array&lt;DtoServerResponse&gt;](DtoServerResponse.md) |
| `taints` | [Array&lt;DtoTaintResponse&gt;](DtoTaintResponse.md) |
| `updated_at` | string |
## Example
```typescript
import type { DtoNodePoolResponse } from "@glueops/autoglue-sdk-go";
// TODO: Update the object below with actual values
const example = {
annotations: null,
created_at: null,
id: null,
labels: null,
name: null,
organization_id: null,
role: null,
servers: null,
taints: null,
updated_at: null,
} satisfies DtoNodePoolResponse;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoNodePoolResponse;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -29,10 +29,10 @@ const example = {
organization_id: null,
private_ip_address: null,
public_ip_address: null,
role: null,
role: master | worker | bastion,
ssh_key_id: null,
ssh_user: null,
status: null,
status: pending | provisioning | ready | failed,
updated_at: null,
} satisfies DtoServerResponse;

View File

@@ -0,0 +1,32 @@
# DtoUpdateNodePoolRequest
## Properties
| Name | Type |
| ------ | ------ |
| `name` | string |
| `role` | string |
## Example
```typescript
import type { DtoUpdateNodePoolRequest } from "@glueops/autoglue-sdk-go";
// TODO: Update the object below with actual values
const example = {
name: null,
role: null,
} satisfies DtoUpdateNodePoolRequest;
console.log(example);
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example);
console.log(exampleJSON);
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as DtoUpdateNodePoolRequest;
console.log(exampleParsed);
```
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)

View File

@@ -1,6 +1,6 @@
# HealthApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| ----------------------------------------------------------------- | ---------------- | ------------------ |

View File

@@ -1,6 +1,6 @@
# LabelsApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| ------------------------------------------- | ----------------------- | ----------------------------- |

View File

@@ -1,6 +1,6 @@
# MeAPIKeysApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| -------------------------------------------------------- | ---------------------------- | ------------------------- |

View File

@@ -1,6 +1,6 @@
# MeApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| --------------------------------- | ------------- | --------------------------- |

1366
sdk/ts/docs/NodePoolsApi.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
# OrgsApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| ----------------------------------------------------- | --------------------------------------- | ---------------------------------------- |

View File

@@ -1,6 +1,6 @@
# ServersApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| ---------------------------------------------- | ------------------------ | ----------------------------- |

View File

@@ -1,6 +1,6 @@
# SshApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| ---------------------------------------------------- | -------------------------- | ----------------------------------------- |

View File

@@ -1,6 +1,6 @@
# TaintsApi
All URIs are relative to _http://localhost:8080/api/v1_
All URIs are relative to _/api/v1_
| Method | HTTP request | Description |
| ------------------------------------------- | ----------------------- | ---------------------------------- |

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,7 @@ export * from "./HealthApi";
export * from "./LabelsApi";
export * from "./MeApi";
export * from "./MeAPIKeysApi";
export * from "./NodePoolsApi";
export * from "./OrgsApi";
export * from "./ServersApi";
export * from "./SshApi";

View File

@@ -0,0 +1,74 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoAttachAnnotationsRequest
*/
export interface DtoAttachAnnotationsRequest {
/**
*
* @type {Array<string>}
* @memberof DtoAttachAnnotationsRequest
*/
annotation_ids?: Array<string>;
}
/**
* Check if a given object implements the DtoAttachAnnotationsRequest interface.
*/
export function instanceOfDtoAttachAnnotationsRequest(
value: object,
): value is DtoAttachAnnotationsRequest {
return true;
}
export function DtoAttachAnnotationsRequestFromJSON(
json: any,
): DtoAttachAnnotationsRequest {
return DtoAttachAnnotationsRequestFromJSONTyped(json, false);
}
export function DtoAttachAnnotationsRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAttachAnnotationsRequest {
if (json == null) {
return json;
}
return {
annotation_ids:
json["annotation_ids"] == null ? undefined : json["annotation_ids"],
};
}
export function DtoAttachAnnotationsRequestToJSON(
json: any,
): DtoAttachAnnotationsRequest {
return DtoAttachAnnotationsRequestToJSONTyped(json, false);
}
export function DtoAttachAnnotationsRequestToJSONTyped(
value?: DtoAttachAnnotationsRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
annotation_ids: value["annotation_ids"],
};
}

View File

@@ -0,0 +1,73 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoAttachLabelsRequest
*/
export interface DtoAttachLabelsRequest {
/**
*
* @type {Array<string>}
* @memberof DtoAttachLabelsRequest
*/
label_ids?: Array<string>;
}
/**
* Check if a given object implements the DtoAttachLabelsRequest interface.
*/
export function instanceOfDtoAttachLabelsRequest(
value: object,
): value is DtoAttachLabelsRequest {
return true;
}
export function DtoAttachLabelsRequestFromJSON(
json: any,
): DtoAttachLabelsRequest {
return DtoAttachLabelsRequestFromJSONTyped(json, false);
}
export function DtoAttachLabelsRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAttachLabelsRequest {
if (json == null) {
return json;
}
return {
label_ids: json["label_ids"] == null ? undefined : json["label_ids"],
};
}
export function DtoAttachLabelsRequestToJSON(
json: any,
): DtoAttachLabelsRequest {
return DtoAttachLabelsRequestToJSONTyped(json, false);
}
export function DtoAttachLabelsRequestToJSONTyped(
value?: DtoAttachLabelsRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
label_ids: value["label_ids"],
};
}

View File

@@ -0,0 +1,73 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoAttachServersRequest
*/
export interface DtoAttachServersRequest {
/**
*
* @type {Array<string>}
* @memberof DtoAttachServersRequest
*/
server_ids?: Array<string>;
}
/**
* Check if a given object implements the DtoAttachServersRequest interface.
*/
export function instanceOfDtoAttachServersRequest(
value: object,
): value is DtoAttachServersRequest {
return true;
}
export function DtoAttachServersRequestFromJSON(
json: any,
): DtoAttachServersRequest {
return DtoAttachServersRequestFromJSONTyped(json, false);
}
export function DtoAttachServersRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAttachServersRequest {
if (json == null) {
return json;
}
return {
server_ids: json["server_ids"] == null ? undefined : json["server_ids"],
};
}
export function DtoAttachServersRequestToJSON(
json: any,
): DtoAttachServersRequest {
return DtoAttachServersRequestToJSONTyped(json, false);
}
export function DtoAttachServersRequestToJSONTyped(
value?: DtoAttachServersRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
server_ids: value["server_ids"],
};
}

View File

@@ -0,0 +1,73 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoAttachTaintsRequest
*/
export interface DtoAttachTaintsRequest {
/**
*
* @type {Array<string>}
* @memberof DtoAttachTaintsRequest
*/
taint_ids?: Array<string>;
}
/**
* Check if a given object implements the DtoAttachTaintsRequest interface.
*/
export function instanceOfDtoAttachTaintsRequest(
value: object,
): value is DtoAttachTaintsRequest {
return true;
}
export function DtoAttachTaintsRequestFromJSON(
json: any,
): DtoAttachTaintsRequest {
return DtoAttachTaintsRequestFromJSONTyped(json, false);
}
export function DtoAttachTaintsRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoAttachTaintsRequest {
if (json == null) {
return json;
}
return {
taint_ids: json["taint_ids"] == null ? undefined : json["taint_ids"],
};
}
export function DtoAttachTaintsRequestToJSON(
json: any,
): DtoAttachTaintsRequest {
return DtoAttachTaintsRequestToJSONTyped(json, false);
}
export function DtoAttachTaintsRequestToJSONTyped(
value?: DtoAttachTaintsRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
taint_ids: value["taint_ids"],
};
}

View File

@@ -0,0 +1,91 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoCreateNodePoolRequest
*/
export interface DtoCreateNodePoolRequest {
/**
*
* @type {string}
* @memberof DtoCreateNodePoolRequest
*/
name?: string;
/**
*
* @type {string}
* @memberof DtoCreateNodePoolRequest
*/
role?: DtoCreateNodePoolRequestRoleEnum;
}
/**
* @export
*/
export const DtoCreateNodePoolRequestRoleEnum = {
master: "master",
worker: "worker",
} as const;
export type DtoCreateNodePoolRequestRoleEnum =
(typeof DtoCreateNodePoolRequestRoleEnum)[keyof typeof DtoCreateNodePoolRequestRoleEnum];
/**
* Check if a given object implements the DtoCreateNodePoolRequest interface.
*/
export function instanceOfDtoCreateNodePoolRequest(
value: object,
): value is DtoCreateNodePoolRequest {
return true;
}
export function DtoCreateNodePoolRequestFromJSON(
json: any,
): DtoCreateNodePoolRequest {
return DtoCreateNodePoolRequestFromJSONTyped(json, false);
}
export function DtoCreateNodePoolRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoCreateNodePoolRequest {
if (json == null) {
return json;
}
return {
name: json["name"] == null ? undefined : json["name"],
role: json["role"] == null ? undefined : json["role"],
};
}
export function DtoCreateNodePoolRequestToJSON(
json: any,
): DtoCreateNodePoolRequest {
return DtoCreateNodePoolRequestToJSONTyped(json, false);
}
export function DtoCreateNodePoolRequestToJSONTyped(
value?: DtoCreateNodePoolRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
name: value["name"],
role: value["role"],
};
}

View File

@@ -12,7 +12,6 @@
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
@@ -42,7 +41,7 @@ export interface DtoCreateServerRequest {
* @type {string}
* @memberof DtoCreateServerRequest
*/
role?: string;
role?: DtoCreateServerRequestRoleEnum;
/**
*
* @type {string}
@@ -60,9 +59,32 @@ export interface DtoCreateServerRequest {
* @type {string}
* @memberof DtoCreateServerRequest
*/
status?: string;
status?: DtoCreateServerRequestStatusEnum;
}
/**
* @export
*/
export const DtoCreateServerRequestRoleEnum = {
master: "master",
worker: "worker",
bastion: "bastion",
} as const;
export type DtoCreateServerRequestRoleEnum =
(typeof DtoCreateServerRequestRoleEnum)[keyof typeof DtoCreateServerRequestRoleEnum];
/**
* @export
*/
export const DtoCreateServerRequestStatusEnum = {
pending: "pending",
provisioning: "provisioning",
ready: "ready",
failed: "failed",
} as const;
export type DtoCreateServerRequestStatusEnum =
(typeof DtoCreateServerRequestStatusEnum)[keyof typeof DtoCreateServerRequestStatusEnum];
/**
* Check if a given object implements the DtoCreateServerRequest interface.
*/

View File

@@ -0,0 +1,187 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type {DtoTaintResponse} from "./DtoTaintResponse";
import {DtoTaintResponseFromJSON, DtoTaintResponseToJSON,} from "./DtoTaintResponse";
import type {DtoLabelResponse} from "./DtoLabelResponse";
import {DtoLabelResponseFromJSON, DtoLabelResponseToJSON,} from "./DtoLabelResponse";
import type {DtoServerResponse} from "./DtoServerResponse";
import {DtoServerResponseFromJSON, DtoServerResponseToJSON,} from "./DtoServerResponse";
import type {DtoAnnotationResponse} from "./DtoAnnotationResponse";
import {DtoAnnotationResponseFromJSON, DtoAnnotationResponseToJSON,} from "./DtoAnnotationResponse";
/**
*
* @export
* @interface DtoNodePoolResponse
*/
export interface DtoNodePoolResponse {
/**
*
* @type {Array<DtoAnnotationResponse>}
* @memberof DtoNodePoolResponse
*/
annotations?: Array<DtoAnnotationResponse>;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
created_at?: string;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
id?: string;
/**
*
* @type {Array<DtoLabelResponse>}
* @memberof DtoNodePoolResponse
*/
labels?: Array<DtoLabelResponse>;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
name?: string;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
organization_id?: string;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
role?: DtoNodePoolResponseRoleEnum;
/**
*
* @type {Array<DtoServerResponse>}
* @memberof DtoNodePoolResponse
*/
servers?: Array<DtoServerResponse>;
/**
*
* @type {Array<DtoTaintResponse>}
* @memberof DtoNodePoolResponse
*/
taints?: Array<DtoTaintResponse>;
/**
*
* @type {string}
* @memberof DtoNodePoolResponse
*/
updated_at?: string;
}
/**
* @export
*/
export const DtoNodePoolResponseRoleEnum = {
master: "master",
worker: "worker",
} as const;
export type DtoNodePoolResponseRoleEnum =
(typeof DtoNodePoolResponseRoleEnum)[keyof typeof DtoNodePoolResponseRoleEnum];
/**
* Check if a given object implements the DtoNodePoolResponse interface.
*/
export function instanceOfDtoNodePoolResponse(
value: object,
): value is DtoNodePoolResponse {
return true;
}
export function DtoNodePoolResponseFromJSON(json: any): DtoNodePoolResponse {
return DtoNodePoolResponseFromJSONTyped(json, false);
}
export function DtoNodePoolResponseFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoNodePoolResponse {
if (json == null) {
return json;
}
return {
annotations:
json["annotations"] == null
? undefined
: (json["annotations"] as Array<any>).map(
DtoAnnotationResponseFromJSON,
),
created_at: json["created_at"] == null ? undefined : json["created_at"],
id: json["id"] == null ? undefined : json["id"],
labels:
json["labels"] == null
? undefined
: (json["labels"] as Array<any>).map(DtoLabelResponseFromJSON),
name: json["name"] == null ? undefined : json["name"],
organization_id:
json["organization_id"] == null ? undefined : json["organization_id"],
role: json["role"] == null ? undefined : json["role"],
servers:
json["servers"] == null
? undefined
: (json["servers"] as Array<any>).map(DtoServerResponseFromJSON),
taints:
json["taints"] == null
? undefined
: (json["taints"] as Array<any>).map(DtoTaintResponseFromJSON),
updated_at: json["updated_at"] == null ? undefined : json["updated_at"],
};
}
export function DtoNodePoolResponseToJSON(json: any): DtoNodePoolResponse {
return DtoNodePoolResponseToJSONTyped(json, false);
}
export function DtoNodePoolResponseToJSONTyped(
value?: DtoNodePoolResponse | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
annotations:
value["annotations"] == null
? undefined
: (value["annotations"] as Array<any>).map(DtoAnnotationResponseToJSON),
created_at: value["created_at"],
id: value["id"],
labels:
value["labels"] == null
? undefined
: (value["labels"] as Array<any>).map(DtoLabelResponseToJSON),
name: value["name"],
organization_id: value["organization_id"],
role: value["role"],
servers:
value["servers"] == null
? undefined
: (value["servers"] as Array<any>).map(DtoServerResponseToJSON),
taints:
value["taints"] == null
? undefined
: (value["taints"] as Array<any>).map(DtoTaintResponseToJSON),
updated_at: value["updated_at"],
};
}

View File

@@ -12,7 +12,6 @@
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
@@ -60,7 +59,7 @@ export interface DtoServerResponse {
* @type {string}
* @memberof DtoServerResponse
*/
role?: string;
role?: DtoServerResponseRoleEnum;
/**
*
* @type {string}
@@ -78,7 +77,7 @@ export interface DtoServerResponse {
* @type {string}
* @memberof DtoServerResponse
*/
status?: string;
status?: DtoServerResponseStatusEnum;
/**
*
* @type {string}
@@ -87,6 +86,29 @@ export interface DtoServerResponse {
updated_at?: string;
}
/**
* @export
*/
export const DtoServerResponseRoleEnum = {
master: "master",
worker: "worker",
bastion: "bastion",
} as const;
export type DtoServerResponseRoleEnum =
(typeof DtoServerResponseRoleEnum)[keyof typeof DtoServerResponseRoleEnum];
/**
* @export
*/
export const DtoServerResponseStatusEnum = {
pending: "pending",
provisioning: "provisioning",
ready: "ready",
failed: "failed",
} as const;
export type DtoServerResponseStatusEnum =
(typeof DtoServerResponseStatusEnum)[keyof typeof DtoServerResponseStatusEnum];
/**
* Check if a given object implements the DtoServerResponse interface.
*/

View File

@@ -0,0 +1,91 @@
/* tslint:disable */
/* eslint-disable */
/**
* AutoGlue API
* API for managing K3s clusters across cloud providers
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
*
* @export
* @interface DtoUpdateNodePoolRequest
*/
export interface DtoUpdateNodePoolRequest {
/**
*
* @type {string}
* @memberof DtoUpdateNodePoolRequest
*/
name?: string;
/**
*
* @type {string}
* @memberof DtoUpdateNodePoolRequest
*/
role?: DtoUpdateNodePoolRequestRoleEnum;
}
/**
* @export
*/
export const DtoUpdateNodePoolRequestRoleEnum = {
master: "master",
worker: "worker",
} as const;
export type DtoUpdateNodePoolRequestRoleEnum =
(typeof DtoUpdateNodePoolRequestRoleEnum)[keyof typeof DtoUpdateNodePoolRequestRoleEnum];
/**
* Check if a given object implements the DtoUpdateNodePoolRequest interface.
*/
export function instanceOfDtoUpdateNodePoolRequest(
value: object,
): value is DtoUpdateNodePoolRequest {
return true;
}
export function DtoUpdateNodePoolRequestFromJSON(
json: any,
): DtoUpdateNodePoolRequest {
return DtoUpdateNodePoolRequestFromJSONTyped(json, false);
}
export function DtoUpdateNodePoolRequestFromJSONTyped(
json: any,
ignoreDiscriminator: boolean,
): DtoUpdateNodePoolRequest {
if (json == null) {
return json;
}
return {
name: json["name"] == null ? undefined : json["name"],
role: json["role"] == null ? undefined : json["role"],
};
}
export function DtoUpdateNodePoolRequestToJSON(
json: any,
): DtoUpdateNodePoolRequest {
return DtoUpdateNodePoolRequestToJSONTyped(json, false);
}
export function DtoUpdateNodePoolRequestToJSONTyped(
value?: DtoUpdateNodePoolRequest | null,
ignoreDiscriminator: boolean = false,
): any {
if (value == null) {
return value;
}
return {
name: value["name"],
role: value["role"],
};
}

View File

@@ -12,7 +12,6 @@
* Do not edit the class manually.
*/
import { mapValues } from "../runtime";
/**
*
* @export
@@ -42,7 +41,7 @@ export interface DtoUpdateServerRequest {
* @type {string}
* @memberof DtoUpdateServerRequest
*/
role?: string;
role?: DtoUpdateServerRequestRoleEnum;
/**
*
* @type {string}
@@ -60,9 +59,32 @@ export interface DtoUpdateServerRequest {
* @type {string}
* @memberof DtoUpdateServerRequest
*/
status?: string;
status?: DtoUpdateServerRequestStatusEnum;
}
/**
* @export
*/
export const DtoUpdateServerRequestRoleEnum = {
master: "master",
worker: "worker",
bastion: "bastion",
} as const;
export type DtoUpdateServerRequestRoleEnum =
(typeof DtoUpdateServerRequestRoleEnum)[keyof typeof DtoUpdateServerRequestRoleEnum];
/**
* @export
*/
export const DtoUpdateServerRequestStatusEnum = {
pending: "pending",
provisioning: "provisioning",
ready: "ready",
failed: "failed",
} as const;
export type DtoUpdateServerRequestStatusEnum =
(typeof DtoUpdateServerRequestStatusEnum)[keyof typeof DtoUpdateServerRequestStatusEnum];
/**
* Check if a given object implements the DtoUpdateServerRequest interface.
*/

View File

@@ -1,9 +1,14 @@
/* tslint:disable */
/* eslint-disable */
export * from "./DtoAnnotationResponse";
export * from "./DtoAttachAnnotationsRequest";
export * from "./DtoAttachLabelsRequest";
export * from "./DtoAttachServersRequest";
export * from "./DtoAttachTaintsRequest";
export * from "./DtoAuthStartResponse";
export * from "./DtoCreateAnnotationRequest";
export * from "./DtoCreateLabelRequest";
export * from "./DtoCreateNodePoolRequest";
export * from "./DtoCreateSSHRequest";
export * from "./DtoCreateServerRequest";
export * from "./DtoCreateTaintRequest";
@@ -13,6 +18,7 @@ export * from "./DtoJob";
export * from "./DtoJobStatus";
export * from "./DtoLabelResponse";
export * from "./DtoLogoutRequest";
export * from "./DtoNodePoolResponse";
export * from "./DtoPageJob";
export * from "./DtoQueueInfo";
export * from "./DtoRefreshRequest";
@@ -23,6 +29,7 @@ export * from "./DtoTaintResponse";
export * from "./DtoTokenPair";
export * from "./DtoUpdateAnnotationRequest";
export * from "./DtoUpdateLabelRequest";
export * from "./DtoUpdateNodePoolRequest";
export * from "./DtoUpdateServerRequest";
export * from "./DtoUpdateTaintRequest";
export * from "./HandlersCreateUserKeyRequest";

View File

@@ -12,7 +12,7 @@
* Do not edit the class manually.
*/
export const BASE_PATH = "http://localhost:8080/api/v1".replace(/\/+$/, "");
export const BASE_PATH = "/api/v1".replace(/\/+$/, "");
export interface ConfigurationParameters {
basePath?: string; // override base path

View File

@@ -1,6 +1,6 @@
module github.com/glueops/terraform-provider-gsot
go 1.25.3
go 1.25.4
require (
github.com/glueops/autoglue-sdk-go v0.0.0-20251106000315-3969abd74adf

View File

@@ -37,9 +37,9 @@ module "servers" {
bastion = {
hostname = "bastion-01"
private_ip_address = "10.0.0.10"
public_ip_address = "54.12.34.56" # required for role=bastion
public_ip_address = "65.109.95.175" # required for role=bastion
role = "bastion"
ssh_user = "ubuntu"
ssh_user = "root"
ssh_key_ref = "bastionKey" # points to module.ssh["bastionKey"].id
status = "pending"
}
@@ -47,7 +47,7 @@ module "servers" {
manager1 = {
hostname = "k3s-mgr-01"
private_ip_address = "10.0.1.11"
role = "manager"
role = "master"
ssh_user = "ubuntu"
ssh_key_ref = "clusterKey"
status = "pending"
@@ -56,7 +56,7 @@ module "servers" {
agent1 = {
hostname = "k3s-agent-01"
private_ip_address = "10.0.2.21"
role = "agent"
role = "worker"
ssh_user = "ubuntu"
ssh_key_ref = "clusterKey"
status = "pending"

View File

@@ -13,44 +13,44 @@
"@hookform/resolvers": "^5.2.2",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-alert-dialog": "^1.1.15",
"@radix-ui/react-aspect-ratio": "^1.1.7",
"@radix-ui/react-avatar": "^1.1.10",
"@radix-ui/react-aspect-ratio": "^1.1.8",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-collapsible": "^1.1.12",
"@radix-ui/react-context-menu": "^2.2.16",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-hover-card": "^1.1.15",
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-menubar": "^1.1.16",
"@radix-ui/react-navigation-menu": "^1.2.14",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-radio-group": "^1.3.8",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slider": "^1.3.6",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-toggle": "^1.1.10",
"@radix-ui/react-toggle-group": "^1.1.11",
"@radix-ui/react-tooltip": "^1.2.8",
"@tailwindcss/vite": "^4.1.16",
"@tanstack/react-query": "^5.90.5",
"@tanstack/react-query": "^5.90.7",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^4.1.0",
"embla-carousel-react": "^8.6.0",
"input-otp": "^1.4.2",
"lucide-react": "^0.548.0",
"lucide-react": "^0.552.0",
"next-themes": "^0.4.6",
"react": "^19.2.0",
"react-day-picker": "^9.11.1",
"react-dom": "^19.2.0",
"react-hook-form": "^7.65.0",
"react-hook-form": "^7.66.0",
"react-icons": "^5.5.0",
"react-resizable-panels": "^3.0.6",
"react-router-dom": "^7.9.5",
@@ -62,24 +62,24 @@
"zod": "^4.1.12"
},
"devDependencies": {
"@eslint/js": "9.38.0",
"@eslint/js": "9.39.1",
"@ianvs/prettier-plugin-sort-imports": "4.7.0",
"@types/node": "24.9.2",
"@types/node": "24.10.0",
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"@vitejs/plugin-react": "5.1.0",
"eslint": "9.38.0",
"eslint": "9.39.1",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-prettier": "5.5.4",
"eslint-plugin-react-hooks": "7.0.1",
"eslint-plugin-react-refresh": "0.4.24",
"globals": "16.4.0",
"globals": "16.5.0",
"prettier": "3.6.2",
"prettier-plugin-tailwindcss": "0.7.1",
"shadcn": "3.5.0",
"tw-animate-css": "1.4.0",
"typescript": "5.9.3",
"typescript-eslint": "8.46.2",
"vite": "7.1.12"
"typescript-eslint": "8.46.3",
"vite": "7.2.1"
}
}

View File

@@ -7,6 +7,7 @@ import { Login } from "@/pages/auth/login.tsx"
import { JobsPage } from "@/pages/jobs/jobs-page.tsx"
import { LabelsPage } from "@/pages/labels/labels-page.tsx"
import { MePage } from "@/pages/me/me-page.tsx"
import { NodePoolsPage } from "@/pages/nodepools/node-pools-page.tsx"
import { OrgApiKeys } from "@/pages/org/api-keys.tsx"
import { OrgMembers } from "@/pages/org/members.tsx"
import { OrgSettings } from "@/pages/org/settings.tsx"
@@ -31,6 +32,7 @@ export default function App() {
<Route path="/taints" element={<TaintsPage />} />
<Route path="/labels" element={<LabelsPage />} />
<Route path="/annotations" element={<AnnotationPage />} />
<Route path="/node-pools" element={<NodePoolsPage />} />
<Route path="/admin/jobs" element={<JobsPage />} />
</Route>

91
ui/src/api/node_pools.ts Normal file
View File

@@ -0,0 +1,91 @@
import { withRefresh } from "@/api/with-refresh.ts"
import type {
DtoAttachAnnotationsRequest,
DtoAttachLabelsRequest,
DtoAttachServersRequest,
DtoAttachTaintsRequest,
DtoCreateNodePoolRequest,
DtoUpdateNodePoolRequest,
} from "@/sdk"
import { makeNodePoolApi } from "@/sdkClient.ts"
const nodePools = makeNodePoolApi()
export const canAttachToPool = (poolRole: string | undefined, serverRole: string | undefined) => {
if (!poolRole) return true
return poolRole === serverRole
}
export const nodePoolsApi = {
listNodePools: () =>
withRefresh(async () => {
return await nodePools.listNodePools({})
}),
createNodePool: (body: DtoCreateNodePoolRequest) =>
withRefresh(async () => {
return await nodePools.createNodePool({ body })
}),
getNodePool: (id: string) =>
withRefresh(async () => {
return await nodePools.getNodePool({ id })
}),
deleteNodePool: (id: string) =>
withRefresh(async () => {
await nodePools.deleteNodePool({ id })
}),
updateNodePool: (id: string, body: DtoUpdateNodePoolRequest) =>
withRefresh(async () => {
return await nodePools.updateNodePool({ id, body })
}),
// Servers
listNodePoolServers: (id: string) =>
withRefresh(async () => {
return await nodePools.listNodePoolServers({ id })
}),
attachNodePoolServer: (id: string, body: DtoAttachServersRequest) =>
withRefresh(async () => {
return await nodePools.attachNodePoolServers({ id, body })
}),
detachNodePoolServers: (id: string, serverId: string) =>
withRefresh(async () => {
return await nodePools.detachNodePoolServer({ id, serverId })
}),
// Taints
listNodePoolTaints: (id: string) =>
withRefresh(async () => {
return await nodePools.listNodePoolTaints({ id })
}),
attachNodePoolTaints: (id: string, body: DtoAttachTaintsRequest) =>
withRefresh(async () => {
return await nodePools.attachNodePoolTaints({ id, body })
}),
detachNodePoolTaints: (id: string, taintId: string) =>
withRefresh(async () => {
return await nodePools.detachNodePoolTaint({ id, taintId })
}),
// Labels
listNodePoolLabels: (id: string) =>
withRefresh(async () => {
return await nodePools.listNodePoolLabels({ id })
}),
attachNodePoolLabels: (id: string, body: DtoAttachLabelsRequest) =>
withRefresh(async () => {
return await nodePools.attachNodePoolLabels({ id, body })
}),
detachNodePoolLabels: (id: string, labelId: string) =>
withRefresh(async () => {
return await nodePools.detachNodePoolLabel({ id, labelId })
}),
// Annotations
listNodePoolAnnotations: (id: string) =>
withRefresh(async () => {
return await nodePools.listNodePoolAnnotations({ id })
}),
attachNodePoolAnnotations: (id: string, body: DtoAttachAnnotationsRequest) =>
withRefresh(async () => {
return await nodePools.attachNodePoolAnnotations({ id, body })
}),
detachNodePoolAnnotations: (id: string, annotationId: string) =>
withRefresh(async () => {
return await nodePools.detachNodePoolAnnotation({ id, annotationId })
}),
}

View File

@@ -1,10 +1,29 @@
import { withRefresh } from "@/api/with-refresh.ts"
import { orgStore } from "@/auth/org.ts"
import { authStore } from "@/auth/store.ts"
import type { DtoCreateSSHRequest, DtoSshResponse, DtoSshRevealResponse } from "@/sdk"
import { makeSshApi } from "@/sdkClient.ts"
const ssh = makeSshApi()
export type SshDownloadPart = "public" | "private" | "both"
function authHeaders() {
const token = authStore.getAccessToken()
const orgId = orgStore.get()
return {
...(token ? { Authorization: `Bearer ${token}` } : {}),
...(orgId ? { "X-Org-ID": orgId } : {}),
}
}
async function authedFetch(input: RequestInfo | URL, init: RequestInit = {}) {
return fetch(input, {
...init,
headers: { ...(init.headers as any), ...authHeaders() },
credentials: "include", // keep if you rely on cookies/HttpOnly sessions
})
}
export const sshApi = {
listSshKeys: () =>
withRefresh(async (): Promise<DtoSshResponse[]> => {
@@ -42,7 +61,7 @@ export const sshApi = {
url.searchParams.set("part", part)
url.searchParams.set("mode", "json")
const res = await fetch(url.toString())
const res = await authedFetch(url.toString())
if (!res.ok) throw new Error(`Download failed: ${res.statusText}`)
return (await res.json()) as {
id: string
@@ -61,7 +80,7 @@ export const sshApi = {
const url = new URL(`/api/v1/ssh/${id}/download`, window.location.origin)
url.searchParams.set("part", part)
const res = await fetch(url.toString())
const res = await authedFetch(url.toString())
if (!res.ok) throw new Error(`Download failed: ${res.statusText}`)
// Parse filename from Content-Disposition

View File

@@ -378,8 +378,13 @@ export const MePage = () => {
<Input
type="number"
inputMode="numeric"
step={1}
min={1}
placeholder="e.g. 720"
{...field}
onChange={(e) =>
field.onChange(e.target.value === "" ? "" : Number(e.target.value))
}
/>
</FormControl>
<FormMessage />

Some files were not shown because too many files have changed in this diff Show More