tagger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db struct{}

Db is the standard "db"-tag.

func (Db) GenerateTag

func (t Db) GenerateTag(db database.Database, column database.Column) string

GenerateTag for Db to satisfy the Tagger interface.

type Mastermind

type Mastermind struct{}

Mastermind represents the Masterminds/structable "stbl"-tag.

func (Mastermind) GenerateTag

func (t Mastermind) GenerateTag(db database.Database, column database.Column) string

GenerateTag for Mastermind to satisfy the Tagger interface.

type Tagger

type Tagger interface {
	GenerateTag(db database.Database, column database.Column) string
}

Tagger interface for types of struct-tags.

type Taggers

type Taggers struct {
	// contains filtered or unexported fields
}

Taggers represents the supported tags to generate.

func NewTaggers

func NewTaggers(s *settings.Settings) *Taggers

NewTaggers is the constructor function to create the supported taggers.

func (*Taggers) GenerateTag

func (t *Taggers) GenerateTag(db database.Database, column database.Column) (tags string)

GenerateTag creates based on the enabled tags and the given database and column the tag for the struct field.

Jump to

Keyboard shortcuts

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