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

Function NewCreateOptions

pkg/cmd/space/create/create.go:50–64  ·  view source on GitHub ↗
(f factory.Factory, flags *CreateFlags, c *cobra.Command)

Source from the content-addressed store, hash-verified

48}
49
50func NewCreateOptions(f factory.Factory, flags *CreateFlags, c *cobra.Command) *CreateOptions {
51 dependencies := cmd.NewSystemDependencies(f, c)
52 client, err := f.GetSystemClient(apiclient.NewRequester(c))
53 dependencies.Client = client // override the default space client
54 if err != nil {
55 panic(err)
56 }
57 return &CreateOptions{
58 CreateFlags: flags,
59 Dependencies: dependencies,
60 GetAllSpacesCallback: func() ([]*spaces.Space, error) { return shared.GetAllSpaces(*client) },
61 GetAllTeamsCallback: func() ([]*teams.Team, error) { return shared.GetAllTeams(*client) },
62 GetAllUsersCallback: func() ([]*users.User, error) { return shared.GetAllUsers(*client) },
63 }
64}
65
66func NewCreateFlags() *CreateFlags {
67 return &CreateFlags{

Callers 1

NewCmdCreateFunction · 0.70

Calls 6

NewSystemDependenciesFunction · 0.92
NewRequesterFunction · 0.92
GetAllSpacesFunction · 0.92
GetAllTeamsFunction · 0.92
GetAllUsersFunction · 0.92
GetSystemClientMethod · 0.65

Tested by

no test coverage detected