spec

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package spec reads specs/*.go, type-checks the files and turns their gen tags into the schema model, reporting each problem with its position and, when possible, a suggestion.

Index

Constants

View Source
const (
	CodeSyntax               = "syntax"
	CodeBuildTag             = "build_tag"
	CodePackageName          = "package_name"
	CodeUnsupportedImport    = "unsupported_import"
	CodeUnsupportedDecl      = "unsupported_decl"
	CodeTypeError            = "type_error"
	CodeEntityCount          = "entity_count"
	CodeDomainName           = "domain_name"
	CodeReservedName         = "reserved_name"
	CodeUnexportedField      = "unexported_field"
	CodeEmbeddedField        = "embedded_field"
	CodeInvalidTag           = "invalid_tag"
	CodeUnsupportedTagKey    = "unsupported_tag_key"
	CodeUnsupportedType      = "unsupported_type"
	CodeUnknownMarker        = "unknown_marker"
	CodeMarkerScope          = "marker_scope"
	CodeDuplicateMarker      = "duplicate_marker"
	CodeInvalidValue         = "invalid_value"
	CodeInvalidCombination   = "invalid_combination"
	CodeMissingPK            = "missing_pk"
	CodeMultiplePK           = "multiple_pk"
	CodeUnknownEntity        = "unknown_entity"
	CodeUnknownField         = "unknown_field"
	CodeRelationTypeMismatch = "relation_type_mismatch"
	CodeRelationAmbiguous    = "relation_ambiguous"
	CodeRelationCycle        = "relation_cycle"
	CodeRelationRoutes       = "relation_routes"
	CodeDuplicateColumn      = "duplicate_column"
	CodeDuplicateJSON        = "duplicate_json"
	CodeDuplicateTable       = "duplicate_table"
	CodeNameCollision        = "name_collision"
)
View Source
const MinPasswordLength = 8

Variables

This section is empty.

Functions

func Parse

func Parse(sources []Source) (*schema.Model, schema.Diagnostics)

func Reference

func Reference() string

func ServiceName

func ServiceName(typeName string) string

Types

type DiagnosticDoc

type DiagnosticDoc struct {
	Code    string
	Meaning string
}

func Diagnostics

func Diagnostics() []DiagnosticDoc

type MarkerDoc

type MarkerDoc struct {
	Name        string
	Scope       string
	Syntax      string
	AppliesTo   string
	Description string
	Example     string
	CommonError string
}

func Markers

func Markers() []MarkerDoc

type Source

type Source struct {
	Name    string
	Content []byte
}

func LoadDir

func LoadDir(root, dir string) ([]Source, error)

Jump to

Keyboard shortcuts

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