model

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 8 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendFatalError

func SendFatalError(job, message string, errorChan chan ProgressError)

func SendProgressError

func SendProgressError(job, message string, errorChan chan ProgressError)

func SendProgressUpdate

func SendProgressUpdate(job, message string, completed bool, progressChan chan *ProgressUpdate)

func SendProgressWarning

func SendProgressWarning(job, message string, progressChan chan *ProgressUpdate)

Types

type Commit

type Commit struct {
	CreatedAt         time.Time              `json:"-"`
	UpdatedAt         time.Time              `json:"-"`
	ID                uint                   `gorm:"primaryKey" json:"-"`
	Hash              string                 `json:"commitHash"`
	Message           string                 `json:"message"`
	Author            string                 `json:"author"`
	AuthorEmail       string                 `gorm:"index" json:"authorEmail"`
	CommitDate        time.Time              `json:"committed"`
	Changes           *model.DocumentChanges `gorm:"-" json:"changeReport,omitempty"`
	SerializedChanges []byte                 `gorm:"-" json:"-"`
	Data              []byte                 `gorm:"-" json:"-"`
	OldData           []byte                 `gorm:"-" json:"-"`
	Document          libopenapi.Document    `gorm:"-" json:"-"`
	OldDocument       libopenapi.Document    `gorm:"-" json:"-"`
	RepoDirectory     string                 `gorm:"-" json:"-"`
	FilePath          string                 `gorm:"-" json:"-"`
	Synthetic         bool                   `gorm:"-" json:"-"`
}

type FlatHistoricalReport added in v0.0.54

type FlatHistoricalReport struct {
	GitRepoPath   string        `json:"gitRepoPath"`
	GitFilePath   string        `json:"gitFilePath"`
	Filename      string        `json:"filename"`
	DateGenerated string        `json:"dateGenerated"`
	Reports       []*FlatReport `json:"reports" `
}

type FlatReport added in v0.0.54

type FlatReport struct {
	Summary       map[string]*reports.Changed `json:"reportSummary"`
	Changes       []*HashedChange             `json:"changes"`
	DateGenerated string                      `json:"dateGenerated,omitempty"`
	Commit        *Commit                     `gorm:"foreignKey:ID" json:"commitDetails,omitempty"`
}

type HashedChange added in v0.0.65

type HashedChange struct {
	*model.Change
	ChangeHash string `json:"changeHash,omitempty"`
	RawPath    string `json:"rawPath,omitempty"`
}

func (*HashedChange) HashChange added in v0.0.65

func (hc *HashedChange) HashChange()

func (*HashedChange) MarshalJSON added in v0.0.65

func (hc *HashedChange) MarshalJSON() ([]byte, error)

type ProgressError

type ProgressError struct {
	Job     string
	Message string
	Fatal   bool
}

func (ProgressError) Error

func (p ProgressError) Error() string

type ProgressUpdate

type ProgressUpdate struct {
	Job       string
	Message   string
	Completed bool
	Warning   bool
}

type Report

type Report struct {
	ID        uint                        `gorm:"primaryKey" json:"-"`
	Summary   map[string]*reports.Changed `gorm:"-" json:"reportSummary"`
	CreatedAt time.Time                   `json:"-"`
	UpdatedAt time.Time                   `json:"-"`
	Commit    *Commit                     `gorm:"foreignKey:ID" json:"commitDetails,omitempty"`
}

Jump to

Keyboard shortcuts

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