sig

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldInfo added in v0.7.0

type FieldInfo struct {
	Name string

	Tag *TagInfo
	// contains filtered or unexported fields
}

func (*FieldInfo) ColumnName added in v0.7.0

func (fieldInfo *FieldInfo) ColumnName() string

ColumnName returns column name from field.

func (*FieldInfo) MaxValueFunc added in v0.7.0

func (fieldInfo *FieldInfo) MaxValueFunc() string

func (*FieldInfo) MinValueFunc added in v0.7.0

func (fieldInfo *FieldInfo) MinValueFunc() string

type ImportSpec added in v0.7.0

type ImportSpec struct {
	Path  string
	Ident string
}

type PackageInfo added in v0.7.0

type PackageInfo struct {
	CommandArgs []string
	ImportSpecs []*ImportSpec
	Structs     []*StructInfo
	// contains filtered or unexported fields
}

func Parse

func Parse(directoryPath string) (*PackageInfo, error)

func (*PackageInfo) CommandArguments added in v0.7.0

func (pkgInfo *PackageInfo) CommandArguments() string

func (*PackageInfo) Emit added in v0.7.0

func (pkgInfo *PackageInfo) Emit() ([]byte, error)

func (*PackageInfo) PackageIdent added in v0.7.0

func (pkgInfo *PackageInfo) PackageIdent() string

type StructInfo added in v0.7.0

type StructInfo struct {
	Name    string
	Private bool
	Fields  []*FieldInfo
	// contains filtered or unexported fields
}

func (*StructInfo) ColumnNamesMethod added in v0.7.0

func (structInfo *StructInfo) ColumnNamesMethod() string

func (*StructInfo) ColumnTypeSuffix added in v0.7.0

func (structInfo *StructInfo) ColumnTypeSuffix() string

func (*StructInfo) EnabledFields added in v0.7.0

func (structInfo *StructInfo) EnabledFields() []*FieldInfo

func (*StructInfo) SimpleName added in v0.7.0

func (structInfo *StructInfo) SimpleName() string

SimpleName returns struct type name.

func (*StructInfo) TableName added in v0.7.0

func (structInfo *StructInfo) TableName() string

TableName returns table name from struct.

func (*StructInfo) TableNameMethod added in v0.7.0

func (structInfo *StructInfo) TableNameMethod() string

func (*StructInfo) TableTypeSuffix added in v0.7.0

func (structInfo *StructInfo) TableTypeSuffix() string

func (*StructInfo) VarPrefix added in v0.7.0

func (structInfo *StructInfo) VarPrefix() string

type TagInfo added in v0.7.0

type TagInfo struct {
	TableName    string // e.g. `sig:"table=FooTable"`
	Name         string
	MinValueFunc string // e.g. `sig:"minValue=TimestampMinValue"`
	MaxValueFunc string // e.g. `sig:"maxValue=TimestampMaxValue"`
	Ignore       bool   // e.g. Secret string `spanner:"-"`
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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