catalog

package
v0.0.0-...-ba062bd Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Example

func Example()

func FindField

func FindField(path string, fullTableName string, fieldName string) (msg *capnp.Message, field grizzly.Field, err error)

func FindTable

func FindTable(path string, fullTableName string) (msg *capnp.Message, table grizzly.Table, err error)

func (c catalog) findTable(msg *capnp.Message, fullTableName string) (table grizzly.Table) {

func WriteCsvTemplateFile

func WriteCsvTemplateFile(filePath string, fieldNames []string, fieldType []string)

Types

type Catalog

type Catalog struct {
	// contains filtered or unexported fields
}

func NewCatalog

func NewCatalog(reader io.Reader, writer io.Writer) *Catalog

func (*Catalog) ReadCapnp

func (c *Catalog) ReadCapnp()

func (*Catalog) ReadJson

func (c *Catalog) ReadJson()

func (*Catalog) WriteCapnp

func (c *Catalog) WriteCapnp(csvTemplateFilePath string)

func (*Catalog) WriteJson

func (c *Catalog) WriteJson()

type CatalogNode

type CatalogNode struct {
	Id          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

Used to print a JSON version of the catalog

type Database

type Database struct {
	CatalogNode
	Schemas []Schema `json:"schemas"`
}

type Field

type Field struct {
	CatalogNode
	Type        string `json:"type"`
	Description string `json:"description"`
	Usage       string `json:"usage"`
}

type Schema

type Schema struct {
	CatalogNode
	Tables []Table `json:"tables"`
}

type System

type System struct {
	CatalogNode
	Databases []Database `json:"databases"`
}

type Table

type Table struct {
	CatalogNode
	Fields []Field `json:"fields"`
}

Jump to

Keyboard shortcuts

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