types

package
v0.0.0-...-158c053 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DbConfig DbConfig `json:"db_config"`
}

type DbConfig

type DbConfig struct {
	Dialect  string `json:"dialect"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
	Username string `json:"username"`
	Password string `json:"password"`
	Database string `json:"database"`
}

func (*DbConfig) GetConnectionString

func (d *DbConfig) GetConnectionString() (string, safego.Option[string])

GetConnectionString returns the connection string for the database. If the dialect is not supported, it returns an error.

type PageNumbersOptions

type PageNumbersOptions struct {
	Enabled  bool   `json:"enabled"`
	Position string `json:"position"`
}

type PrintingOptions

type PrintingOptions struct {
	PaperSize    string             `json:"paperSize"`
	Landscape    bool               `json:"landscape"`
	MarginTop    int                `json:"marginTop"`
	MarginRight  int                `json:"marginRight"`
	MarginBottom int                `json:"marginBottom"`
	MarginLeft   int                `json:"marginLeft"`
	PageNumbers  PageNumbersOptions `json:"pageNumbers"`
}

type Report

type Report struct {
	ID          uint32 `json:"id"`
	Name        string `json:"name" validate:"required"`
	Title       string `json:"title" validate:"required"`
	Description string `json:"description"`
	Body        string `json:"body" validate:"required"`
	Header      string `json:"header"`
	Footer      string `json:"footer"`
	CreatedAt   int64  `json:"createdAt"`
	UpdatedAt   int64  `json:"updatedAt"`
}

type ReportAttributesForPdfGenerator

type ReportAttributesForPdfGenerator struct {
	Title  string
	Body   string
	Header safego.Option[string]
	Footer safego.Option[string]
}

ReportAttributesForPdfGenerator is the attributes needed to generate a PDF. It is used in core/pdf-generators.go.

type ReportWithNullableFields

type ReportWithNullableFields struct {
	ID          uint32         `json:"id"`
	Name        sql.NullString `json:"name" validate:"required"`
	Title       sql.NullString `json:"title" validate:"required"`
	Description sql.NullString `json:"description"`
	Body        sql.NullString `json:"body" validate:"required"`
	Header      sql.NullString `json:"header"`
	Footer      sql.NullString `json:"footer"`
	CreatedAt   sql.NullInt64  `json:"createdAt"`
	UpdatedAt   sql.NullInt64  `json:"updatedAt"`
}

Jump to

Keyboard shortcuts

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