env

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Path      string
	Main      bool
	Dir       string
	GoMod     string
	GoVersion string
}

Module contains the relative data of go module, which is the result of the command go list

func GetGoMod

func GetGoMod(workDir string) (*Module, error)

GetGoMod is used to determine whether workDir is a go module project through command `go list -json -m`

type PluginEnv

type PluginEnv struct {
	GoVersion          string
	GoModule           string `validate:"required"`
	SdkDir             string
	ScopeVersion       string   `validate:"required"` // scopeVersion
	ScopeVersions      []string // scopeVersions used for clientSet
	GatewayPrefix      string   // microservice gateway prefix
	IsWarpHTTPResponse bool     // is warped code, data, message
	// IsResourceExpansionUpdate bool     // is to update resource expansion
	PluginOutputPath string // plugin output path

	SpecifiedMethods []string // specified rpc methods
}

func GetPluginEnv

func GetPluginEnv() (*PluginEnv, error)

func (*PluginEnv) IsNeedGenerateGoMod

func (p *PluginEnv) IsNeedGenerateGoMod() bool

Jump to

Keyboard shortcuts

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