Documentation
¶
Index ¶
Constants ¶
const ( ERROR = "error" NEW = "new" INITIALIZED = "initialized" INSPECTED = "inspected" AUDITED = "audited" CONVERTED = "converted" )
Variables ¶
This section is empty.
Functions ¶
func Abs ¶ added in v0.0.13
Abs returns the absolute path of a JSON file.
Resolve path for current project. Add missing json extension if needed. Resolve to internal json file for known file names.
Types ¶
type Config ¶ added in v0.0.2
type Config struct {
Schemas []string `comment:"Restrict to schemas matching one of these patterns."`
Scores map[string]float32
Convert Convert
Dump Dump
}
func (*Config) CheckRules ¶ added in v1.2.0
func (*Config) Merge ¶ added in v1.2.0
Merge another config in config
To prevent merging default initialized values, copy current config before reading another file. Then use [Merge] to effectively merge lists and maps.
Merges complexity scores maps. Merges DataTypes maps. Merges Convert.Rules array and each rule map. Merges Dump.Objects arrays. Overrides other values.
type Convert ¶ added in v0.22.0
type Convert struct {
PreserveCase bool
RenameConstraints bool
RenameIndexes bool
TrueValues []string
Rules []Rule
DataTypes map[string]string
// contains filtered or unexported fields
}
func (Convert) UnusedRules ¶ added in v1.0.0
type Dump ¶ added in v0.27.0
Dump holds dump configuration.
func (*Dump) MergeObjects ¶ added in v1.2.0
MergeObjects aggregate patterns
The purpose is to implement TOML and CLI args merging. d.Objects holds TOML patterns and input is the CLI args.
The final merged pattern list contains: - first the positive input patterns - then the negation from TOML - last, the negation from input
type Info ¶
type Info struct {
Creator string
Created time.Time
Driver string
Source ServerInfo
Target ServerInfo
}
type Project ¶
type Project struct {
Path string
Status string
Config Config
Info Info `json:"-"`
Source *dburl.URL `json:"-"`
Target *dburl.URL `json:"-"`
}
var Current Project
func (*Project) GuessStatus ¶ added in v0.0.10
func (Project) Json ¶ added in v0.0.2
Json reads named project JSON file
Use WriteJson to save to JSON file.