xbprint

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SheetColTypeText        = "shorttext"
	SheetColTypeLongText    = "longtext"
	SheetColTypeSelect      = "select"
	SheetColTypeMultiSelect = "multi_select"
	SheetColTypeNumber      = "number"
	SheetColTypeDate        = "datetime"
	SheetColTypeBoolean     = "bool"
	SheetColTypeRatings     = "ratings"
	SheetColTypeLocation    = "location"
	SheetColTypeFile        = "file"
	SheetColTypeUser        = "user"
	SheetColTypeReference   = "reference"
	SheetColTypeRemote      = "remote"
)
View Source
const (
	TypeBundle     = "bundle"
	TypeDataGroup  = "data_group"
	TypeDataSheet  = "data_sheet"
	TypePlug       = "plug"
	TypeResource   = "resource"
	TypeTargetApp  = "target_app"
	TypeTargetHook = "target_hook"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BundleItem

type BundleItem struct {
	Name string `json:"name,omitempty"`
	Type string `json:"type,omitempty"`
	File string `json:"file,omitempty"`
}

type BundleV1

type BundleV1 struct {
	Type         string       `json:"type,omitempty"`
	Items        []BundleItem `json:"items,omitempty"`
	PostInstance string       `json:"post_instance,omitempty"`
	PostUpgrade  string       `json:"post_upgrade,omitempty"`
}

type DataSchemaV1

type DataSchemaV1 struct {
	NewTableGroup
}

type DataSchemaV2

type DataSchemaV2 struct {
	Steps []MigrationStep `json:"steps,omitempty" yaml:"steps,omitempty"`
}

type LocalBprint

type LocalBprint struct {
	Name        string            `yaml:"name,omitempty"`
	Slug        string            `yaml:"slug,omitempty"`
	Type        string            `yaml:"type,omitempty"`
	Description string            `yaml:"description,omitempty"`
	Icon        string            `yaml:"icon,omitempty"`
	Version     string            `yaml:"version,omitempty"`
	Tags        []string          `yaml:"tags,omitempty"`
	Files       map[string]string `yaml:"files,omitempty"`
	ExtraMeta   map[string]any    `yaml:"extra_meta,omitempty"`
	EnvFile     string            `yaml:"env_file,omitempty"`
}

type MigrationStep

type MigrationStep struct {
	Name string          `json:"name,omitempty" yaml:"name,omitempty"`
	Type string          `json:"type,omitempty" yaml:"type,omitempty"`
	Data json.RawMessage `json:"data,omitempty" yaml:"data,omitempty"`
}

type NewAgent

type NewAgent struct {
	Name      string            `json:"name,omitempty"`
	Type      string            `json:"type,omitempty"`
	Executor  string            `json:"executor,omitempty"`
	IfaceFile string            `json:"iface_file,omitempty"`
	EntryFile string            `json:"entry_file,omitempty"`
	WebEntry  string            `json:"web_entry,omitempty"`
	WebScript string            `json:"web_script,omitempty"`
	WebStyle  string            `json:"web_style,omitempty"`
	WebLoader string            `json:"web_loader,omitempty"`
	WebFiles  map[string]string `json:"web_files,omitempty"`

	// secondary objects
	Resources []NewAgentResource `json:"resources,omitempty"`
}

type NewAgentResource

type NewAgentResource struct {
	Name    string       `json:"name,omitempty"`
	Type    string       `json:"type,omitempty"`
	RefName string       `json:"ref_name,omitempty"`
	RefData *NewResource `json:"ref_data,omitempty"`
}

type NewColumn

type NewColumn struct {
	Name          string   `json:"name,omitempty" yaml:"name,omitempty"`
	Slug          string   `json:"slug,omitempty" yaml:"slug,omitempty"`
	Table         string   `json:"table,omitempty" yaml:"table,omitempty"`
	Ctype         string   `json:"ctype,omitempty" yaml:"ctype,omitempty"`
	Description   string   `json:"description,omitempty" yaml:"description,omitempty"`
	Icon          string   `json:"icon,omitempty" yaml:"icon,omitempty"`
	Options       []string `json:"options,omitempty" yaml:"options,omitempty"`
	NotNullable   bool     `json:"not_nullable,omitempty" yaml:"not_nullable,omitempty"`
	Pattern       string   `json:"pattern,omitempty" yaml:"pattern,omitempty"`
	StrictPattern bool     `json:"strict_pattern,omitempty" yaml:"strict_pattern,omitempty"`
}

func (*NewColumn) To

func (m *NewColumn) To(tenantId, gslug, tslug string) *entities.Column
type NewInnerLink struct {
	Slug       string            `json:"slug,omitempty"`
	From       string            `json:"from,omitempty"`
	To         string            `json:"to,omitempty"`
	HandlerMap map[string]string `json:"handler_map,omitempty"`
}

type NewPlug

type NewPlug struct {
	Slug   string     `json:"slug,omitempty"`
	Name   string     `json:"name,omitempty"`
	Agents []NewAgent `json:"agents,omitempty"`
}

type NewResource

type NewResource struct {
	Name      string            `json:"name,omitempty"`
	Type      string            `json:"type,omitempty"`
	SubType   string            `json:"sub_type,omitempty"`
	Payload   string            `json:"payload,omitempty"`
	Policy    string            `json:"policy,omitempty"`
	TargetRef string            `json:"target_ref,omitempty"`
	Meta      map[string]string `json:"meta,omitempty"`
}

type NewSheet

type NewSheet struct {
	Name     string           `json:"name,omitempty"`
	Columns  []NewSheetColumn `json:"columns,omitempty"`
	SeedData []map[string]any `json:"seed_data,omitempty"`
}

type NewSheetColumn

type NewSheetColumn struct {
	Name        string            `json:"name,omitempty"`
	Ctype       string            `json:"ctype,omitempty"`
	Color       string            `json:"color,omitempty"`
	Options     string            `json:"opts,omitempty"`
	ExtaOptions map[string]string `json:"extra_options,omitempty"`
}

type NewSheetGroup

type NewSheetGroup struct {
	Name   string     `json:"name,omitempty"`
	Info   string     `json:"info,omitempty"`
	Sheets []NewSheet `json:"sheets,omitempty"`
}

type NewTable

type NewTable struct {
	Name          string                  `json:"name,omitempty" yaml:"name,omitempty"`
	Slug          string                  `json:"slug,omitempty" yaml:"slug,omitempty"`
	Description   string                  `json:"description,omitempty" yaml:"description,omitempty"`
	Icon          string                  `json:"icon,omitempty" yaml:"icon,omitempty"`
	MainColumn    string                  `json:"main_column,omitempty" yaml:"main_column,omitempty"`
	ActivityType  string                  `json:"activity_type,omitempty" yaml:"activity_type,omitempty"`
	SyncType      string                  `json:"sync_type,omitempty" yaml:"sync_type,omitempty"`
	Columns       []*NewColumn            `json:"columns,omitempty" yaml:"columns,omitempty"`
	Indexes       []entities.Index        `json:"indexes,omitempty" yaml:"indexes,omitempty"`
	UniqueIndexes []entities.Index        `json:"unique_indexes,omitempty" yaml:"unique_indexes,omitempty"`
	FTSIndex      *entities.FTSIndex      `json:"fts_index,omitempty" yaml:"fts_index,omitempty"`
	ColumnRef     []*entities.ColumnFKRef `json:"column_refs,omitempty" yaml:"column_refs,omitempty"`
	Views         []entities.View         `json:"views,omitempty" yaml:"views,omitempty"`
}

func (*NewTable) To

func (m *NewTable) To(tenantId, gslug string) *entities.Table

type NewTableGroup

type NewTableGroup struct {
	Name          string      `json:"name,omitempty" yaml:"name,omitempty"`
	Slug          string      `json:"slug,omitempty" yaml:"slug,omitempty"`
	Description   string      `json:"description,omitempty" yaml:"description,omitempty"`
	Tables        []*NewTable `json:"tables,omitempty" yaml:"tables,omitempty"`
	ExecOrder     []string    `json:"exec_order,omitempty" yaml:"exec_order,omitempty"`
	Renderer      string      `json:"renderer,omitempty" yaml:"renderer,omitempty"`
	CabinetSource string      `json:"-" yaml:"-"`
	CabinetFolder string      `json:"-" yaml:"-"`
}

func (*NewTableGroup) To

func (m *NewTableGroup) To(tenantId string) *entities.TableGroup

type NewTargetApp

type NewTargetApp struct {
	Name        string `json:"name,omitempty" yaml:"name,omitempty"`
	Agent       string `json:"agent,omitempty" yaml:"agent,omitempty"`
	ContextType string `json:"context_type,omitempty" yaml:"context_type,omitempty"`
}

type PlugSchemaV1

type PlugSchemaV1 struct {
	NewPlug
}

type PlugSchemaV2

type PlugSchemaV2 struct {
	Steps []Step `json:"steps,omitempty"`
}

type RemoveColumn

type RemoveColumn struct {
	Slug  string `json:"slug,omitempty" yaml:"slug,omitempty"`
	Table string `json:"table,omitempty" yaml:"table,omitempty"`
}

type RemoveTable

type RemoveTable struct {
	Slug string `json:"slug,omitempty" yaml:"slug,omitempty"`
}

type Step

type Step struct {
	Name string          `json:"name,omitempty" yaml:"name,omitempty"`
	Type string          `json:"type,omitempty" yaml:"type,omitempty"`
	Data json.RawMessage `json:"data,omitempty" yaml:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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