Skip to content

Commit

Permalink
Remove domain model (part 1 CLI) (#1137)
Browse files Browse the repository at this point in the history
* Remove domain model (part 1 CLI)

One of two PRs to remove the domain model before we launch

As discussed on slack, this PR strips out client side cmds for all
CRUD type operations in medic around orgs, roles, users , projects.

I also removed the old key generation code which we are not using
at present and have no immediate need to use.

Following this will be a PR to remove / disable the equivalent APIs

---------

Signed-off-by: Luke Hinds <luke@stacklok.com>
  • Loading branch information
lukehinds authored Oct 9, 2023
1 parent dd1cd89 commit 234f7c3
Show file tree
Hide file tree
Showing 27 changed files with 0 additions and 2,121 deletions.
14 changes: 0 additions & 14 deletions cmd/cli/app/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ import (
"gopkg.in/yaml.v3"

"github.com/stacklok/mediator/cmd/cli/app"
"github.com/stacklok/mediator/cmd/cli/app/org"
"github.com/stacklok/mediator/cmd/cli/app/project"
"github.com/stacklok/mediator/cmd/cli/app/role"
"github.com/stacklok/mediator/internal/util"
)

Expand Down Expand Up @@ -105,17 +102,6 @@ var ApplyCmd = &cobra.Command{
viper.Set(k, v)
}
}

if object.Object == "org" {
org.Org_createCmd.Run(cmd, args)
} else if object.Object == "role" {
role.Role_createCmd.Run(cmd, args)
} else if object.Object == "project" {
project.Project_createCmd.Run(cmd, args)
} else {
fmt.Fprintf(os.Stderr, "Error: unknown object type %s\n", object.Object)
os.Exit(1)
}
}
},
}
Expand Down
2 changes: 0 additions & 2 deletions cmd/cli/app/auth/auth_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ will be saved to $XDG_CONFIG_HOME/mediator/credentials.json`,

func renderNewUser(cmd *cobra.Command, newUser *pb.CreateUserResponse) {
rows := []table.Row{
{"Organization ID", newUser.OrganizationId},
{"Organization Name", newUser.OrganizatioName},
{"Project ID", newUser.ProjectId},
{"Project Name", newUser.ProjectName},
}
Expand Down
38 changes: 0 additions & 38 deletions cmd/cli/app/keys/keys.go

This file was deleted.

109 changes: 0 additions & 109 deletions cmd/cli/app/keys/keys_generate.go

This file was deleted.

44 changes: 0 additions & 44 deletions cmd/cli/app/org/org.go

This file was deleted.

87 changes: 0 additions & 87 deletions cmd/cli/app/org/org_create.go

This file was deleted.

77 changes: 0 additions & 77 deletions cmd/cli/app/org/org_delete.go

This file was deleted.

Loading

0 comments on commit 234f7c3

Please sign in to comment.