repo

package
v0.0.0-...-72e33f6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	UserID    int64
	CreatedAt types.Time
}

type DB

type DB struct {
	SQLite
	*Queries
}

func NewDB

func NewDB(sqlite SQLite) DB

func (DB) BeginTx

func (db DB) BeginTx(ctx context.Context, write bool) (DBTx, error)

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DBTx

type DBTx struct {
	SQLiteTx
	*Queries
}

type DahuaAferoFile

type DahuaAferoFile struct {
	ID                int64
	FileID            sql.NullInt64
	ThumbnailID       sql.NullInt64
	EmailAttachmentID sql.NullInt64
	Name              string
	Ready             bool
	Size              int64
	CreatedAt         types.Time
}

type DahuaDevice

type DahuaDevice struct {
	ID         int64
	Name       string
	Ip         string
	Url        types.URL
	Username   string
	Password   string
	Location   types.Location
	Feature    models.DahuaFeature
	Email      sql.NullString
	CreatedAt  types.Time
	UpdatedAt  types.Time
	DisabledAt types.NullTime
}

type DahuaEmailAttachment

type DahuaEmailAttachment struct {
	ID        int64
	MessageID int64
	FileName  string
}

type DahuaEmailMessage

type DahuaEmailMessage struct {
	ID                int64
	DeviceID          int64
	Date              types.Time
	From              string
	To                types.StringSlice
	Subject           string
	Text              string
	AlarmEvent        string
	AlarmInputChannel int64
	AlarmName         string
	CreatedAt         types.Time
}

type DahuaEvent

type DahuaEvent struct {
	ID        int64
	DeviceID  int64
	Code      string
	Action    string
	Index     int64
	Data      types.JSON
	CreatedAt types.Time
}

type DahuaEventDeviceRule

type DahuaEventDeviceRule struct {
	DeviceID   int64
	Code       string
	IgnoreDb   bool
	IgnoreLive bool
	IgnoreMqtt bool
}

type DahuaEventRule

type DahuaEventRule struct {
	ID         int64
	Code       string
	IgnoreDb   bool
	IgnoreLive bool
	IgnoreMqtt bool
}

type DahuaFile

type DahuaFile struct {
	ID          int64
	DeviceID    int64
	Channel     int64
	StartTime   types.Time
	EndTime     types.Time
	Length      int64
	Type        string
	FilePath    string
	Duration    int64
	Disk        int64
	VideoStream string
	Flags       types.StringSlice
	Events      types.StringSlice
	Cluster     int64
	Partition   int64
	PicIndex    int64
	Repeat      int64
	WorkDir     string
	WorkDirSn   bool
	Storage     models.Storage
	Source      models.DahuaFileSource
	UpdatedAt   types.Time
}

type DahuaFileCursor

type DahuaFileCursor struct {
	DeviceID     int64
	QuickCursor  types.Time
	FullCursor   types.Time
	FullEpoch    types.Time
	FullComplete bool
	Scanning     bool
	ScanPercent  float64
	ScanType     models.DahuaScanType
}

type DahuaPermission

type DahuaPermission struct {
	UserID   sql.NullInt64
	GroupID  sql.NullInt64
	DeviceID int64
	Level    models.DahuaPermissionLevel
}

type DahuaSeed

type DahuaSeed struct {
	Seed     int64
	DeviceID sql.NullInt64
}

type DahuaStorageDestination

type DahuaStorageDestination struct {
	ID              int64
	Name            string
	Storage         models.Storage
	ServerAddress   string
	Port            int64
	Username        string
	Password        string
	RemoteDirectory string
}

type DahuaStream

type DahuaStream struct {
	ID           int64
	Internal     bool
	DeviceID     int64
	Channel      int64
	Subtype      int64
	Name         string
	MediamtxPath string
}

type DahuaThumbnail

type DahuaThumbnail struct {
	ID                int64
	FileID            sql.NullInt64
	EmailAttachmentID sql.NullInt64
	Width             int64
	Height            int64
}

type DahuaWorkerEvent

type DahuaWorkerEvent struct {
	ID        int64
	DeviceID  int64
	Type      models.DahuaWorkerType
	State     models.DahuaWorkerState
	Error     sql.NullString
	CreatedAt types.Time
}

type Event

type Event struct {
	ID        int64
	Action    string
	Data      types.JSON
	Actor     core.ActorType
	UserID    sql.NullInt64
	CreatedAt types.Time
}

type Group

type Group struct {
	ID          int64
	Name        string
	Description string
	CreatedAt   types.Time
	UpdatedAt   types.Time
	DisabledAt  types.NullTime
}

type GroupUser

type GroupUser struct {
	UserID    int64
	GroupID   int64
	CreatedAt types.Time
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type SQLite

type SQLite interface {
	DBTX
	BeginTx(ctx context.Context, write bool) (SQLiteTx, error)
}

type SQLiteTx

type SQLiteTx interface {
	DBTX
	Commit() error
	Rollback() error
}

type Squeuel

type Squeuel struct {
	ID          string
	TaskID      sql.NullString
	Queue       string
	Payload     []byte
	Timeout     types.Time
	Received    int64
	MaxReceived int64
	CreatedAt   types.Time
	UpdatedAt   types.Time
}

type User

type User struct {
	ID         int64
	Email      string
	Username   string
	Password   string
	CreatedAt  types.Time
	UpdatedAt  types.Time
	DisabledAt types.NullTime
}

type UserSession

type UserSession struct {
	ID         int64
	UserID     int64
	Session    string
	UserAgent  string
	Ip         string
	LastIp     string
	LastUsedAt types.Time
	CreatedAt  types.Time
	ExpiredAt  types.Time
}

Jump to

Keyboard shortcuts

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