db

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(dsn string) (*gorm.DB, error)

Connect opens a connection to the database and runs migrations

Types

type Rule

type Rule struct {
	ID string `gorm:"primaryKey,type:uuid;default:uuid_generate_v4()" json:"id"`

	Name      string `json:"name"`
	Filter    string `json:"filter"`
	ExpireStr string `json:"expire" gorm:"-"`

	Expire    time.Duration `json:"-"`
	CreatedAt time.Time     `json:"created"`
}

Rule represents a filter rule

Jump to

Keyboard shortcuts

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