models

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTag added in v1.1.4

type DBTag struct {
	ID        uint           `json:"-" gorm:"primaryKey" yaml:"-"`
	CreatedAt time.Time      `json:"-" yaml:"-"`
	UpdatedAt time.Time      `json:"-" yaml:"-"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index" yaml:"-"`
	SiteID    uint           `json:"-" yaml:"-"`
	Value     string         `json:"value" yaml:"value"`
}

type Healthcheck

type Healthcheck struct {
	Status string            `json:"status"`
	Errors HealthcheckErrors `json:"errors"`
}

type HealthcheckErrors

type HealthcheckErrors struct {
	Database string `json:"database"`
}
type Link struct {
	ID        uint           `json:"-" gorm:"primaryKey" yaml:"-"`
	CreatedAt time.Time      `json:"-" yaml:"-"`
	UpdatedAt time.Time      `json:"-" yaml:"-"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index" yaml:"-"`
	NetworkID uint           `json:"-" yaml:"-"`
	Name      string         `json:"name" yaml:"name"`
	URI       string         `json:"uri" yaml:"uri"`
}

type Network

type Network struct {
	ID        uint           `json:"-" gorm:"primaryKey" yaml:"-"`
	CreatedAt time.Time      `json:"-" yaml:"-"`
	UpdatedAt time.Time      `json:"-" yaml:"-"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index" yaml:"-"`
	Network   string         `json:"network" yaml:"network"`
	Links     []Link         `json:"links" gorm:"foreignkey:NetworkID" yaml:"links"`
	Sites     []Site         `json:"sites" gorm:"foreignkey:NetworkID" yaml:"sites"`
}

type NetworkID

type NetworkID struct {
	ID uint `json:"id" yaml:"-"`
}

type Site

type Site struct {
	ID             uint           `json:"-" gorm:"primaryKey" yaml:"-"`
	CreatedAt      time.Time      `json:"-" yaml:"-"`
	UpdatedAt      time.Time      `json:"-" yaml:"-"`
	DeletedAt      gorm.DeletedAt `json:"-" gorm:"index" yaml:"-"`
	NetworkID      uint           `json:"-" yaml:"-"`
	Name           string         `json:"name" yaml:"name"`
	URI            string         `json:"uri" yaml:"uri"`
	Icon           string         `json:"icon" yaml:"icon"`
	IsSupportedApp bool           `json:"isSupportedApp" yaml:"isSupportedApp"`
	DBTags         []DBTag        `json:"-" gorm:"foreignkey:SiteID" yaml:"-"`
	Tags           []string       `json:"tags" gorm:"-" yaml:"tags"`
	IP             string         `json:"ip" gorm:"-" yaml:"-"`
	IsUp           bool           `json:"isUp" gorm:"-" yaml:"-"`
}

type Status

type Status struct {
	Name string `json:"name"`
	IsUp bool   `json:"isUp"`
	IP   string `json:"ip"`
}

func NewStatus

func NewStatus(timeout int, s *Site) Status

Jump to

Keyboard shortcuts

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