service

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package service provides the service layer for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBService

type DBService interface {
	CheckTableExits(ctx context.Context, tableName string) error
	ListTables(ctx context.Context) ([]models.ListTablesRow, error)
	ListCols(ctx context.Context, tableName string) ([]models.ListDataCol, error)
	ListRows(ctx context.Context, tableName string, page int, column string, order string) (models.ListDataRow, error)
	InsertRow(ctx context.Context, props models.InsertDataProps) error
	GetRow(ctx context.Context, tableName string, hash string, page int) ([]any, error)
	UpdateRow(ctx context.Context, values map[string]models.FormValue, tableName, hash string, page int) error
	CreateTable(ctx context.Context, tableName string, inputs []database.Input) error
	GetRowCount(ctx context.Context, tableName string) (int, error)
	DeleteRow(ctx context.Context, tableName string, hash string, page int) error
	GetTableFormDataTypes() *FormDatatype
	DeleteTable(ctx context.Context, tableName, verificationQuery string) error
	ListHistory(ctx context.Context, page int) ([]models.History, error)
	HasNextPage(ctx context.Context, total, page int) bool
}

func NewService

func NewService(repo *repo.Queries, maxItemsPerPage int) DBService

type FormDatatype

type FormDatatype struct {
	NumericDataType []database.NumericDataType `json:"numericType"`
	StringDataType  []database.StringDataType  `json:"stringType"`
}

Jump to

Keyboard shortcuts

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