model

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: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSN

type DSN struct {
	Driver   string `json:"driver"`
	Username string `json:"username"`
	Password string `json:"password"`
	Hostname string `json:"hostname"`
	Port     int    `json:"port"`
	Name     string `json:"name"`
}

DSN struct

func (*DSN) ConvertToJSON

func (d *DSN) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*DSN) LoadFromJSON

func (d *DSN) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

func (*DSN) ToString

func (d *DSN) ToString() string

ToString gets the dsn string

type Deployment

type Deployment struct {
	ID                    int       `json:"id"`
	UID                   int       `json:"uid"`
	UUID                  string    `json:"uuid"`
	Name                  string    `json:"name"`
	HostsList             string    `json:"hostsList"`
	HostGroupsList        string    `json:"hostGroupsList"`
	HostFilters           string    `json:"hostFilters"`
	HostGroupsFilters     string    `json:"hostGroupsFilters"`
	UpgradeType           string    `json:"upgradeType"`
	PackagesToUpgrade     string    `json:"packageToUpgrade"`
	PackagesToExclude     string    `json:"packagesToExclude"`
	PrePatchScript        string    `json:"prePatchScript"`
	PostPatchScript       string    `json:"postPatchScript"`
	PostPatchRebootOption string    `json:"postPatchRebootOption"`
	RolloutOptions        string    `json:"rolloutOptions"`
	ScheduleType          string    `json:"scheduleType"`
	ScheduleTime          time.Time `json:"scheduleTime"`
	Meta                  string    `json:"meta"`
	Status                string    `json:"status"`
	RunAt                 time.Time `json:"runAt"`
	CreatedAt             time.Time `json:"createdAt"`
	UpdatedAt             time.Time `json:"updatedAt"`
}

Deployment struct

func (*Deployment) ConvertToJSON

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

ConvertToJSON convert object to json

func (*Deployment) IsNil

func (d *Deployment) IsNil() bool

IsNil if option is nil

func (*Deployment) LoadFromJSON

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

LoadFromJSON update object from json

type Deployments

type Deployments struct {
	Deployments []Deployment `json:"deployments"`
}

Deployments struct

func (*Deployments) ConvertToJSON

func (d *Deployments) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Deployments) LoadFromJSON

func (d *Deployments) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Host

type Host struct {
	ID         int       `json:"id"`
	UID        int       `json:"uid"`
	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 `json:"reportedAt"`
	CreatedAt  time.Time `json:"createdAt"`
	UpdatedAt  time.Time `json:"updatedAt"`
}

Host struct

func (*Host) ConvertToJSON

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

ConvertToJSON convert object to json

func (*Host) IsNil

func (h *Host) IsNil() bool

IsNil if option is nil

func (*Host) LoadFromJSON

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

LoadFromJSON update object from json

type HostGroup

type HostGroup struct {
	ID        int       `json:"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"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

HostGroup struct

func (*HostGroup) ConvertToJSON

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

ConvertToJSON convert object to json

func (*HostGroup) IsNil

func (h *HostGroup) IsNil() bool

IsNil if option is nil

func (*HostGroup) LoadFromJSON

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

LoadFromJSON update object from json

type HostGroups

type HostGroups struct {
	HostGroups []HostGroup `json:"hostGroups"`
}

HostGroups struct

func (*HostGroups) ConvertToJSON

func (h *HostGroups) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*HostGroups) LoadFromJSON

func (h *HostGroups) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Hosts

type Hosts struct {
	Hosts []Host `json:"hosts"`
}

Hosts struct

func (*Hosts) ConvertToJSON

func (h *Hosts) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Hosts) LoadFromJSON

func (h *Hosts) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Log

type Log struct {
	ID        int       `json:"id"`
	UID       int       `json:"uid"`
	HID       int       `json:"hid"`
	HGID      int       `json:"hgid"`
	DID       int       `json:"did"`
	UUID      string    `json:"uuid"`
	Value     string    `json:"value"`
	Meta      string    `json:"meta"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Log struct

func (*Log) ConvertToJSON

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

ConvertToJSON convert object to json

func (*Log) IsNil

func (l *Log) IsNil() bool

IsNil if option is nil

func (*Log) LoadFromJSON

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

LoadFromJSON update object from json

type Logs

type Logs struct {
	Logs []Log `json:"logs"`
}

Logs struct

func (*Logs) ConvertToJSON

func (l *Logs) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Logs) LoadFromJSON

func (l *Logs) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Option

type Option struct {
	ID        int       `json:"id"`
	UUID      string    `json:"uuid"`
	Key       string    `json:"key"`
	Value     string    `json:"value"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Option struct

func (*Option) ConvertToJSON

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

ConvertToJSON convert object to json

func (*Option) IsNil

func (o *Option) IsNil() bool

IsNil if option is nil

func (*Option) LoadFromJSON

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

LoadFromJSON update object from json

type Options

type Options struct {
	Options []Option `json:"options"`
}

Options struct

func (*Options) ConvertToJSON

func (o *Options) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Options) LoadFromJSON

func (o *Options) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Session

type Session struct {
	ID        int       `json:"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 `json:"expiredAt"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Session struct

func (*Session) ConvertToJSON

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

ConvertToJSON convert object to json

func (*Session) IsNil

func (s *Session) IsNil() bool

IsNil if option is nil

func (*Session) LoadFromJSON

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

LoadFromJSON update object from json

type Sessions

type Sessions struct {
	Sessions []Session `json:"sessions"`
}

Sessions struct

func (*Sessions) ConvertToJSON

func (s *Sessions) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Sessions) LoadFromJSON

func (s *Sessions) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type Task

type Task struct {
	ID        int       `json:"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"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

Task struct

func (*Task) ConvertToJSON

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

ConvertToJSON convert object to json

func (*Task) IsNil

func (t *Task) IsNil() bool

IsNil if option is nil

func (*Task) LoadFromJSON

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

LoadFromJSON update object from json

type Tasks

type Tasks struct {
	Tasks []Task `json:"tasks"`
}

Tasks struct

func (*Tasks) ConvertToJSON

func (t *Tasks) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Tasks) LoadFromJSON

func (t *Tasks) LoadFromJSON(data []byte) error

LoadFromJSON update object from json

type User

type User struct {
	ID           int       `json:"id"`
	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"`
	CreatedAt    time.Time `json:"createdAt"`
	UpdatedAt    time.Time `json:"updatedAt"`
}

User struct

func (*User) ConvertToJSON

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

ConvertToJSON convert object to json

func (*User) IsNil

func (u *User) IsNil() bool

IsNil if option is nil

func (*User) LoadFromJSON

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

LoadFromJSON update object from json

type Users

type Users struct {
	Users []User `json:"users"`
}

Users struct

func (*Users) ConvertToJSON

func (u *Users) ConvertToJSON() (string, error)

ConvertToJSON convert object to json

func (*Users) LoadFromJSON

func (u *Users) 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