database

package
v0.0.0-...-d3191e8 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHost

func AddHost(db *gorm.DB, name string, ip string)

func Connect

func Connect(file string) *gorm.DB

Types

type Host

type Host struct {
	ID   uint   `gorm:"primaryKey;autoIncrementIncrement:true"`
	Name string `gorm:"uniqueIndex"`
	IP   string `gorm:"unique"`
}

func DeleteHost

func DeleteHost(db *gorm.DB, name string) []Host

func GetHosts

func GetHosts(db *gorm.DB) []Host

Jump to

Keyboard shortcuts

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