models

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alignment

type Alignment struct {
	Horizontal  string `json:"horizontal,omitempty"`
	Vertical    string `json:"vertical,omitempty"`
	ShrinkToFit bool   `json:"shrink_to_fit"`
	WrapText    bool   `json:"wrap_text,omitempty"`
}

Alignment struct contain the text alignment details that will be used inside cell

type Border

type Border struct {
	Type  string `json:"type,omitempty"`
	Color string `json:"color,omitempty"`
	Style int    `json:"style,omitempty"`
}

Border struct contain all the border data used to stylize a border of a cell, column or row

type Cell

type Cell struct {
	Value     interface{} `json:"value"`
	Style     *Style      `json:"style,omitempty"`
	IsFormula bool        `json:"is_formula,omitempty"`
}

Cell struct contain all the cell data used to generate a cell

type Chart added in v1.0.1

type Chart struct {
	Type      string     `json:"type"`
	Series    []*Series  `json:"series"`
	Format    *Format    `json:"format,omitempty"`
	Legend    *Legend    `json:"legend"`
	Title     *Title     `json:"title,omitempty"`
	PlotArea  *PlotArea  `json:"plot_area,omitempty"`
	Dimension *Dimension `json:"dimension,omitempty"`
}

Chart struct is containing all the chart values that will be create on excel sheet

type ColOrRowValues added in v1.0.1

type ColOrRowValues struct {
	Orientation string  `json:"orientation,omitempty"`
	Cells       []*Cell `json:"cells,omitempty"`
}

ColOrRowValues struct is containing all the cells values that will be insert into a column or row

type Dimension added in v1.0.1

type Dimension struct {
	Height int `json:"height,omitempty"`
	Width  int `json:"width,omitempty"`
}

Dimension struct is the dimension of the chart

type File

type File struct {
	Sheets []*Sheet `json:"sheets"`
}

File represent json model File

type Fill

type Fill struct {
	Type    string   `json:"type,omitempty"`
	Pattern int      `json:"pattern,omitempty"`
	Color   []string `json:"color,omitempty"`
	Shading int      `json:"shading,omitempty"`
}

Fill represent a JSON cell style model

type Font

type Font struct {
	Bold      bool    `json:"bold,omitempty"`
	Italic    bool    `json:"italic,omitempty"`
	Underline string  `json:"underline,omitempty"`
	Family    string  `json:"family,omitempty"`
	Size      float64 `json:"size,omitempty"`
	Strike    bool    `json:"strike,omitempty"`
	Color     string  `json:"color,omitempty"`
}

Font represent a json cell style model

type Format added in v1.0.1

type Format struct {
	XScale          float32 `json:"x_scale,omitempty"`
	YScale          float32 `json:"y_scale,omitempty"`
	XOffset         float32 `json:"x_offset,omitempty"`
	YOffset         float32 `json:"y_offset,omitempty"`
	PrintObj        bool    `json:"print_obj,omitempty"`
	LockAspectRatio bool    `json:"lock_aspect_ratio,omitempty"`
	Locked          bool    `json:"locked,omitempty"`
}

Format struct is containing all the chart format

type Item

type Item struct {
	StartingCellCoordinates string            `json:"starting_cell_coordinates,omitempty"`
	Table                   []*ColOrRowValues `json:"table"`
	Chart                   *Chart            `json:"chart,omitempty"`
}

Item struct is a thing (table, graph, ...) you want to insert into your Excel file

type Legend added in v1.0.1

type Legend struct {
	Position      string `json:"position,omitempty"`
	ShowLegendKey bool   `json:"show_legend_key,omitempty"`
}

Legend struct is containing chart legend

type Option added in v1.0.4

type Option struct {
	SheetName           string `json:"sheet_name"`
	StartingCoordinates string `json:"starting_coordinates,omitempty"`
}

Option represent a reader option object

type PlotArea added in v1.0.1

type PlotArea struct {
	ShowBubbleSize  bool `json:"show_bubble_size,omitempty"`
	ShowCatName     bool `json:"show_cat_name,omitempty"`
	ShowLeaderLines bool `json:"show_leader_lines,omitempty"`
	ShowPercent     bool `json:"show_percent,omitempty"`
	ShowSeriesName  bool `json:"show_series_name,omitempty"`
	ShowVal         bool `json:"show_val,omitempty"`
}

PlotArea struct is containing all options for chart

type Protection

type Protection struct {
	Hidden bool `json:"hidden,omitempty"`
	Locked bool `json:"locked,omitempty"`
}

Protection represent a json cell style model

type ReaderOption added in v1.0.4

type ReaderOption struct {
	Options []Option `json:"options"`
}

ReaderOption contains reader optional options

type Series added in v1.0.1

type Series struct {
	Name       string `json:"name"`
	Categories string `json:"categories,omitempty"`
	Values     string `json:"values"`
}

Series struct is containing all the series of displayed chart

type Sheet

type Sheet struct {
	Name        string  `json:"name"`
	Orientation string  `json:"orientation,omitempty"` // Default : landscape
	Items       []*Item `json:"items"`
}

Sheet represent json model Sheet

type Style

type Style struct {
	Border     []*Border   `json:"border,omitempty"`
	Fill       *Fill       `json:"fill,omitempty"`
	Font       *Font       `json:"font,omitempty"`
	Alignment  *Alignment  `json:"alignment,omitempty"`
	Protection *Protection `json:"protection,omitempty"`
}

Style represent json model Data

type Title added in v1.0.1

type Title struct {
	Name string `json:"name,omitempty"`
}

Title struct is containing chart title

Jump to

Keyboard shortcuts

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