generator

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 24 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
	IsDocumentID   bool
	IndexerTag     string
	Indexes        []*IndexesInfo
	NullableFields []string
}

type GenerateOption

type GenerateOption struct {
	OutputDir                  string
	PackageName                string
	CollectionName             string
	MockGenPath                string
	MockOutputPath             string
	DisableMetaFieldsDetection 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
}

type UniqueInfo added in v1.2.0

type UniqueInfo struct {
	Field string
	FsTag string
}

Directories

Path Synopsis
testfiles
auto
Code generated by volcago.
Code generated by volcago.
auto/different_dir
Code generated by volcago.
Code generated by volcago.
auto/different_dir/mock/mock_lock_meta_gen
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.
auto/mock/mock_lock_gen
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.
auto/mock/mock_lock_meta2_gen
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.
auto/mock/mock_lock_meta_gen
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.
auto/mock/mock_sub_collection_gen
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.
auto/mock/mock_task_gen
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.
not_auto
Code generated by volcago.
Code generated by volcago.
not_auto/mock/mock_sub_task_gen
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.
not_auto/mock/mock_task_gen
Package mock_model is a generated GoMock package.
Package mock_model is a generated GoMock package.

Jump to

Keyboard shortcuts

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