Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Organizations support #24

Merged
merged 23 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mutation (
$deployTarget: Int!,
$organization: Int!,){
addDeployTargetToOrganization(input: {
deployTarget: $deployTarget,
organization: $organization,
}) {
id
name
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
query (
$id: Int!) {
organizationById(
id: $id) {
deployTargets {
id
name
created
consoleUrl
cloudRegion
cloudProvider
friendlyName
token
shreddedbacon marked this conversation as resolved.
Show resolved Hide resolved
sshHost
sshPort
routerPattern
buildImage
monitoringConfig
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
query (
$name: String!) {
organizationByName(
name: $name) {
deployTargets {
id
name
created
consoleUrl
cloudRegion
cloudProvider
friendlyName
token
sshHost
sshPort
routerPattern
buildImage
monitoringConfig
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mutation (
$deployTarget: Int!,
$organization: Int!,){
removeDeployTargetFromOrganization(input: {
deployTarget: $deployTarget,
organization: $organization,
}) {
id
name
}
}
23 changes: 23 additions & 0 deletions api/lagoon/client/_lgraphql/organizations/addOrganization.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
mutation (
$name: String!,
$friendlyName: String,
$description: String,
$quotaProject: Int,
$quotaGroup: Int,
$quotaNotification: Int,
$quotaEnvironment: Int,
$quotaRoute: Int,) {
addOrganization(input: {
CGoodwin90 marked this conversation as resolved.
Show resolved Hide resolved
name: $name,
friendlyName: $friendlyName,
description: $description,
quotaProject: $quotaProject,
quotaGroup: $quotaGroup,
quotaNotification: $quotaNotification,
quotaEnvironment: $quotaEnvironment,
quotaRoute: $quotaRoute,
}) {
id
name
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mutation (
$id: Int!
){
deleteOrganization(
input: {
id: $id
}
)
}
13 changes: 13 additions & 0 deletions api/lagoon/client/_lgraphql/organizations/organizationById.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
query (
$id: Int!) {
organizationById(
CGoodwin90 marked this conversation as resolved.
Show resolved Hide resolved
id: $id) {
id
name
description
quotaProject
friendlyName
quotaGroup
quotaNotification
shreddedbacon marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
query (
$name: String!) {
organizationByName(
name: $name) {
id
name
description
quotaProject
friendlyName
quotaGroup
quotaNotification
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mutation (
$id: Int!
$patch: UpdateOrganizationPatchInput!){
updateOrganization(
input: {
id: $id
patch: $patch
}
){
id
name
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mutation (
shreddedbacon marked this conversation as resolved.
Show resolved Hide resolved
$project: Int!,
$organization: Int!,){
addProjectToOrganization(input: {
project: $project,
organization: $organization,
}) {
id
name
}
}
4 changes: 4 additions & 0 deletions api/lagoon/client/_lgraphql/projects/addProject.graphql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mutation (
$name: String!,
$organization: Int,
$gitUrl: String!,
$subfolder: String,
$openshift: Int!,
Expand All @@ -10,9 +11,11 @@ mutation (
$autoIdle: Int,
$storageCalc: Int,
$developmentEnvironmentsLimit: Int,
$addOrgOwner: Boolean,
$privateKey: String) {
addProject(input: {
name: $name,
organization: $organization,
gitUrl: $gitUrl,
subfolder: $subfolder,
openshift: $openshift,
Expand All @@ -23,6 +26,7 @@ mutation (
autoIdle: $autoIdle,
storageCalc: $storageCalc,
developmentEnvironmentsLimit: $developmentEnvironmentsLimit,
addOrgOwner: $addOrgOwner,
privateKey: $privateKey
}) {
id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ query (
developmentEnvironmentsLimit
gitUrl
autoIdle
organization
openshift{
id
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
query (
$id: Int!) {
organizationById(
id: $id) {
projects {
id
name
organization
groupCount
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mutation (
$project: Int!,
$organization: Int!,){
removeProjectFromOrganization(input: {
project: $project,
organization: $organization,
}) {
id
name
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mutation (
$name: String!,
$organization: Int!,){
addGroupToOrganization(input: {
name: $name,
organization: $organization,
}) {
id
name
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mutation (
$user: UserInput!,
$organization: Int!,
$owner: Boolean) {
addUserToOrganization(input: {
user: $user
organization: $organization
owner: $owner
}) {
id
name
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
query (
$id: Int!) {
organizationById(
id: $id) {
groups {
id
name
type
memberCount
organization
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mutation (
$user: UserInput!,
$organization: Int!,
$owner: Boolean) {
removeUserFromOrganization(input: {
user: $user
organization: $organization
owner: $owner
}) {
id
name
}
}
12 changes: 12 additions & 0 deletions api/lagoon/client/_lgraphql/usergroups/usersByOrganization.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
query (
$id: Int!) {
usersByOrganization(
organization: $id) {
id
email
firstName
lastName
owner
comment
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
query (
$name: String!) {
organizationByName(
name: $name) {
owners {
id
email
firstName
lastName
owner
comment
}
}
}
2 changes: 1 addition & 1 deletion api/lagoon/client/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:generate go-bindata -pkg lgraphql -o lgraphql/lgraphql.go -nometadata _lgraphql/ _lgraphql/deployments/ _lgraphql/deploytargets/ _lgraphql/deploytargetconfigs/ _lgraphql/projects/ _lgraphql/environments/ _lgraphql/tasks/ _lgraphql/usergroups/
//go:generate go-bindata -pkg lgraphql -o lgraphql/lgraphql.go -nometadata _lgraphql/ _lgraphql/deployments/ _lgraphql/deploytargets/ _lgraphql/deploytargetconfigs/ _lgraphql/projects/ _lgraphql/environments/ _lgraphql/tasks/ _lgraphql/usergroups/ _lgraphql/organizations/

// Package client implements the interfaces required by the parent lagoon
// package.
Expand Down
Loading