db

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: BSD-2-Clause, MIT, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func ConnectDatabase

func ConnectDatabase()

Types

type Certificate

type Certificate struct {
	gorm.Model
	Name        string `form:"name" json:"name" binding:"required"`
	Description string `form:"description" json:"description" binding:"required"`
}

type KeyValuePair

type KeyValuePair struct {
	gorm.Model
	Key   string `json:"key"`
	Value string `json:"value"`
	Extra string `json:"extra"`
}

type Log

type Log struct {
	gorm.Model
	Time        time.Time `json:"time"`
	Source      string    `json:"source"`
	Category    string    `json:"category"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
}

type NetCapture

type NetCapture struct {
	gorm.Model
	Time       time.Time `json:"time"`
	Type       string    `json:"type"`
	FromIP     string    `json:"fromip"`
	ToHost     string    `json:"tohost"`
	Method     string    `json:"method"`
	URL        string    `json:"url"`
	RequestURI string    `json:"requesturi"`
	Headers    string    `json:"headers"`
	Query      string    `json:"query"`
	Data       string    `json:"data"`
}

type User

type User struct {
	gorm.Model
	UserName string `form:"email" json:"email" binding:"required"`
	Password string `form:"password" json:"password"`
	FullName string `form:"fullname" json:"fullname" binding:"required"`
}

User

type UserCredentials

type UserCredentials struct {
	UserName string `form:"email" json:"email" binding:"required"`
	Password string `form:"password" json:"password" binding:"required"`
}

type UserData

type UserData struct {
	ID       uint   `form:"id" json:"ID" binding:"required" gorm:"primary_key"`
	UserName string `form:"email" json:"email" binding:"required"`
	FullName string `form:"fullname" json:"fullname" binding:"required"`
}

type UserPasswordUpdate

type UserPasswordUpdate struct {
	ID       uint   `form:"id" json:"ID" binding:"required" gorm:"primary_key"`
	Password string `form:"password" json:"password" binding:"required"`
}

Jump to

Keyboard shortcuts

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