Documentation
¶
Index ¶
- Variables
- func ProvideBuildConfig(c *Ctx) *clib.Build
- func ProvideExecer(c *Ctx) exec.Interface
- func ProvideFS(c *Ctx) afero.Fs
- func ProvideIO(c *Ctx) clib.IO
- func ProvideProtocConfig(c *Ctx) *protoc.Config
- func ProvideRootDir(c *Ctx) cli.RootDir
- func ProvideViper(c *Ctx) *viper.Viper
- type Config
- type Ctx
Constants ¶
This section is empty.
Variables ¶
View Source
var CtxSet = wire.NewSet(
ProvideFS,
ProvideViper,
ProvideExecer,
ProvideIO,
ProvideRootDir,
ProvideConfig,
ProvideBuildConfig,
ProvideProtocConfig,
)
CtxSet is a provider set that includes modules contained in Ctx.
Functions ¶
func ProvideBuildConfig ¶ added in v0.3.0
func ProvideBuildConfig(c *Ctx) *clib.Build
func ProvideExecer ¶ added in v0.3.0
func ProvideExecer(c *Ctx) exec.Interface
func ProvideProtocConfig ¶ added in v0.3.0
func ProvideProtocConfig(c *Ctx) *protoc.Config
func ProvideRootDir ¶ added in v0.3.0
func ProvideRootDir(c *Ctx) cli.RootDir
func ProvideViper ¶ added in v0.3.0
func ProvideViper(c *Ctx) *viper.Viper
Types ¶
type Config ¶
type Config struct {
Package string
Grapi struct {
ServerDir string
}
}
Config stores general setting params and provides accessors for them.
func ProvideConfig ¶ added in v0.3.0
func ProvideConfig(c *Ctx) *Config
type Ctx ¶ added in v0.3.0
type Ctx struct {
FS afero.Fs
Viper *viper.Viper
Execer exec.Interface
IO clib.IO
RootDir cli.RootDir
Config Config
Build clib.Build
ProtocConfig protoc.Config
// contains filtered or unexported fields
}
Ctx contains the runtime context of grpai.
func (*Ctx) IsInsideApp ¶ added in v0.3.0
func (c *Ctx) IsInsideApp() bool
IsInsideApp returns true if the current working directory is inside a grapi project.
Click to show internal directories.
Click to hide internal directories.