entity

package
v0.1.25 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 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 Asset

type Asset struct {
	Name               string `json:"name"`
	BrowserDownloadURL string `json:"browser_download_url"`
	Size               int64  `json:"size"`
}

Asset represents a GitHub release asset.

type Command

type Command struct {
	Executable string
	Args       []string
}

func (*Command) String

func (c *Command) String() string

type Host

type Host struct {
	ID          uint64    `db:"id"          json:"ID"`
	Address     string    `db:"address"     json:"Address"`
	Description *string   `db:"description" json:"Description"`
	CreatedAt   Timestamp `db:"created_at"  json:"CreatedAt"`
}

func NewHost

func NewHost(address, description string) (*Host, error)

type ListHostFilter

type ListHostFilter struct {
	ID     []uint64 `json:"id,omitempty"`
	Search string   `json:"search,omitempty"`
}

type ListNetworkFilter

type ListNetworkFilter struct {
	ID     []uint64 `json:"id,omitempty"`
	Name   []string `json:"name,omitempty"`
	Search string   `json:"search,omitempty"`
}

type ListNetworkHostFilter

type ListNetworkHostFilter struct {
	ID        []uint64 `json:"id,omitempty"`
	NetworkID []uint64 `json:"network_id,omitempty"`
	Address   []string `json:"address,omitempty"`
	Search    string   `json:"search,omitempty"`
}

type Network

type Network struct {
	ID        uint64    `db:"id"         json:"ID"`
	Name      string    `db:"name"       json:"Name"`
	CreatedAt Timestamp `db:"created_at" json:"CreatedAt"`
}

type NetworkHost

type NetworkHost struct {
	ID          uint64    `db:"id"          json:"ID"`
	NetworkID   uint64    `db:"network_id"  json:"NetworkID"`
	Address     string    `db:"address"     json:"Address"`
	Description *string   `db:"description" json:"Description"`
	CreatedAt   Timestamp `db:"created_at"  json:"CreatedAt"`
}

func NewNetworkHost

func NewNetworkHost(networkID uint64, address, description string) (*NetworkHost, error)

type NetworkHostContextExportPayload

type NetworkHostContextExportPayload struct {
	ExportDate time.Time        `json:"export_date"`
	Hosts      []NetworkHostDTO `json:"hosts"`
}

NetworkHostContextExportPayload represents the structure for exporting network hosts from a specific network context where network ID is already known.

type NetworkHostDTO

type NetworkHostDTO struct {
	Address     string `json:"address"`
	Description string `json:"description,omitempty"`
}

NetworkHostDTO represents a network host without internal IDs for export/import.

type NetworkHostExportPayload

type NetworkHostExportPayload struct {
	ExportDate time.Time        `json:"export_date"`
	NetworkID  uint64           `json:"network_id"`
	Hosts      []NetworkHostDTO `json:"hosts"`
}

NetworkHostExportPayload represents the structure for exporting/importing network hosts Used for system-wide exports that may include network ID context.

type NetworkHostSetup

type NetworkHostSetup struct {
	ID            uint64    `db:"id"              json:"ID"`
	NetworkHostID uint64    `db:"network_host_id" json:"NetworkHostID"`
	NetworkHostIP string    `db:"network_host_ip" json:"NetworkHostIP"`
	SubnetMask    string    `db:"subnet_mask"     json:"SubnetMask"`
	Router        string    `db:"router"          json:"Router"`
	CreatedAt     Timestamp `db:"created_at"      json:"CreatedAt"`
}

type NetworkInfo

type NetworkInfo struct {
	SubnetMask string
	Router     string
}

func (*NetworkInfo) String

func (n *NetworkInfo) String() string

type NetworkInterface

type NetworkInterface string

type NetworkService

type NetworkService string

type NetworkWithStatus

type NetworkWithStatus struct {
	Network

	IsActive bool `json:"IsActive"`
}

type Release

type Release struct {
	TagName     string    `json:"tag_name"`
	Name        string    `json:"name"`
	Body        string    `json:"body"`
	Draft       bool      `json:"draft"`
	Prerelease  bool      `json:"prerelease"`
	PublishedAt time.Time `json:"published_at"`
	Assets      []Asset   `json:"assets"`
	HTMLURL     string    `json:"html_url"`
}

Release represents a GitHub release.

type Timestamp

type Timestamp struct {
	time.Time
}

Timestamp is a custom time type that handles JSON marshaling properly for Wails.

func NewTimestamp

func NewTimestamp() Timestamp

NewTimestamp creates a new Timestamp with the current time.

func TimestampFromTime

func TimestampFromTime(t time.Time) Timestamp

TimestampFromTime creates a Timestamp from a time.Time.

func (*Timestamp) MarshalJSON

func (t *Timestamp) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler interface.

func (*Timestamp) Scan

func (t *Timestamp) Scan(value any) error

Scan implements the sql.Scanner interface for database reads.

func (*Timestamp) String

func (t *Timestamp) String() string

String returns the time formatted as RFC3339.

func (*Timestamp) UnmarshalJSON

func (t *Timestamp) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler interface.

func (*Timestamp) Value

func (t *Timestamp) Value() (driver.Value, error)

Value implements the driver.Valuer interface for database writes.

type UpdateInfo

type UpdateInfo struct {
	Available           bool   `json:"available"`
	CurrentVersion      string `json:"current_version"`
	LatestVersion       string `json:"latest_version"`
	ReleaseNotes        string `json:"release_notes"`
	DownloadURL         string `json:"download_url"`
	ReleasePageURL      string `json:"release_page_url"`
	PublishedAtAsString string `json:"published_at"`
	HomebrewCommand     string `json:"homebrew_command"`
}

UpdateInfo represents update information.

type VPNService

type VPNService string

Jump to

Keyboard shortcuts

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