MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / NewIncludeOptions

Function NewIncludeOptions

pkg/cmd/project/variables/include/include.go:47–59  ·  view source on GitHub ↗
(flags *IncludeFlags, dependencies *cmd.Dependencies)

Source from the content-addressed store, hash-verified

45}
46
47func NewIncludeOptions(flags *IncludeFlags, dependencies *cmd.Dependencies) *IncludeOptions {
48 return &IncludeOptions{
49 IncludeFlags: flags,
50 Dependencies: dependencies,
51 GetProjectCallback: func(identifier string) (*projects.Project, error) {
52 return shared.GetProject(dependencies.Client, identifier)
53 },
54 GetAllProjectsCallback: func() ([]*projects.Project, error) { return shared.GetAllProjects(dependencies.Client) },
55 GetAllLibraryVariableSetsCallback: func() ([]*variables.LibraryVariableSet, error) {
56 return sharedVariable.GetAllLibraryVariableSets(dependencies.Client)
57 },
58 }
59}
60
61func NewIncludeVariableSetCmd(f factory.Factory) *cobra.Command {
62 createFlags := NewIncludeVariableSetFlags()

Callers 1

NewIncludeVariableSetCmdFunction · 0.85

Calls 2

GetProjectFunction · 0.92
GetAllProjectsFunction · 0.92

Tested by

no test coverage detected