migration

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deployment

type Deployment struct {
	gorm.Model

	// User ID
	UID  int    `json:"uid"`
	UUID string `json:"uuid"`
	Name string `json:"name"`
	// Hosts List to Upgrade
	HostsList string `json:"hostsList"`
	// Host Groups List to Upgrade
	HostGroupsList string `json:"hostGroupsLists"`
	// Host Filter
	HostFilters string `json:"hostFilters"`
	// Host Group Filter
	HostGroupsFilters string `json:"hostGroupsFilters"`
	// dist-upgrade or upgrade
	UpgradeType string `json:"upgradeType"`
	// List of packages to upgrade
	PackagesToUpgrade string `json:"packagesToUpgrade"`
	// List of packages to exclude from upgrade
	PackagesToExclude string `json:"packagesToExclude"`
	// Pre Patch Script
	PrePatchScript string `json:"prePatchScript"`
	// Post Patch Script
	PostPatchScript string `json:"postPatchScript"`
	// Default (if reboot is needed) or Always or Never
	PostPatchRebootOption string `json:"postPatchRebootOption"`
	// PercentOfVms (25%) or NumberOfVms (4)
	RolloutOptions string `json:"rolloutOptions"`
	// Recurring or One Time
	ScheduleType string `json:"scheduleType"`
	// Time in the future
	ScheduleTime time.Time `json:"scheduleTime"`
	// Last Status
	Status string `json:"status"`
	Meta   string `json:"meta"`
	// Last Run At
	RunAt time.Time `json:"runAt"`
}

Deployment struct

func (*Deployment) ConvertToJSON

func (r *Deployment) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Deployment) LoadFromJSON

func (r *Deployment) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Host

type Host struct {
	gorm.Model

	// User ID
	UID int `json:"uid"`
	// Host Group ID
	HGID       int    `json:"hgid"`
	UUID       string `json:"uuid"`
	Name       string `json:"name"`
	HostName   string `json:"hostName"`
	PrivateIPs string `json:"privateIPs"`
	PublicIPs  string `json:"publicIPs"`
	Labels     string `json:"labels"`
	Status     string `json:"status"`
	Meta       string `json:"meta"`
	ReportedAt time.Time
}

Host struct

func (*Host) ConvertToJSON

func (r *Host) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Host) LoadFromJSON

func (r *Host) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type HostGroup

type HostGroup struct {
	gorm.Model

	// User ID
	UID    int    `json:"uid"`
	UUID   string `json:"uuid"`
	Name   string `json:"name"`
	ApiKey string `json:"apiKey"`
	Labels string `json:"labels"`
	Meta   string `json:"meta"`
}

HostGroup struct

func (*HostGroup) ConvertToJSON

func (r *HostGroup) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*HostGroup) LoadFromJSON

func (r *HostGroup) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Log

type Log struct {
	gorm.Model

	// User ID
	UID int `json:"uid"`
	// Host ID
	HID int `json:"hid"`
	// Host Group ID
	HGID int `json:"hgid"`
	// Deployment ID
	DID   int    `json:"did"`
	UUID  string `json:"uuid"`
	Value string `json:"value"`
	Meta  string `json:"meta"`
}

Log struct

func (*Log) ConvertToJSON

func (r *Log) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Log) LoadFromJSON

func (r *Log) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Option

type Option struct {
	gorm.Model

	UUID  string `json:"uuid"`
	Key   string `json:"key"`
	Value string `json:"value"`
}

Option struct

func (*Option) ConvertToJSON

func (r *Option) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Option) LoadFromJSON

func (r *Option) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Session

type Session struct {
	gorm.Model

	// User ID
	UID       int    `json:"uid"`
	HID       int    `json:"hid"`
	UUID      string `json:"uuid"`
	Value     string `json:"value"`
	Meta      string `json:"meta"`
	CanExpire string `json:"canExpire"`
	ExpiredAt time.Time
}

Session struct

func (*Session) ConvertToJSON

func (r *Session) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Session) LoadFromJSON

func (r *Session) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Task

type Task struct {
	gorm.Model

	// Deployment ID
	DID     int    `json:"did"`
	UUID    string `json:"uuid"`
	Payload string `json:"payload"`
	Result  string `json:"result"`
	Status  string `json:"status"`
	Meta    string `json:"meta"`
}

Task struct

func (*Task) ConvertToJSON

func (r *Task) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Task) LoadFromJSON

func (r *Task) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type User

type User struct {
	gorm.Model

	UUID         string `json:"uuid"`
	Name         string `json:"name"`
	Email        string `json:"email"`
	PasswordHash string `json:"passwordHash"`
	Status       string `json:"status"`
	Role         string `json:"role"`
	Meta         string `json:"meta"`
}

User struct

func (*User) ConvertToJSON

func (r *User) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*User) LoadFromJSON

func (r *User) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

Jump to

Keyboard shortcuts

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