Documentation
¶
Overview ¶
Package zcontext is used to store the context information for the application.
Index ¶
Constants ¶
View Source
const ( KeyContext = "context" KeyProject = KeyContext + ".project" KeyProjectID = KeyProject + ".id" KeyProjectName = KeyProject + ".name" KeyEnvironment = KeyContext + ".environment" KeyEnvironmentID = KeyEnvironment + ".id" KeyEnvironmentName = KeyEnvironment + ".name" KeyService = KeyContext + ".service" KeyServiceID = KeyService + ".id" KeyServiceName = KeyService + ".name" )
Keys for context
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface {
GetProject() BasicInfo
SetProject(project BasicInfo)
ClearProject()
GetEnvironment() BasicInfo
SetEnvironment(environment BasicInfo)
ClearEnvironment()
GetService() BasicInfo
SetService(service BasicInfo)
ClearService()
ClearAll()
}
Context represents the current context of the CLI, including the current project, environment, service, etc.
func NewViperContext ¶
NewViperContext creates a new Context based on viper
Click to show internal directories.
Click to hide internal directories.