generator

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldInfo

type FieldInfo struct {
	FsTag      string
	Field      string
	FieldType  string
	IsUnique   bool
	IndexerTag string
	Indexes    []*IndexesInfo
}

type GenerateOption

type GenerateOption struct {
	OutputDir      string
	PackageName    string
	MockGenPath    string
	MockOutputPath string
	UseMetaField   bool
	Subcollection  bool
}

GenerateOption is a parameter to generate repository

func NewDefaultGenerateOption

func NewDefaultGenerateOption() GenerateOption

NewDefaultGenerateOption returns a default GenerateOption

type Generator

type Generator struct {
	AppVersion string
	// contains filtered or unexported fields
}

Generator generates firestore CRUD functions

func NewGenerator

func NewGenerator(dir string) (*Generator, error)

func (*Generator) Generate

func (g *Generator) Generate(structName string, opt GenerateOption) error

type IndexesInfo

type IndexesInfo struct {
	Comment   string
	ConstName string
	Label     string
	Method    string
	Use       bool
}

Directories

Path Synopsis
testfiles

Jump to

Keyboard shortcuts

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