faker

package
v0.0.0-...-ccd8cf7 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 12 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 {
	Name   string  `yaml:"name"`
	Tables []Table `yaml:"tables"`
}

type Faker

type Faker struct {
	Faker []DB `yaml:"faker"`
}

type Generator

type Generator struct {
	*bytes.Buffer
	// contains filtered or unexported fields
}

func NewGenerator

func NewGenerator(opts ...Option) *Generator

func (*Generator) GenFaker

func (g *Generator) GenFaker()

func (*Generator) P

func (g *Generator) P(str ...string)

func (*Generator) Parse

func (g *Generator) Parse(file string) error

type Option

type Option func(*Generator)

func WithLogger

func WithLogger(log log.Logger) Option

func WithPreview

func WithPreview(preview bool) Option

func WithWorkDir

func WithWorkDir(wd string) Option

type Table

type Table struct {
	Name   string   `yaml:"name"`
	Fields []string `yaml:"fields"`
}

Jump to

Keyboard shortcuts

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