Documentation
¶
Index ¶
- func EncIndentedJson(w io.Writer, e interface{}) error
- func EncJsonToFile(fileName string, e interface{}) (err error)
- type AjfForm
- type Choice
- type ChoiceType
- type ChoicesOrigin
- type ChoicesRow
- type Condition
- type FieldType
- type FieldValidation
- type File
- type Formula
- type Node
- type NodeType
- type OriginType
- type Row
- type SettingsRow
- type SurveyRow
- func (r SurveyRow) Appearance() string
- func (r SurveyRow) Calculation() string
- func (r SurveyRow) ChoiceFilter() string
- func (r SurveyRow) Constraint() string
- func (r SurveyRow) ConstraintMsg(lang string) string
- func (r SurveyRow) Default() string
- func (r SurveyRow) Hint(lang string) string
- func (r SurveyRow) Label(lang string) string
- func (r SurveyRow) Name() string
- func (r SurveyRow) Parameters() string
- func (r SurveyRow) PermissionsRelevant() string
- func (r SurveyRow) ReadOnly() string
- func (r SurveyRow) Relevant() string
- func (r SurveyRow) RepeatCount() string
- func (r SurveyRow) Required() string
- func (r SurveyRow) RequiredMessage(lang string) string
- type Tag
- type Translation
- type ValidationCondition
- type WorkBook
- type XlsForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncIndentedJson ¶
func EncJsonToFile ¶
Types ¶
type AjfForm ¶
type AjfForm struct { StringIdentifier []Tag `json:"stringIdentifier,omitempty"` ChoicesOrigins []ChoicesOrigin `json:"choicesOrigins,omitempty"` Slides []Node `json:"nodes"` Translations map[string]Translation `json:"translations,omitempty"` }
type Choice ¶
Choice has fields "value", "label" and possibly others defined by the user to be used in choice filters.
type ChoicesOrigin ¶
type ChoicesOrigin struct { Type OriginType `json:"type"` Name string `json:"name"` ChoicesType ChoiceType `json:"choicesType"` Choices []Choice `json:"choices"` }
type ChoicesRow ¶
type ChoicesRow struct{ Row }
func MakeChoicesRow ¶
func MakeChoicesRow(keyVals ...string) ChoicesRow
func (ChoicesRow) Label ¶
func (r ChoicesRow) Label(lang string) string
func (ChoicesRow) ListName ¶
func (r ChoicesRow) ListName() string
func (ChoicesRow) Name ¶
func (r ChoicesRow) Name() string
func (ChoicesRow) UserDefCells ¶
func (r ChoicesRow) UserDefCells() map[string]string
type FieldType ¶
type FieldType int
var ( FtString FieldType = 0 FtText FieldType = 1 FtNumber FieldType = 2 FtBoolean FieldType = 3 FtSingleChoice FieldType = 4 FtMultipleChoice FieldType = 5 FtFormula FieldType = 6 FtNote FieldType = 7 FtDate FieldType = 9 FtTime FieldType = 10 FtTable FieldType = 11 FtGeolocation FieldType = 12 FtBarcode FieldType = 13 FtFile FieldType = 14 FtImage FieldType = 15 FtVideoUrl FieldType = 16 FtRange FieldType = 17 FtSignature FieldType = 18 )
type FieldValidation ¶
type FieldValidation struct { NotEmpty bool `json:"notEmpty,omitempty"` NotEmptyMsg string `json:"notEmptyMessage,omitempty"` Conditions []ValidationCondition `json:"conditions,omitempty"` }
type Node ¶
type Node struct { Previous int `json:"parent"` Id int `json:"id"` Name string `json:"name"` Label string `json:"label"` Hint string `json:"hint,omitempty"` DefaultVal *Formula `json:"defaultValue,omitempty"` Editable *bool `json:"editable,omitempty"` Type NodeType `json:"nodeType"` FieldType *FieldType `json:"fieldType,omitempty"` RangeStart *int `json:"start,omitempty"` RangeEnd *int `json:"end,omitempty"` RangeStep *int `json:"step,omitempty"` ChoicesOriginRef string `json:"choicesOriginRef,omitempty"` ChoicesFilter *Formula `json:"choicesFilter,omitempty"` ForceNarrow bool `json:"forceNarrow,omitempty"` HTML string `json:"HTML,omitempty"` MaxReps *int `json:"maxReps,omitempty"` Formula *Formula `json:"formula,omitempty"` ColumnTypes []string `json:"columnTypes,omitempty"` ColumnLabels []string `json:"columnLabels,omitempty"` RowLabels []string `json:"rowLabels,omitempty"` Validation *FieldValidation `json:"validation,omitempty"` Visibility *Condition `json:"visibility,omitempty"` ReadOnly *Condition `json:"readonly,omitempty"` Rows [][]interface{} `json:"rows,omitempty"` Nodes []Node `json:"nodes,omitempty"` }
type SettingsRow ¶
type SettingsRow struct{ Row }
func MakeSettingsRow ¶
func MakeSettingsRow(keyVals ...string) SettingsRow
func (SettingsRow) TagLabel ¶
func (r SettingsRow) TagLabel() string
func (SettingsRow) TagValue ¶
func (r SettingsRow) TagValue() string
type SurveyRow ¶
type SurveyRow struct { Row // Type is kept here as an optimization, // to avoid accessing Row.cells["type"] too frequently. Type string }
func MakeSurveyRow ¶
func (SurveyRow) Appearance ¶
func (SurveyRow) Calculation ¶
func (SurveyRow) ChoiceFilter ¶
func (SurveyRow) Constraint ¶
func (SurveyRow) ConstraintMsg ¶
func (SurveyRow) Parameters ¶
func (SurveyRow) PermissionsRelevant ¶
func (SurveyRow) RepeatCount ¶
func (SurveyRow) RequiredMessage ¶
type Translation ¶
type ValidationCondition ¶
type XlsForm ¶
type XlsForm struct { Survey []SurveyRow Choices []ChoicesRow Settings []SettingsRow Tables map[string][][]string LangSet map[string]bool }
func DecXlsFromFile ¶
func DecXlsform ¶
Click to show internal directories.
Click to hide internal directories.