Documentation
¶
Overview ¶
Package generator stores global variables
Index ¶
- Variables
- func GetDir(rootDir string, dirType DirType) string
- type DirType
- type ImportType
- type KitFs
- func (kf *KitFs) Copy(sourcePath, destPath string) error
- func (kf *KitFs) Exists(path string) (bool, error)
- func (kf *KitFs) IsDir(path string) (bool, error)
- func (kf *KitFs) MakeDir(path string) error
- func (kf *KitFs) ReadFile(path string) ([]byte, error)
- func (kf *KitFs) WriteFile(path string, data []byte, force bool) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServiceNotFound = errors.New("service not found") ErrProtocNotFound = errors.New("protoc not found") ErrInvalidGeneratorParameters = errors.New("invalid base generator parameters") ErrInterfaceNotFound = errors.New("interface not found") ErrMethodNotFound = errors.New("method not found") ErrFuncTypeNotFound = errors.New("funcType not found") ErrVarNotFound = errors.New("var not found") ErrConstNotFound = errors.New("const not found") ErrStructureNotFound = errors.New("structure not found") )
View Source
var ( ImportPaths = map[ImportType]string{ HdSdk: "github.com/hdget/hdsdk", HdSdkTypes: "github.com/hdget/hdsdk/types", HdUtils: "github.com/hdget/hdsdk/utils", HdWs: "github.com/hdget/hdsdk/lib/ws", HdParallel: "github.com/hdget/hdsdk/utils/parallel", KitEndpoint: "github.com/go-kit/kit/endpoint", KitGrpc: "github.com/go-kit/kit/transport/grpc", KitHttp: "github.com/go-kit/kit/transport/http", Cobra: "github.com/spf13/cobra", Errors: "github.com/pkg/errors", StdGrpc: "google.golang.org/grpc", StdHttp: "net/http", StdJson: "encoding/json", DaprGrpc: "github.com/dapr/go-sdk/service/grpc", DaprHttp: "github.com/dapr/go-sdk/service/http", DaprCommon: "github.com/dapr/go-sdk/service/common", } )
Functions ¶
Types ¶
type DirType ¶
type DirType int
const ( Binary DirType Proto Global Config Service Pb Grpc Http Cmd Setting )
type ImportType ¶
type ImportType int
const ( HdSdk ImportType HdSdkTypes HdUtils HdWs HdParallel KitEndpoint KitGrpc KitHttp DaprGrpc DaprHttp DaprCommon Cobra Errors StdGrpc StdHttp StdJson )
type KitFs ¶
KitFs wraps an afero.Fs
func GetFs ¶
func GetFs() *KitFs
GetFs returns a new KitFs if it was not initiated before or it returns the existing gKitFs if it is initiated.
func (*KitFs) Exists ¶
Exists returns true,nil if the dir/file exists or false,nil if the dir/file does not exist, it will return an error if something went wrong.
Click to show internal directories.
Click to hide internal directories.