insight

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Report

type Report struct {
	ID          uint           `json:"id" gorm:"primaryKey"`
	Name        string         `json:"name" gorm:"not null"`
	Description string         `json:"description"`
	UserID      string         `json:"user_id" gorm:"index;not null"`
	Type        string         `json:"type" gorm:"not null"`
	Status      ReportStatus   `json:"status" gorm:"default:0"`
	CreatedAt   time.Time      `json:"created_at"`
	UpdatedAt   time.Time      `json:"updated_at"`
	DeletedAt   gorm.DeletedAt `json:"-" gorm:"index"`
}

func (Report) TableName

func (Report) TableName() string

type ReportStatus

type ReportStatus int
const (
	ReportStatusPending ReportStatus = iota
	ReportStatusGenerating
	ReportStatusCompleted
	ReportStatusFailed
)

func (ReportStatus) String

func (r ReportStatus) String() string

type Service

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

func NewService

func NewService() *Service

func (*Service) CreateReport

func (s *Service) CreateReport(ctx context.Context, report *Report) error

func (*Service) GetReports

func (s *Service) GetReports(ctx context.Context, userID string) ([]*Report, error)

func (*Service) SetDB

func (s *Service) SetDB(db *gorm.DB)

Jump to

Keyboard shortcuts

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