gogencmd

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

CtxSet is a provider set that includes modules contained in Ctx.

Functions

func ProvideBuildConfig

func ProvideBuildConfig(c *Ctx) *build.Build

func ProvideExecer

func ProvideExecer(c *Ctx) exec.Interface

func ProvideFS

func ProvideFS(c *Ctx) afero.Fs

func ProvideIO

func ProvideIO(c *Ctx) io.IO

func ProvideProtocConfig

func ProvideProtocConfig(c *Ctx) *protoc.Config

func ProvideRootDir

func ProvideRootDir(c *Ctx) cli.RootDir

func ProvideViper

func ProvideViper(c *Ctx) *viper.Viper

Types

type Config

type Config struct {
	Package string
	Gogen   struct {
		ServerDir string
	}
}

Config stores general setting params and provides accessors for them.

func ProvideConfig

func ProvideConfig(c *Ctx) *Config

type Ctx

type Ctx struct {
	FS     afero.Fs
	Viper  *viper.Viper
	Execer exec.Interface
	IO     io.IO

	RootDir cli.RootDir

	Config       Config
	Build        build.Build
	ProtocConfig protoc.Config
	// contains filtered or unexported fields
}

Ctx contains the runtime context of grpai.

func (*Ctx) Init

func (c *Ctx) Init() error

Init initializes the runtime context.

func (*Ctx) IsInsideApp

func (c *Ctx) IsInsideApp() bool

IsInsideApp returns true if the current working directory is inside a gogen project.

Directories

Path Synopsis
internal
module/testing
Package moduletesting is a generated GoMock package.
Package moduletesting is a generated GoMock package.
util
fs

Jump to

Keyboard shortcuts

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