Initial commit

This commit is contained in:
2024-01-17 18:05:55 +01:00
commit b58430af9a
25 changed files with 1930 additions and 0 deletions

14
models/hostname.go Normal file
View File

@ -0,0 +1,14 @@
package models
import "time"
// Hostname Model
// @Description Model of the Hostname as it
// @Description is represented in the database
type Hostname struct {
ID int `json:"id"` // Internal ID of the Hostname within the database
Category string `json:"category"` // Category / Rule that was used when generating the hostname
Hostname string `json:"hostname"` // Generated hostname
Parameters map[string]interface{} `json:"parameters"` // Parameter object of rule specific attributes
CreatedAt time.Time `json:"created_at"` // Creation Time of the entry
}

9
models/login.go Normal file
View File

@ -0,0 +1,9 @@
package models
// User Credentials Model
// @Description User account information used in the login process
// @Description with Username and password
type LoginCredentials struct {
Username string `json:"username"`
Password string `json:"password"`
}

10
models/user.go Normal file
View File

@ -0,0 +1,10 @@
package models
// User Model
// @Description User account information
// @Description with user id and username
type User struct {
ID int // Database ID for the User
Username string // Username
Password string // hashed password
}