Help us shape the future of Go! Take the 2026 Go Developer Survey

hcl

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

The hcl package parses an input configuration file to create a database db.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBytes

func ParseBytes(bs []byte) (db.DatabaseNode, error)

Types

type Column

type Column struct {
	Type          string `hcl:"type"`
	NotNull       bool   `hcl:"not_null"`
	CastTypeUsing string `hcl:"cast_type_using"`
	Default       string `hcl:"default"`
	PrimaryKey    bool   `hcl:"primary_key"`
}

type Database

type Database struct {
	Extension map[string]Extension `hcl:"extension"`
	Schema    map[string]Schema    `hcl:"schema"`
}

type Extension

type Extension struct{}

type Index

type Index struct {
	On     []string `hcl:"on"`
	Unique bool     `hcl:"unique"`
}

type Schema

type Schema struct {
	Table map[string]Table `hcl:"table"`
}

type Table

type Table struct {
	PrimaryKey []string          `hcl:"primary_key"`
	Column     map[string]Column `hcl:"column"`
	Index      map[string]Index  `hcl:"index"`
}

Jump to

Keyboard shortcuts

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