model

package
v0.0.69 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 8 Imported by: 12

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 CanvasDirection

type CanvasDirection string

type CanvasPosition

type CanvasPosition string

type ChangeStatistics

type ChangeStatistics struct {
	Total            int               `json:"total"`
	TotalBreaking    int               `json:"totalBreaking"`
	Added            int               `json:"added"`
	Modified         int               `json:"modified"`
	Removed          int               `json:"removed"`
	BreakingAdded    int               `json:"breakingAdded"`
	BreakingModified int               `json:"breakingModified"`
	BreakingRemoved  int               `json:"breakingRemoved"`
	Commit           *CommitStatistics `json:"commit,omitempty"`
}

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"`
	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:"-"`
}

type CommitStatistics

type CommitStatistics struct {
	Date        string `json:"date,omitempty"`
	Message     string `json:"message,omitempty"`
	Author      string `json:"author,omitempty"`
	AuthorEmail string `json:"authorEmail,omitempty"`
	Hash        string `json:"hash,omitempty"`
}

type EdgeData

type EdgeData[T any] struct {
	Id                 string `json:"id,omitempty"`
	Disabled           *bool  `json:"disabled,omitempty"`
	Text               string `json:"text,omitempty"`
	From               string `json:"from,omitempty"`
	To                 string `json:"to,omitempty"`
	FromPort           string `json:"fromPort,omitempty"`
	ToPort             string `json:"toPort,omitempty"`
	Data               T      `json:"data,omitempty"`
	ClassName          string `json:"className,omitempty"`
	ContainerClassName string `json:"containerClassName,omitempty"`
	ArrowHeadType      any    `json:"arrowHeadType,omitempty"`
	Parent             string `json:"parent,omitempty"`
	SelectionDisabled  string `json:"selectionDisabled,omitempty"`
}

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"`
	Commit  *Commit                     `gorm:"foreignKey:ID" json:"commitDetails"`
}

type GraphResult

type GraphResult struct {
	Nodes []*NodeData[any] `json:"nodes"`
	Edges []*EdgeData[any] `json:"edges"`
}

type HTMLReport

type HTMLReport struct {
	DateGenerated string            `json:"dateGenerated"`
	ReportItems   []*HTMLReportItem `json:"reportItems"`
	UseCDN        bool              `json:"useCDN"`
}

type HTMLReportItem

type HTMLReportItem struct {
	OriginalSpec    string                   `json:"originalSpec"`
	ModifiedSpec    string                   `json:"modifiedSpec"`
	DocumentChanges *wcModel.DocumentChanges `json:"documentChanges,omitempty"`
	TreeNodes       []*TreeNode              `json:"tree,omitempty"`
	Graph           *GraphResult             `json:"graph,omitempty"`
	Statistics      *ChangeStatistics        `json:"statistics"`
}

type HashedChange added in v0.0.65

type HashedChange struct {
	*model.Change
	ChangeHash string `json:"changeHash,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 HistoricalReport

type HistoricalReport struct {
	ID            uint      `gorm:"primaryKey" json:"-"`
	GitRepoPath   string    `gorm:"index" json:"gitRepoPath"`
	GitFilePath   string    `json:"gitFilePath"`
	Filename      string    `json:"filename"`
	DateGenerated string    `json:"dateGenerated"`
	Reports       []*Report `gorm:"foreignKey:ID" json:"reports" `
}

type IconData

type IconData struct {
	Url    string `json:"url,omitempty"`
	Height *int   `json:"height,omitempty"`
	Width  *int   `json:"width,omitempty"`
}

type NodeData

type NodeData[T any] struct {
	Id                string      `json:"id,omitempty"`
	Disabled          *bool       `json:"disabled,omitempty"`
	Text              any         `json:"text,omitempty"`
	Height            *int        `json:"height,omitempty"`
	Width             *int        `json:"width,omitempty"`
	Parent            string      `json:"parent,omitempty"`
	Ports             []*PortData `json:"ports,omitempty"`
	Icon              *IconData   `json:"icon,omitempty"`
	NodePadding       []int       `json:"nodePadding,omitempty"`
	Data              T           `json:"data,omitempty"`
	ClassName         string      `json:"className,omitempty"`
	LayoutOptions     any         `json:"layoutOptions,omitempty"`
	SelectionDisabled *bool       `json:"selectionDisabled,omitempty"`
}

type PortData

type PortData struct {
	Id        string         `json:"id,omitempty"`
	Height    *int           `json:"height,omitempty"`
	Width     *int           `json:"weight,omitempty"`
	Hidden    bool           `json:"hidden,omitempty"`
	ClassName string         `json:"className,omitempty"`
	Alignment CanvasPosition `json:"alignment,omitempty"`
	Side      PortSide       `json:"side,omitempty"`
}

type PortSide

type PortSide string

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"`
}

type TreeNode

type TreeNode struct {
	TitleString     string          `json:"titleString"`
	Title           string          `json:"title,omitempty"`
	Key             string          `json:"key"`
	IsLeaf          bool            `json:"isLeaf,omitempty"`
	Selectable      bool            `json:"selectable,omitempty"`
	TotalChanges    int             `json:"totalChanges,omitempty"`
	BreakingChanges int             `json:"breakingChanges,omitempty"`
	Change          *wcModel.Change `json:"change,omitempty"`
	Disabled        bool            `json:"disabled,omitempty"`
	Children        []*TreeNode     `json:"children,omitempty"`
}

Jump to

Keyboard shortcuts

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