libService

package
v0.0.0-...-480cc5f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceDTOCodeTemplate = `` /* 417-byte string literal not displayed */
View Source
const ServiceImplementCodeTemplate = `` /* 803-byte string literal not displayed */
View Source
const ServiceInterfaceCodeTemplate = `` /* 442-byte string literal not displayed */

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdParams

type CmdParams struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	IOutputPath string `json:"interface_output_path"`
	MOutputPath string `json:"implement_output_path"`
	DOutputPath string `json:"dto_output_path"`
}

type Field

type Field struct {
	Name      string
	Type      string
	StructTag string
	Comment   string
}

struct列信息结构体

type FormatterServiceDto

type FormatterServiceDto struct {
	FormatterStruct
}

func NewFormatterServiceDto

func NewFormatterServiceDto() *FormatterServiceDto

func (*FormatterServiceDto) Format

func (f *FormatterServiceDto) Format(name, version string) IFormatter

func (*FormatterServiceDto) WriteOut

func (f *FormatterServiceDto) WriteOut(writer io.Writer) error

type FormatterServiceImplement

type FormatterServiceImplement struct {
	FormatterStruct
}

func NewFormatterServiceImplement

func NewFormatterServiceImplement() *FormatterServiceImplement

func (*FormatterServiceImplement) Format

func (f *FormatterServiceImplement) Format(name, version string) IFormatter

func (*FormatterServiceImplement) WriteOut

func (f *FormatterServiceImplement) WriteOut(writer io.Writer) error

type FormatterServiceInterface

type FormatterServiceInterface struct {
	FormatterStruct
}

func NewFormatterServiceInterface

func NewFormatterServiceInterface() *FormatterServiceInterface

func (*FormatterServiceInterface) Format

func (f *FormatterServiceInterface) Format(name, version string) IFormatter

func (*FormatterServiceInterface) WriteOut

func (f *FormatterServiceInterface) WriteOut(writer io.Writer) error

type FormatterStruct

type FormatterStruct struct {
	PackageName string
	ImportList  map[string]ImportItem
	Name        string
	StructName  string
	Version     string
	FieldList   []Field
}

格式化信息结构体

type IFormatter

type IFormatter interface {
	Format(name, version string) IFormatter
	WriteOut(writer io.Writer) error
}

type ImportItem

type ImportItem struct {
	Alias   string
	Package string
}

Jump to

Keyboard shortcuts

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