client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

Types

type Client

type Client struct {
	Logger zerolog.Logger
	Specs  *Spec
}

func (*Client) ID

func (c *Client) ID() string

type Column

type Column struct {
	Name        string             `json:"name,omitempty" yaml:"name,omitempty"`
	Description *string            `json:"description,omitempty" yaml:"description,omitempty"`
	Type        string             `json:"type,omitempty" yaml:"type,omitempty"`
	Key         bool               `json:"key,omitempty" yaml:"pk,omitempty"`
	Unique      bool               `json:"unique,omitempty" yaml:"unique,omitempty"`
	NotNull     bool               `json:"notnull,omitempty" yaml:"notnull,omitempty"`
	Transform   *string            `json:"transform,omitempty" yaml:"transform,omitempty"`
	Template    *template.Template `json:"-" yaml:"-"`
}

type Spec

type Spec struct {
	File      string   `json:"file,omitempty" yaml:"file,omitempty"`
	Format    string   `json:"format,omitempty" yaml:"format,omitempty"`
	Separator *string  `json:"separator,omitempty" yaml:"separator,omitempty"` // CSV only
	Sheets    []string `json:"sheets,omitempty" yaml:"sheets,omitempty"`       // XLSX only
	Table     Table    `json:"table,omitempty" yaml:"table,omitempty"`
	Relations []Table  `json:"relations,omitempty" yaml:"relations,omitempty"`
}

type Table

type Table struct {
	Name        string      `json:"name,omitempty" yaml:"name,omitempty"`
	Description *string     `json:"description,omitempty" yaml:"description,omitempty"`
	Filter      *string     `json:"filter,omitempty" yaml:"filter,omitempty"`
	Evaluator   *vm.Program `json:"-,omitempty" yaml:"-,omitempty"`
	Columns     []*Column   `json:"columns,omitempty" yaml:"columns,omitempty"`
}

Jump to

Keyboard shortcuts

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