grapicmd

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func ProvideExecer added in v0.3.0

func ProvideExecer(c *Ctx) exec.Interface

func ProvideFS added in v0.3.0

func ProvideFS(c *Ctx) afero.Fs

func ProvideIO added in v0.3.0

func ProvideIO(c *Ctx) *cli.IO

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 BuildConfig added in v0.3.0

type BuildConfig struct {
	AppName   string
	Version   string
	Revision  string
	BuildDate string
	Prebuilt  bool
}

BuildConfig contains the build metadata.

func ProvideBuildConfig added in v0.3.0

func ProvideBuildConfig(c *Ctx) *BuildConfig

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     *cli.IO

	RootDir cli.RootDir

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

Ctx contains the runtime context of grpai.

func (*Ctx) Init added in v0.3.0

func (c *Ctx) Init() error

Init initializes the runtime context.

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.

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