diff --git a/client.go b/client.go index 3cc98cb..388e0b6 100644 --- a/client.go +++ b/client.go @@ -117,6 +117,7 @@ type RootMutationType struct { CreateArtifact *Artifact "json:\"createArtifact\" graphql:\"createArtifact\"" CreateCard *Account "json:\"createCard\" graphql:\"createCard\"" CreateCluster *Cluster "json:\"createCluster\" graphql:\"createCluster\"" + CreateClusterDependency *ClusterDependency "json:\"createClusterDependency\" graphql:\"createClusterDependency\"" CreateCrd *Crd "json:\"createCrd\" graphql:\"createCrd\"" CreateDemoProject *DemoProject "json:\"createDemoProject\" graphql:\"createDemoProject\"" CreateDNSRecord *DNSRecord "json:\"createDnsRecord\" graphql:\"createDnsRecord\"" @@ -196,6 +197,7 @@ type RootMutationType struct { OauthConsent *OauthResponse "json:\"oauthConsent\" graphql:\"oauthConsent\"" PasswordlessLogin *User "json:\"passwordlessLogin\" graphql:\"passwordlessLogin\"" PingWebhook *WebhookResponse "json:\"pingWebhook\" graphql:\"pingWebhook\"" + Promote *User "json:\"promote\" graphql:\"promote\"" ProvisionDomain *DNSDomain "json:\"provisionDomain\" graphql:\"provisionDomain\"" PublishLogs *TestStep "json:\"publishLogs\" graphql:\"publishLogs\"" QuickStack *Stack "json:\"quickStack\" graphql:\"quickStack\"" @@ -491,6 +493,14 @@ type KeyBackupFragment struct { Repositories []string "json:\"repositories\" graphql:\"repositories\"" InsertedAt *string "json:\"insertedAt\" graphql:\"insertedAt\"" } +type ClusterFragment struct { + ID string "json:\"id\" graphql:\"id\"" + Name string "json:\"name\" graphql:\"name\"" + Provider Provider "json:\"provider\" graphql:\"provider\"" + Source *Source "json:\"source\" graphql:\"source\"" + GitURL *string "json:\"gitUrl\" graphql:\"gitUrl\"" + Owner *UserFragment "json:\"owner\" graphql:\"owner\"" +} type ListArtifacts struct { Repository *struct { Artifacts []*ArtifactFragment "json:\"artifacts\" graphql:\"artifacts\"" @@ -545,6 +555,41 @@ type UninstallChart struct { type DestroyCluster struct { DestroyCluster *bool "json:\"destroyCluster\" graphql:\"destroyCluster\"" } +type Clusters struct { + Clusters *struct { + PageInfo struct { + HasNextPage bool "json:\"hasNextPage\" graphql:\"hasNextPage\"" + EndCursor *string "json:\"endCursor\" graphql:\"endCursor\"" + } "json:\"pageInfo\" graphql:\"pageInfo\"" + Edges []*struct { + Node *ClusterFragment "json:\"node\" graphql:\"node\"" + } "json:\"edges\" graphql:\"edges\"" + } "json:\"clusters\" graphql:\"clusters\"" +} +type ClusterInfo struct { + Cluster *struct { + ID string "json:\"id\" graphql:\"id\"" + Name string "json:\"name\" graphql:\"name\"" + Provider Provider "json:\"provider\" graphql:\"provider\"" + Source *Source "json:\"source\" graphql:\"source\"" + GitURL *string "json:\"gitUrl\" graphql:\"gitUrl\"" + Owner *UserFragment "json:\"owner\" graphql:\"owner\"" + UpgradeInfo []*struct { + Installation *struct { + Repository *RepositoryFragment "json:\"repository\" graphql:\"repository\"" + } "json:\"installation\" graphql:\"installation\"" + Count *int64 "json:\"count\" graphql:\"count\"" + } "json:\"upgradeInfo\" graphql:\"upgradeInfo\"" + } "json:\"cluster\" graphql:\"cluster\"" +} +type CreateDependency struct { + CreateClusterDependency *struct { + ID string "json:\"id\" graphql:\"id\"" + } "json:\"createClusterDependency\" graphql:\"createClusterDependency\"" +} +type PromoteCluster struct { + Promote *UserFragment "json:\"promote\" graphql:\"promote\"" +} type GetDNSRecords struct { DNSRecords *struct { Edges []*struct { @@ -1037,24 +1082,6 @@ const GetChartInstallationsDocument = `query GetChartInstallations ($id: ID!) { } } } -fragment ChartInstallationFragment on ChartInstallation { - id - chart { - ... ChartFragment - dependencies { - ... DependenciesFragment - } - } - version { - ... VersionFragment - } -} -fragment ChartFragment on Chart { - id - name - description - latestVersion -} fragment DependenciesFragment on Dependencies { dependencies { type @@ -1099,6 +1126,24 @@ fragment CrdFragment on Crd { name blob } +fragment ChartInstallationFragment on ChartInstallation { + id + chart { + ... ChartFragment + dependencies { + ... DependenciesFragment + } + } + version { + ... VersionFragment + } +} +fragment ChartFragment on Chart { + id + name + description + latestVersion +} ` func (c *Client) GetChartInstallations(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*GetChartInstallations, error) { @@ -1130,31 +1175,6 @@ const GetPackageInstallationsDocument = `query GetPackageInstallations ($id: ID! } } } -fragment DependenciesFragment on Dependencies { - dependencies { - type - name - repo - optional - version - } - breaking - instructions { - instructions - script - } - wait - application - providers - secrets - wirings { - terraform - helm - } - providerWirings - outputs - providerVsn -} fragment VersionFragment on Version { id readme @@ -1211,6 +1231,31 @@ fragment ChartFragment on Chart { description latestVersion } +fragment DependenciesFragment on Dependencies { + dependencies { + type + name + repo + optional + version + } + breaking + instructions { + instructions + script + } + wait + application + providers + secrets + wirings { + terraform + helm + } + providerWirings + outputs + providerVsn +} ` func (c *Client) GetPackageInstallations(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*GetPackageInstallations, error) { @@ -1288,6 +1333,150 @@ func (c *Client) DestroyCluster(ctx context.Context, domain string, name string, return &res, nil } +const ClustersDocument = `query Clusters ($cursor: String) { + clusters(first: 50, after: $cursor) { + pageInfo { + hasNextPage + endCursor + } + edges { + node { + ... ClusterFragment + } + } + } +} +fragment ClusterFragment on Cluster { + id + name + provider + source + gitUrl + owner { + ... UserFragment + } +} +fragment UserFragment on User { + id + name + email +} +` + +func (c *Client) Clusters(ctx context.Context, cursor *string, httpRequestOptions ...client.HTTPRequestOption) (*Clusters, error) { + vars := map[string]interface{}{ + "cursor": cursor, + } + + var res Clusters + if err := c.Client.Post(ctx, "Clusters", ClustersDocument, &res, vars, httpRequestOptions...); err != nil { + return nil, err + } + + return &res, nil +} + +const ClusterInfoDocument = `query ClusterInfo ($id: ID!) { + cluster(id: $id) { + ... ClusterFragment + upgradeInfo { + installation { + repository { + ... RepositoryFragment + } + } + count + } + } +} +fragment ClusterFragment on Cluster { + id + name + provider + source + gitUrl + owner { + ... UserFragment + } +} +fragment UserFragment on User { + id + name + email +} +fragment RepositoryFragment on Repository { + id + name + notes + icon + darkIcon + description + publisher { + name + } + recipes { + name + } +} +` + +func (c *Client) ClusterInfo(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*ClusterInfo, error) { + vars := map[string]interface{}{ + "id": id, + } + + var res ClusterInfo + if err := c.Client.Post(ctx, "ClusterInfo", ClusterInfoDocument, &res, vars, httpRequestOptions...); err != nil { + return nil, err + } + + return &res, nil +} + +const CreateDependencyDocument = `mutation CreateDependency ($sourceId: ID!, $destId: ID!) { + createClusterDependency(sourceId: $sourceId, destId: $destId) { + id + } +} +` + +func (c *Client) CreateDependency(ctx context.Context, sourceID string, destID string, httpRequestOptions ...client.HTTPRequestOption) (*CreateDependency, error) { + vars := map[string]interface{}{ + "sourceId": sourceID, + "destId": destID, + } + + var res CreateDependency + if err := c.Client.Post(ctx, "CreateDependency", CreateDependencyDocument, &res, vars, httpRequestOptions...); err != nil { + return nil, err + } + + return &res, nil +} + +const PromoteClusterDocument = `mutation PromoteCluster { + promote { + ... UserFragment + } +} +fragment UserFragment on User { + id + name + email +} +` + +func (c *Client) PromoteCluster(ctx context.Context, httpRequestOptions ...client.HTTPRequestOption) (*PromoteCluster, error) { + vars := map[string]interface{}{} + + var res PromoteCluster + if err := c.Client.Post(ctx, "PromoteCluster", PromoteClusterDocument, &res, vars, httpRequestOptions...); err != nil { + return nil, err + } + + return &res, nil +} + const GetDNSRecordsDocument = `query GetDnsRecords ($cluster: String!, $provider: Provider!) { dnsRecords(cluster: $cluster, provider: $provider, first: 500) { edges { @@ -1470,29 +1659,6 @@ const GetInstallationByIDDocument = `query GetInstallationById ($id: ID) { ... InstallationFragment } } -fragment OIDCProvider on OidcProvider { - id - clientId - clientSecret - redirectUris - bindings { - user { - id - email - } - group { - id - name - } - } - configuration { - issuer - authorizationEndpoint - tokenEndpoint - jwksUri - userinfoEndpoint - } -} fragment InstallationFragment on Installation { id context @@ -1520,6 +1686,29 @@ fragment RepositoryFragment on Repository { name } } +fragment OIDCProvider on OidcProvider { + id + clientId + clientSecret + redirectUris + bindings { + user { + id + email + } + group { + id + name + } + } + configuration { + issuer + authorizationEndpoint + tokenEndpoint + jwksUri + userinfoEndpoint + } +} ` func (c *Client) GetInstallationByID(ctx context.Context, id *string, httpRequestOptions ...client.HTTPRequestOption) (*GetInstallationByID, error) { @@ -1672,19 +1861,72 @@ const GetRecipeDocument = `query GetRecipe ($repo: String, $name: String) { } } } -fragment RecipeConfigurationFragment on RecipeConfiguration { - name - type - default - documentation - optional - placeholder - functionName - condition { - field - operation - value - } +fragment RecipeItemFragment on RecipeItem { + id + chart { + ... ChartFragment + } + terraform { + ... TerraformFragment + } + configuration { + ... RecipeConfigurationFragment + } +} +fragment ChartFragment on Chart { + id + name + description + latestVersion +} +fragment TerraformFragment on Terraform { + id + name + package + description + dependencies { + ... DependenciesFragment + } + valuesTemplate +} +fragment DependenciesFragment on Dependencies { + dependencies { + type + name + repo + optional + version + } + breaking + instructions { + instructions + script + } + wait + application + providers + secrets + wirings { + terraform + helm + } + providerWirings + outputs + providerVsn +} +fragment RecipeConfigurationFragment on RecipeConfiguration { + name + type + default + documentation + optional + placeholder + functionName + condition { + field + operation + value + } validation { type regex @@ -1748,59 +1990,6 @@ fragment RepositoryFragment on Repository { name } } -fragment RecipeItemFragment on RecipeItem { - id - chart { - ... ChartFragment - } - terraform { - ... TerraformFragment - } - configuration { - ... RecipeConfigurationFragment - } -} -fragment ChartFragment on Chart { - id - name - description - latestVersion -} -fragment TerraformFragment on Terraform { - id - name - package - description - dependencies { - ... DependenciesFragment - } - valuesTemplate -} -fragment DependenciesFragment on Dependencies { - dependencies { - type - name - repo - optional - version - } - breaking - instructions { - instructions - script - } - wait - application - providers - secrets - wirings { - terraform - helm - } - providerWirings - outputs - providerVsn -} ` func (c *Client) GetRecipe(ctx context.Context, repo *string, name *string, httpRequestOptions ...client.HTTPRequestOption) (*GetRecipe, error) { @@ -1826,37 +2015,6 @@ const ListRecipesDocument = `query ListRecipes ($repo: String, $provider: Provid } } } -fragment RecipeFragment on Recipe { - id - name - description - restricted - provider - tests { - type - name - message - args { - name - repo - key - } - } - repository { - id - name - } - oidcSettings { - uriFormat - uriFormats - authMethod - domainKey - subdomain - } - recipeSections { - ... RecipeSectionFragment - } -} fragment RecipeSectionFragment on RecipeSection { index repository { @@ -1955,6 +2113,37 @@ fragment RecipeConfigurationFragment on RecipeConfiguration { message } } +fragment RecipeFragment on Recipe { + id + name + description + restricted + provider + tests { + type + name + message + args { + name + repo + key + } + } + repository { + id + name + } + oidcSettings { + uriFormat + uriFormats + authMethod + domainKey + subdomain + } + recipeSections { + ... RecipeSectionFragment + } +} ` func (c *Client) ListRecipes(ctx context.Context, repo *string, provider *Provider, httpRequestOptions ...client.HTTPRequestOption) (*ListRecipes, error) { @@ -1980,32 +2169,6 @@ const ListAllRecipesDocument = `query ListAllRecipes ($repo: String) { } } } -fragment RecipeSectionFragment on RecipeSection { - index - repository { - ... RepositoryFragment - } - recipeItems { - ... RecipeItemFragment - } - configuration { - ... RecipeConfigurationFragment - } -} -fragment RepositoryFragment on Repository { - id - name - notes - icon - darkIcon - description - publisher { - name - } - recipes { - name - } -} fragment RecipeItemFragment on RecipeItem { id chart { @@ -2109,6 +2272,32 @@ fragment RecipeFragment on Recipe { ... RecipeSectionFragment } } +fragment RecipeSectionFragment on RecipeSection { + index + repository { + ... RepositoryFragment + } + recipeItems { + ... RecipeItemFragment + } + configuration { + ... RecipeConfigurationFragment + } +} +fragment RepositoryFragment on Repository { + id + name + notes + icon + darkIcon + description + publisher { + name + } + recipes { + name + } +} ` func (c *Client) ListAllRecipes(ctx context.Context, repo *string, httpRequestOptions ...client.HTTPRequestOption) (*ListAllRecipes, error) { @@ -2190,30 +2379,45 @@ const GetStackDocument = `query GetStack ($name: String!, $provider: Provider!) ... StackFragment } } -fragment DependenciesFragment on Dependencies { - dependencies { +fragment StackFragment on Stack { + id + name + featured + description + bundles { + ... RecipeFragment + } +} +fragment RecipeFragment on Recipe { + id + name + description + restricted + provider + tests { type name - repo - optional - version + message + args { + name + repo + key + } } - breaking - instructions { - instructions - script + repository { + id + name } - wait - application - providers - secrets - wirings { - terraform - helm + oidcSettings { + uriFormat + uriFormats + authMethod + domainKey + subdomain + } + recipeSections { + ... RecipeSectionFragment } - providerWirings - outputs - providerVsn } fragment RecipeSectionFragment on RecipeSection { index @@ -2251,12 +2455,49 @@ fragment TerraformFragment on Terraform { } valuesTemplate } +fragment RecipeItemFragment on RecipeItem { + id + chart { + ... ChartFragment + } + terraform { + ... TerraformFragment + } + configuration { + ... RecipeConfigurationFragment + } +} fragment ChartFragment on Chart { id name description latestVersion } +fragment DependenciesFragment on Dependencies { + dependencies { + type + name + repo + optional + version + } + breaking + instructions { + instructions + script + } + wait + application + providers + secrets + wirings { + terraform + helm + } + providerWirings + outputs + providerVsn +} fragment RecipeConfigurationFragment on RecipeConfiguration { name type @@ -2276,58 +2517,6 @@ fragment RecipeConfigurationFragment on RecipeConfiguration { message } } -fragment StackFragment on Stack { - id - name - featured - description - bundles { - ... RecipeFragment - } -} -fragment RecipeFragment on Recipe { - id - name - description - restricted - provider - tests { - type - name - message - args { - name - repo - key - } - } - repository { - id - name - } - oidcSettings { - uriFormat - uriFormats - authMethod - domainKey - subdomain - } - recipeSections { - ... RecipeSectionFragment - } -} -fragment RecipeItemFragment on RecipeItem { - id - chart { - ... ChartFragment - } - terraform { - ... TerraformFragment - } - configuration { - ... RecipeConfigurationFragment - } -} ` func (c *Client) GetStack(ctx context.Context, name string, provider Provider, httpRequestOptions ...client.HTTPRequestOption) (*GetStack, error) { @@ -2384,6 +2573,18 @@ fragment RecipeFragment on Recipe { ... RecipeSectionFragment } } +fragment RecipeSectionFragment on RecipeSection { + index + repository { + ... RepositoryFragment + } + recipeItems { + ... RecipeItemFragment + } + configuration { + ... RecipeConfigurationFragment + } +} fragment RepositoryFragment on Repository { id name @@ -2398,6 +2599,12 @@ fragment RepositoryFragment on Repository { name } } +fragment ChartFragment on Chart { + id + name + description + latestVersion +} fragment TerraformFragment on Terraform { id name @@ -2433,6 +2640,25 @@ fragment DependenciesFragment on Dependencies { outputs providerVsn } +fragment RecipeConfigurationFragment on RecipeConfiguration { + name + type + default + documentation + optional + placeholder + functionName + condition { + field + operation + value + } + validation { + type + regex + message + } +} fragment StackFragment on Stack { id name @@ -2442,18 +2668,6 @@ fragment StackFragment on Stack { ... RecipeFragment } } -fragment RecipeSectionFragment on RecipeSection { - index - repository { - ... RepositoryFragment - } - recipeItems { - ... RecipeItemFragment - } - configuration { - ... RecipeConfigurationFragment - } -} fragment RecipeItemFragment on RecipeItem { id chart { @@ -2466,31 +2680,6 @@ fragment RecipeItemFragment on RecipeItem { ... RecipeConfigurationFragment } } -fragment ChartFragment on Chart { - id - name - description - latestVersion -} -fragment RecipeConfigurationFragment on RecipeConfiguration { - name - type - default - documentation - optional - placeholder - functionName - condition { - field - operation - value - } - validation { - type - regex - message - } -} ` func (c *Client) ListStacks(ctx context.Context, featured *bool, cursor *string, httpRequestOptions ...client.HTTPRequestOption) (*ListStacks, error) { @@ -2928,6 +3117,15 @@ const GetTerraformInstallationsDocument = `query GetTerraformInstallations ($id: } } } +fragment TerraformInstallationFragment on TerraformInstallation { + id + terraform { + ... TerraformFragment + } + version { + ... VersionFragment + } +} fragment TerraformFragment on Terraform { id name @@ -2982,15 +3180,6 @@ fragment CrdFragment on Crd { name blob } -fragment TerraformInstallationFragment on TerraformInstallation { - id - terraform { - ... TerraformFragment - } - version { - ... VersionFragment - } -} ` func (c *Client) GetTerraformInstallations(ctx context.Context, id string, httpRequestOptions ...client.HTTPRequestOption) (*GetTerraformInstallations, error) { diff --git a/go.mod b/go.mod index 2cf38e5..ea0a674 100644 --- a/go.mod +++ b/go.mod @@ -3,29 +3,29 @@ module github.com/pluralsh/gqlclient go 1.18 require ( - github.com/Yamashou/gqlgenc v0.11.0 + github.com/Yamashou/gqlgenc v0.0.8 github.com/schollz/progressbar/v3 v3.8.6 ) require ( github.com/agnivade/levenshtein v1.1.1 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/urfave/cli/v2 v2.8.1 // indirect + github.com/urfave/cli/v2 v2.25.0 // indirect github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/text v0.3.7 // indirect - golang.org/x/tools v0.1.12 // indirect + golang.org/x/mod v0.9.0 // indirect + golang.org/x/text v0.8.0 // indirect + golang.org/x/tools v0.7.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( - github.com/99designs/gqlgen v0.17.20 + github.com/99designs/gqlgen v0.17.26 github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/vektah/gqlparser/v2 v2.5.1 // indirect golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 // indirect - golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect + golang.org/x/sys v0.6.0 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect ) diff --git a/go.sum b/go.sum index 115d61f..8ec7fb0 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,9 @@ -github.com/99designs/gqlgen v0.17.20 h1:O7WzccIhKB1dm+7g6dhQcULINftfiLSBg2l/mwbpJMw= -github.com/99designs/gqlgen v0.17.20/go.mod h1:Mja2HI23kWT1VRH09hvWshFgOzKswpO20o4ScpJIES4= +github.com/99designs/gqlgen v0.17.10/go.mod h1:tjgUrZGpynt+w38zmgTn5QGgd3EUhkHa4VRcX6/AyGo= +github.com/99designs/gqlgen v0.17.26 h1:fxgSTbPf1G30uWAWSoHd+9gSNMagmP04k58ThJ1/ikQ= +github.com/99designs/gqlgen v0.17.26/go.mod h1:i4rEatMrzzu6RXaHydq1nmEPZkb3bKQsnxNRHS4DQB4= github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/Yamashou/gqlgenc v0.11.0 h1:y6I7CDrUdY4JBxfwss9168HTP5k/CdExLV5+YPG/3nY= -github.com/Yamashou/gqlgenc v0.11.0/go.mod h1:OeQhghEgvGWvRwzx9XjMeg3FUQOHnTo5/12iuJSJxLg= +github.com/Yamashou/gqlgenc v0.0.8 h1:rHS4gQtDaq98UmjzlYusGPjokHzeytbEOXS0oJd78nQ= +github.com/Yamashou/gqlgenc v0.0.8/go.mod h1:ehD6EFAAHi1q/k5GSsW7WPnVYM+aO6N5zsgqTALoYBo= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= @@ -10,20 +11,22 @@ github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNg github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= -github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.1 h1:5pv5N1lT1fjLg2VQ5KWc7kmucp2x/kvFOnxuVTqZ6x4= github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= @@ -33,15 +36,14 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc= github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= -github.com/mitchellh/mapstructure v1.3.1 h1:cCBH2gTD2K0OtLlv/Y5H01VQCqmlDxz30kS5Y5bqfLA= github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -56,55 +58,61 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= -github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY= +github.com/urfave/cli/v2 v2.25.0 h1:ykdZKuQey2zq0yin/l7JOm9Mh+pg72ngYMeB0ABn6q8= +github.com/urfave/cli/v2 v2.25.0/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= +github.com/vektah/gqlparser/v2 v2.4.5/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0= github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4= github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838 h1:71vQrMauZZhcTVK6KdYM+rklehEEwb3E+ZhaE5jrPrE= golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY= -golang.org/x/sys v0.0.0-20220829200755-d48e67d00261/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/graph/cluster.graphql b/graph/cluster.graphql index 08a737d..8c275b0 100644 --- a/graph/cluster.graphql +++ b/graph/cluster.graphql @@ -1,3 +1,28 @@ mutation DestroyCluster($domain: String!, $name: String!, $provider: Provider!) { destroyCluster(domain: $domain, name: $name, provider: $provider) -} \ No newline at end of file +} + +query Clusters($cursor: String) { + clusters(first: 50, after: $cursor) { + pageInfo { hasNextPage endCursor } + edges { node { ...ClusterFragment } } + } +} + +query ClusterInfo($id: ID!) { + cluster(id: $id) { + ...ClusterFragment + upgradeInfo { + installation { repository { ...RepositoryFragment } } + count + } + } +} + +mutation CreateDependency($sourceId: ID!, $destId: ID!) { + createClusterDependency(sourceId: $sourceId, destId: $destId) { id } +} + +mutation PromoteCluster { + promote {...UserFragment} +} diff --git a/graph/models.graphql b/graph/models.graphql index 1efddb9..f55d2c3 100644 --- a/graph/models.graphql +++ b/graph/models.graphql @@ -228,4 +228,13 @@ fragment KeyBackupFragment on KeyBackup { digest repositories insertedAt +} + +fragment ClusterFragment on Cluster { + id + name + provider + source + gitUrl + owner { ...UserFragment } } \ No newline at end of file diff --git a/hack/gen-api-client.sh b/hack/gen-api-client.sh index 46db901..944e264 100755 --- a/hack/gen-api-client.sh +++ b/hack/gen-api-client.sh @@ -6,5 +6,5 @@ cd $(dirname $0)/.. source hack/lib.sh -CONTAINERIZE_IMAGE=golang:1.18.4 containerize ./hack/gen-api-client.sh +CONTAINERIZE_IMAGE=golang:1.19 containerize ./hack/gen-api-client.sh go run github.com/Yamashou/gqlgenc@v0.0.8 \ No newline at end of file diff --git a/models_gen.go b/models_gen.go index 1c7cf6a..330d87a 100644 --- a/models_gen.go +++ b/models_gen.go @@ -292,6 +292,8 @@ type Cluster struct { // The source of the cluster. Source *Source `json:"source"` UpdatedAt *string `json:"updatedAt"` + // pending upgrades for each installed app + UpgradeInfo []*UpgradeInfo `json:"upgradeInfo"` } // Input for creating or updating a cluster. @@ -315,6 +317,17 @@ type ClusterConnection struct { PageInfo PageInfo `json:"pageInfo"` } +// A dependncy reference between clusters +type ClusterDependency struct { + // the cluster holding this dependency + Cluster *Cluster `json:"cluster"` + // the source cluster of this dependency + Dependency *Cluster `json:"dependency"` + ID string `json:"id"` + InsertedAt *string `json:"insertedAt"` + UpdatedAt *string `json:"updatedAt"` +} + type ClusterEdge struct { Cursor *string `json:"cursor"` Node *Cluster `json:"node"` @@ -394,12 +407,20 @@ type Cvss struct { UserInteraction *VulnRequirement `json:"userInteraction"` } +type DeferredReason struct { + Message *string `json:"message"` + Package *string `json:"package"` + Repository *string `json:"repository"` +} + type DeferredUpdate struct { Attempts *int64 `json:"attempts"` ChartInstallation *ChartInstallation `json:"chartInstallation"` DequeueAt *string `json:"dequeueAt"` ID string `json:"id"` InsertedAt *string `json:"insertedAt"` + Messages []*DeferredReason `json:"messages"` + Pending *bool `json:"pending"` TerraformInstallation *TerraformInstallation `json:"terraformInstallation"` UpdatedAt *string `json:"updatedAt"` Version *Version `json:"version"` @@ -898,6 +919,8 @@ type Installation struct { LicenseKey *string `json:"licenseKey"` // The OIDC provider for the application. OidcProvider *OidcProvider `json:"oidcProvider"` + // The last ping time of an installed application. + PingedAt *string `json:"pingedAt"` // The application that was installed. Repository *Repository `json:"repository"` // The subscription for the application. @@ -1588,6 +1611,7 @@ type Recipe struct { Name string `json:"name"` OidcEnabled *bool `json:"oidcEnabled"` OidcSettings *OidcSettings `json:"oidcSettings"` + Primary *bool `json:"primary"` Private *bool `json:"private"` Provider *Provider `json:"provider"` RecipeDependencies []*Recipe `json:"recipeDependencies"` @@ -1603,6 +1627,7 @@ type RecipeAttributes struct { Description *string `json:"description,omitempty"` Name string `json:"name"` OidcSettings *OidcSettingsAttributes `json:"oidcSettings,omitempty"` + Primary *bool `json:"primary,omitempty"` Private *bool `json:"private,omitempty"` Provider *Provider `json:"provider,omitempty"` Restricted *bool `json:"restricted,omitempty"` @@ -1723,7 +1748,7 @@ type RecipeValidationAttributes struct { Type ValidationType `json:"type"` } -// Attributes of an application. +// Container for all resources to create an application. type Repository struct { // The artifacts of the application. Artifacts []*Artifact `json:"artifacts"` @@ -2294,6 +2319,12 @@ type UpgradeEdge struct { Node *Upgrade `json:"node"` } +// The pending upgrades for a repository +type UpgradeInfo struct { + Count *int64 `json:"count"` + Installation *Installation `json:"installation"` +} + type UpgradeQueue struct { Acked *string `json:"acked"` Domain *string `json:"domain"` @@ -2321,13 +2352,15 @@ type UpgradeQueueDelta struct { } type User struct { - Account Account `json:"account"` - Address *Address `json:"address"` - Avatar *string `json:"avatar"` - BackgroundColor *string `json:"backgroundColor"` - BoundRoles []*Role `json:"boundRoles"` - Cards *CardConnection `json:"cards"` - DefaultQueueID *string `json:"defaultQueueId"` + Account Account `json:"account"` + Address *Address `json:"address"` + Avatar *string `json:"avatar"` + BackgroundColor *string `json:"backgroundColor"` + BoundRoles []*Role `json:"boundRoles"` + Cards *CardConnection `json:"cards"` + DefaultQueueID *string `json:"defaultQueueId"` + // If a user has reached the demo project usage limit. + Demoed *bool `json:"demoed"` Demoing *bool `json:"demoing"` Email string `json:"email"` EmailConfirmBy *string `json:"emailConfirmBy"`