theme

package
v0.0.0-...-a0770fe Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

type Analyzer struct {
	Key    string          `json:"key"`
	Inputs []AnalyzerInput `json:"inputs"`
}

type AnalyzerDto

type AnalyzerDto struct {
	Key          string             `json:"key"`
	Name         string             `json:"name"`
	Description  string             `json:"description"`
	ChangeStatus ChangeStatus       `json:"changeStatus"`
	Inputs       []AnalyzerInputDto `json:"inputs"`
}

type AnalyzerInput

type AnalyzerInput struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type AnalyzerInputDto

type AnalyzerInputDto struct {
	Key          string       `json:"key"`
	Value        string       `json:"value"`
	Name         string       `json:"name"`
	Description  string       `json:"description"`
	Type         string       `json:"type"`
	ChangeStatus ChangeStatus `json:"changeStatus"`
}

type Analyzers

type Analyzers []Analyzer

func (*Analyzers) Scan

func (c *Analyzers) Scan(src any) error

func (Analyzers) Value

func (c Analyzers) Value() (driver.Value, error)

type ChangeStatus

type ChangeStatus string
const (
	New     ChangeStatus = "new"
	Removed ChangeStatus = "removed"
	Changed ChangeStatus = "changed"
	Same    ChangeStatus = "same"
)

type Reporter

type Reporter struct {
	Threshold float32 `json:"threshold"`
	Key       string  `json:"key"`
}

func (*Reporter) Scan

func (c *Reporter) Scan(src any) error

func (Reporter) Value

func (c Reporter) Value() (driver.Value, error)

type ReporterDto

type ReporterDto struct {
	Threshold    float32      `json:"threshold"`
	Key          string       `json:"key"`
	Name         string       `json:"name"`
	Description  string       `json:"description"`
	ChangeStatus ChangeStatus `json:"changeStatus"`
}

type Theme

type Theme struct {
	Id          uuid.UUID `gorm:"column:id;primaryKey;type:uuid;default:gen_random_uuid()"`
	UserId      uuid.UUID `gorm:"column:user_id"`
	Title       string    `gorm:"column:title"`
	Description string    `gorm:"column:description"`
	Analyzers   Analyzers `gorm:"column:analyzers;type:jsonb"`
	Reporter    Reporter  `gorm:"column:reporter;type:jsonb"`
}

type ThemeController

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

func NewThemeController

func NewThemeController(group *gin.RouterGroup, s *ThemeService) *ThemeController

type ThemeDto

type ThemeDto struct {
	Id          uuid.UUID     `json:"id"`
	Title       string        `json:"title"`
	Description string        `json:"description"`
	Analyzers   []AnalyzerDto `json:"analyzers"`
	Reporters   []ReporterDto `json:"reporters"`
}

type ThemeRepository

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

func NewThemeRepository

func NewThemeRepository(db *gorm.DB) *ThemeRepository

type ThemeService

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

func NewThemeService

func NewThemeService(ts themeStore) *ThemeService

func (*ThemeService) GetAllThemesByUserId

func (ts *ThemeService) GetAllThemesByUserId(id uuid.UUID) ([]ThemeDto, error)

Jump to

Keyboard shortcuts

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