Documentation
¶
Index ¶
- Constants
- Variables
- func GetContextWithPerCommandTimeout(ctx context.Context) (context.Context, context.CancelFunc)
- func GetHomeDir() string
- func IsDebugMode(ctx context.Context) bool
- func IsDisableAction(ctx context.Context) bool
- func IsDryRun(ctx context.Context) bool
- func IsIgnoreDryRun(ctx context.Context) bool
- func PathForGlobalConfig() string
- func WithDebugMode(ctx context.Context) context.Context
- func WithDisableAction(ctx context.Context) context.Context
- func WithDryRun(ctx context.Context) context.Context
- func WithIgnoreDryRun(ctx context.Context) context.Context
- func WithPerCommandTimeout(ctx context.Context, timeout time.Duration) context.Context
Constants ¶
View Source
const ( // ConfigFileName defines the config file name ConfigFileName = "powerproto.yaml" // KeyNamePowerProtocInclude is the key name of powerproto default include KeyNamePowerProtocInclude = "POWERPROTO_INCLUDE" // The default include can be referenced by this key in import paths KeyPowerProtoInclude = "$" + KeyNamePowerProtocInclude KeyNameSourceRelative = "SOURCE_RELATIVE" KeyNameSourceName = "SOURCE_NAME" // KeySourceRelative can be specified in import paths to refer to // the folder where the current proto file is located KeySourceRelative = "$" + KeyNameSourceRelative // Defines the program directory of PowerProto, including various binary and include files EnvHomeDir = "POWERPROTO_HOME" // ProtobufRepository defines the protobuf repository ProtobufRepository = "https://github.com/protocolbuffers/protobuf" // GoogleAPIsRepository defines the google apis repository GoogleAPIsRepository = "https://github.com/googleapis/googleapis" )
defines a set of const value
Variables ¶
View Source
var ( TextExecuteAction = color.HiGreenString("EXECUTE ACTION") TextExecuteCommand = color.HiGreenString("EXECUTE COMMAND") TextDryRun = color.HiGreenString("DRY RUN") )
defines a set of text style
Functions ¶
func IsDebugMode ¶
IsDebugMode is used to decide whether to disable PostAction and PostShell
func IsDisableAction ¶
IsDisableAction is used to decide whether to disable PostAction and PostShell
func IsIgnoreDryRun ¶
IsIgnoreDryRun is used to determine whether it is currently in ignore DryRun mode
func PathForGlobalConfig ¶
func PathForGlobalConfig() string
PathForGlobalConfig is used to get path of global config
func WithDebugMode ¶
WithDebugMode is used to set debug mode
func WithDisableAction ¶
WithDisableAction is used to disable post action/shell
func WithDryRun ¶
WithDryRun is used to inject dryRun flag into context
func WithIgnoreDryRun ¶
WithIgnoreDryRun is used to inject ignore dryRun flag into context
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.