model

package
v0.0.0-...-f09f64d Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateRowAndColumnIndexes

func ValidateRowAndColumnIndexes(spreadsheet Spreadsheet, rowIndex int, columnIndex int) error

Types

type Cell

type Cell struct {
	gorm.Model
	SpreadsheetID string       `json:"spreadsheetId"`
	Spreadsheet   *Spreadsheet `json:"spreadsheet"`
	RawValue      string       `json:"rawValue"`
	ComputedValue string       `json:"computedValue,omitempty"`
	RowIndex      int          `json:"rowIndex"`
	ColumnIndex   int          `json:"columnIndex"`
	Version       uint64       `json:"version"`
}

func (*Cell) ComputeValueFromRaw

func (c *Cell) ComputeValueFromRaw(otherCells []Cell) (string, error)

func (*Cell) FindDependentCells

func (c *Cell) FindDependentCells(otherCells []Cell) ([]Cell, error)

func (*Cell) UpdateCellAndDependentCells

func (c *Cell) UpdateCellAndDependentCells(context *common.CustomContext, input UpdateCell) (*Cell, error)

type NewCell

type NewCell struct {
	SpreadsheetID string `json:"spreadsheetId"`
	RawValue      string `json:"rawValue"`
	RowIndex      int    `json:"rowIndex"`
	ColumnIndex   int    `json:"columnIndex"`
}

type NewSpreadsheet

type NewSpreadsheet struct {
	Name        string `json:"name"`
	RowCount    int    `json:"rowCount"`
	ColumnCount int    `json:"columnCount"`
}

type Spreadsheet

type Spreadsheet struct {
	gorm.Model
	Name        string `json:"name"`
	RowCount    int    `json:"rowCount"`
	ColumnCount int    `json:"columnCount"`
}

type UpdateCell

type UpdateCell struct {
	RawValue string `json:"rawValue"`
}

type UpdateSpreadsheet

type UpdateSpreadsheet struct {
	Name        *string `json:"name,omitempty"`
	RowCount    *int    `json:"rowCount,omitempty"`
	ColumnCount *int    `json:"columnCount,omitempty"`
}

type Version

type Version struct {
	Version string `json:"version"`
}

Jump to

Keyboard shortcuts

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