model

package
v1.0.56 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupData

type BackupData struct {
	BaseModel
	ServerID int64 `gorm:"column:ip;size:128;"`
}

func (*BackupData) TableName

func (s *BackupData) TableName() string

type BaseModel

type BaseModel struct {
	ID          int64          `gorm:"column:id;type:bigint(20);is not null;primarykey;"`
	CreatedBy   int64          `gorm:"column:created_by;type:bigint(20);"`
	CreatedAt   ztime.Time     `gorm:"column:created_at;type:datetime;"`
	UpdatedBy   int64          `gorm:"column:updated_by;type:bigint(20);"`
	UpdatedAt   ztime.Time     `gorm:"column:updated_at;type:datetime;"`
	DeletedBy   int64          `gorm:"column:deleted_by;type:bigint(20);"`
	DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at;type:datetime;"`
	LogComments string         `gorm:"column:log_comments;type:varchar(255);"`
}

func (*BaseModel) New

func (b *BaseModel) New()

type ComponentBinds

type ComponentBinds struct {
	//list       []string //服务Code列表 这里标识已经安装的服务列表
	Components map[string][]*component.ComponentParameters `json:"components"`
}

func (*ComponentBinds) Add

func (c *ComponentBinds) Add(code string, parameters []*component.ComponentParameters)

func (ComponentBinds) GormValue

func (m ComponentBinds) GormValue(ctx context.Context, db *gorm.DB) clause.Expr

func (*ComponentBinds) Has

func (m *ComponentBinds) Has(code string) bool

func (*ComponentBinds) Marshal

func (m *ComponentBinds) Marshal() ([]byte, error)

func (*ComponentBinds) Remove

func (c *ComponentBinds) Remove(code string)

func (*ComponentBinds) Scan

func (m *ComponentBinds) Scan(v interface{}) error

func (*ComponentBinds) UnMarshal

func (m *ComponentBinds) UnMarshal(value []byte) error

func (ComponentBinds) Value

func (m ComponentBinds) Value() (driver.Value, error)

type Parameters

type Parameters struct {
	Paras []*component.ComponentParameters
}

func (*Parameters) Scan

func (m *Parameters) Scan(v interface{}) error

func (Parameters) Value

func (m Parameters) Value() (driver.Value, error)

type Server

type Server struct {
	BaseModel
	IP                   string                    `gorm:"column:ip;size:128;"`
	Port                 int                       `gorm:"column:port;type:int"`
	Desc                 string                    `gorm:"column:desc;size:128;"`
	UserName             string                    `gorm:"column:user_name;size:128;"`
	Password             string                    `gorm:"column:password;size:128;"`
	SystemComponentBinds ComponentBinds            `gorm:"column:component_binds;type:text;"`
	ProductCode          string                    `gorm:"column:product_code;type:text"`
	ProductDepend        *component.ProductDepends `gorm:"column:product_depend;type:text"`
}

func (*Server) SSHConnect

func (s *Server) SSHConnect() (*ssh.SSHClient, error)

func (*Server) TableName

func (s *Server) TableName() string

type ServerServiceBind

type ServerServiceBind struct {
	BaseModel
	ServiceCode  string              `gorm:"column:service_code;size:50;"`
	HasInstalled models.EnableStatus `gorm:"column:hasInstalled;size:2;"`
	HasInit      models.EnableStatus `gorm:"column:hasInit;size:2"`
	VersionID    int64               `gorm:"column:version_id;size:20;"`
	Parameters   *Parameters         `gorm:"column:服务参数;type:text"`
	ServerID     int64               `gorm:"column:server_id;size:20;"`
	Server       *Server             `gorm:"foreignkey:ServerID;"`
}

func (*ServerServiceBind) TableName

func (s *ServerServiceBind) TableName() string

type ServiceVersion

type ServiceVersion struct {
	BaseModel
	ServerID    int64  `gorm:"column:server_id;size:20;"`
	ServiceID   int64  `gorm:"column:service_id;size:20;"`
	ServiceCode string `gorm:"column:service_code;size:50;"`
	Version     string `gorm:"column:version;size:32;"`
	Path        string `gorm:"column:path;size:128;"`
}

func (*ServiceVersion) TableName

func (s *ServiceVersion) TableName() string

Jump to

Keyboard shortcuts

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