models

package
v0.0.0-...-ae86d3b Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	gorm.Model
	ID            uint         `json:"id" gorm:"primaryKey"`
	ProjectID     uint         `json:"project_id"`
	Project       *Project     `json:"project"`
	ClientID      uint         `json:"client_id"`
	Client        *Client      `json:"client"`
	OwnerEmail    string       `json:"owner_email"`
	RuntimeID     int          `json:"runtime_id"`
	Runtime       *Runtime     `json:"runtime"`
	DatabaseID    int          `json:"database_id"`
	Database      *Dbtype      `json:"database"`
	EnvironmentID int          `json:"environment_id"`
	Environment   *Environment `json:"environment"`
}

Application is the model of the application table.

type Client

type Client struct {
	gorm.Model
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name" gorm:"unique"`
}

Client is the model of the client table.

type Dbtype

type Dbtype struct {
	gorm.Model
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name" gorm:"unique"`
}

Dbtype is the model of the dbtype table.

type Environment

type Environment struct {
	gorm.Model
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name" gorm:"unique"`
	Host []Host `gorm:"foreignKey:EnvironmentID"`
}

Environment is the model of the environment table.

type Host

type Host struct {
	gorm.Model
	ID            uint         `json:"id" gorm:"primaryKey"`
	Name          string       `json:"name"`                                                     // host name
	IP            string       `json:"ip" gorm:"uniqueIndex:host_environment_index;size:256"`    // host ip or domain
	EnvironmentID uint         `json:"environment_id" gorm:"uniqueIndex:host_environment_index"` // environment id
	Environment   *Environment `gorm:"foreignKey:EnvironmentID"`
	SSHUser       string       `json:"ssh_user"` // ssh user
	SSHPort       int          `json:"ssh_port"` // ssh port
	SSHKey        string       `json:"ssh_key"`  // ssh key
}

Host is the model of the host table.

type Project

type Project struct {
	gorm.Model
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name" gorm:"unique"`
}

Project is the model of the project table.

type Runtime

type Runtime struct {
	gorm.Model
	ID   uint   `json:"id" gorm:"primaryKey"`
	Name string `json:"name" gorm:"unique"`
}

Runtime is the model of the runtime table.

Jump to

Keyboard shortcuts

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