db

package
v0.0.0-...-d67adc9 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeSqliteConstraintPrimaryKey = 1555
)

Variables

This section is empty.

Functions

func Connect

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

func IsPrimaryKeyConstraintErr

func IsPrimaryKeyConstraintErr(err error) bool

Types

type Event

type Event struct {
	ID        []byte `gorm:"column:id;type:blob(16);primarykey;not null"`
	Username  string `gorm:"column:username;type:varchar(256);not null;index:idx_events_username_timestamp"`
	Timestamp uint64 `gorm:"column:timestamp;type:integer(8);not null;index:idx_events_username_timestamp"`
	IP        uint32 `gorm:"column:ip;type:integer(4);not null"`
}

Jump to

Keyboard shortcuts

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