extract

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMongoModelImports

func AddMongoModelImports(data string, impt []string) (string, error)

func GetFileName

func GetFileName(structName, prefix string) (fileMongoName, fileIfName string)

func GetPkgName

func GetPkgName(structName string) string

Types

type IdlExtractStruct

type IdlExtractStruct struct {
	Name          string
	StructFields  []*StructField
	InterfaceInfo *InterfaceInfo
	UpdateInfo
}

type InterfaceInfo

type InterfaceInfo struct {
	Name    string
	Methods []*InterfaceMethod
}

type InterfaceMethod

type InterfaceMethod struct {
	Name             string
	ParsedTokens     string
	Params           code.Params
	Returns          code.Returns
	BelongedToStruct *IdlExtractStruct
}

type PbUsedInfo

type PbUsedInfo struct {
	DocArgs *config.DocArgument

	ImportPaths []string
	// contains filtered or unexported fields
}

func (*PbUsedInfo) GeneratePbFile

func (info *PbUsedInfo) GeneratePbFile() error

func (*PbUsedInfo) ParsePbIdl

func (info *PbUsedInfo) ParsePbIdl() (rawStructs []*IdlExtractStruct, err error)

type StructField

type StructField struct {
	Name               string
	Type               code.Type
	Tag                reflect.StructTag
	IsBelongedToStruct bool
	BelongedToStruct   *IdlExtractStruct
}

type ThriftUsedInfo

type ThriftUsedInfo struct {
	Req         *plugin.Request
	DocArgs     *config.DocArgument
	ImportPaths []string
}

func (*ThriftUsedInfo) ParseThriftIdl

func (info *ThriftUsedInfo) ParseThriftIdl() (rawStructs []*IdlExtractStruct, err error)

type UpdateInfo

type UpdateInfo struct {
	Update                bool
	UpdateCurdFileContent []byte
	UpdateIfFileContent   []byte
	PreMethodNamesMap     map[string]struct{}
	PreIfMethods          []*InterfaceMethod
}

Jump to

Keyboard shortcuts

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