dto

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColumnFormatTypeAttachments string = "attachments"
	ColumnFormatTypeButton      string = "button"
	ColumnFormatTypeCanvas      string = "canvas"
	ColumnFormatTypeCheckbox    string = "checkbox"
	ColumnFormatTypeCurrency    string = "currency"
	ColumnFormatTypeDate        string = "date"
	ColumnFormatTypeDateTime    string = "dateTime"
	ColumnFormatTypeDuration    string = "duration"
	ColumnFormatTypeEmail       string = "email"
	ColumnFormatTypeImage       string = "image"
	ColumnFormatTypeLookup      string = "lookup"
	ColumnFormatTypeNumber      string = "number"
	ColumnFormatTypeOther       string = "other"
	ColumnFormatTypePackObject  string = "packObject"
	ColumnFormatTypePercent     string = "percent"
	ColumnFormatTypePerson      string = "person"
	ColumnFormatTypeReaction    string = "reaction"
	ColumnFormatTypeScale       string = "scale"
	ColumnFormatTypeSelect      string = "select"
	ColumnFormatTypeSlider      string = "slider"
	ColumnFormatTypeText        string = "text"
	ColumnFormatTypeTime        string = "time"

	TableTypeView string = "view"

	SpecialTableGlobalExternalConnections string = "Global-External-Connections"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIOptions

type APIOptions struct {
	Verbose        bool
	Endpoint       string
	Token          string
	DocID          string
	RequestTimeout time.Duration
}

type Column

type Column struct {
	ID         string       `json:"id"`
	Name       string       `json:"name"`
	Formula    string       `json:"formula"`
	Calculated bool         `json:"calculated"`
	Format     ColumnFormat `json:"format"`
}

func (Column) IsLookup added in v1.0.2

func (c Column) IsLookup() bool

func (Column) IsMutableLookup added in v1.0.2

func (c Column) IsMutableLookup() bool

type ColumnFormat

type ColumnFormat struct {
	Type                  string      `json:"type"`
	IsArray               bool        `json:"isArray"`
	Table                 TableFormat `json:"table"`                 // lookup, person
	Precision             int         `json:"precision"`             // number, percent, currency, duration ([0 .. 10])
	UseThousandsSeparator bool        `json:"useThousandsSeparator"` // number, percent
	Format                string      `json:"format"`                // currency (enum "currency" "accounting" "financial"), date, time
	DateFormat            string      `json:"dateFormat"`            // dateTime
	TimeFormat            string      `json:"timeFormat"`            // dateTime
	CurrencyCode          string      `json:"currencyCode"`          // currency
	MaxUnit               string      `json:"maxUnit"`               // duration (enum "days" "hours" "minutes" "seconds")
	Minimum               int         `json:"minimum"`               // slider
	Maximum               int         `json:"maximum"`               // slider, scale
	Step                  float64     `json:"step"`                  // slider
	Icon                  string      `json:"icon"`                  // scale (enum "star" "circle" "fire" "bug" "diamond" "bell" "thumbsup" "heart" "chili" "smiley" "lightning" "currency" "coffee" "person" "battery" "cocktail" "cloud" "sun" "checkmark" "lightbulb")
	Label                 string      `json:"label"`                 // button (formula)
	DisableIf             string      `json:"disableIf"`             // button (formula)
	Action                string      `json:"action"`                // button (formula)
}

type DumpOptions

type DumpOptions struct {
	OutputFile        string
	SchemaPackageName string
	APIPackageName    string
}

type Entity

type Entity struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type EntityList

type EntityList struct {
	Items []Entity `json:"items"`
}

func (EntityList) Count

func (e EntityList) Count() int

type ItemsContainer

type ItemsContainer interface {
	Count() int
}

type Options

type Options struct {
	APIOptions
	DumpOptions
}

type Schema

type Schema struct {
	Tables   TableList
	Columns  map[string]TableColumns
	Formulas EntityList
	Controls EntityList
}

type Table

type Table struct {
	Entity
	TableType string `json:"tableType"`
}

type TableColumns

type TableColumns struct {
	TableID   string
	TableType string
	Items     []Column `json:"items"`
}

func (TableColumns) GetColumnsReferencedTo

func (tc TableColumns) GetColumnsReferencedTo(refTable string) (cs []Column)

func (TableColumns) GetReferencedTables

func (tc TableColumns) GetReferencedTables() []TableFormat

func (TableColumns) HasReferencedTables

func (tc TableColumns) HasReferencedTables() bool

type TableFormat

type TableFormat struct {
	ID          string `json:"id"`
	Type        string `json:"type"`
	TableType   string `json:"tableType"`
	Name        string `json:"name"`
	Href        string `json:"href"`
	BrowserLink string `json:"browserLink"`
}

type TableList

type TableList struct {
	Items []Table `json:"items"`
}

func (TableList) Count

func (t TableList) Count() int

Jump to

Keyboard shortcuts

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