entity

package
v0.0.0-...-68c2de3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2016 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminUser

type AdminUser struct {
	Email    string `yaml:"email"`
	Password string `yaml:"password"`
}

AdminUser uses to mapping setting from /conf/setting.yml

func (*AdminUser) Equal

func (user *AdminUser) Equal(anotherUser *AdminUser) bool

Equal compares 2 user

type Column

type Column struct {
	Name        string `db:"column_name" json:"name"`
	Nullable    string `db:"is_nullable" json:"-"`
	DataType    string `db:"udt_name" json:"data_type"`
	TableName   string `db:"table_schema" json:"-"`
	TableSchema string `db:"table_name" json:"table_name"`
	PrimaryKey  bool   `db:"primary_key" json:"primary"`
	IsSequence  bool   `db:"is_sequence" json:"is_sequence"`
}

Column entity in table `information_schema.columns`

func NewColumn

func NewColumn(name string, nullable string, dataType string) Column

NewColumn create an instance of `Column` entity

type Setting

type Setting struct {
	Database struct {
		ConnectionString string `yaml:"connection-string"`
		Type             string `yaml:"type"`
	} `yaml:"database"`
}

Use to mapping setting from /conf/setting.yml

type Table

type Table struct {
	Schema     string `db:"table_schema" json:"-"`
	Name       string `db:"table_name" json:"name"`
	PrimaryKey string `db:"primary_key" json:"primary_key"`
}

Table entity in table `information_schema.tables`

func NewTable

func NewTable(schema string, name string) Table

NewTable create an instance of `Table` entity

Jump to

Keyboard shortcuts

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