Skip to content

Commit

Permalink
Merge pull request #6 from huhouhua/dev
Browse files Browse the repository at this point in the history
defin reposone model for applicationset api
  • Loading branch information
huhouhua authored Oct 10, 2023
2 parents 23754c1 + 5402c63 commit 2abcaec
Show file tree
Hide file tree
Showing 13 changed files with 230 additions and 2 deletions.
18 changes: 18 additions & 0 deletions src/ArgoCD.Client/Models/ApplicationSet/Reponses/V1JSON.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
/// <summary>
/// JSON represents any valid JSON value.
/// These types are supported: bool, int64, float64, string, [] interface{ }, map[string] interface{ }
/// and nil.
/// </summary>
public class V1JSON
{
public V1JSON() { }

public string Raw { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,11 @@ public class V1alpha1ApplicationSetGenerator
/// ClusterGenerator defines a generator to match against clusters registered with ArgoCD
/// </summary>
public V1alpha1ClusterGenerator Clusters { get; set; }

public V1alpha1GitGenerator Git { get; set; }

public V1alpha1ListGenerator List { get; set; }

public int Matrix { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
/// <summary>
/// ApplicationSetNestedGenerator represents a generator nested within a combination-type generator(MatrixGenerator or MergeGenerator).
/// </summary>
public class V1alpha1ApplicationSetNestedGenerator
{
public V1alpha1DuckTypeGenerator ClusterDecisionResource { get; set; }

public V1alpha1ClusterGenerator Clusters { get; set; }

public V1alpha1GitGenerator Git { get; set; }

public V1alpha1ListGenerator List { get; set; }

public V1JSON Matrix { get; set; }

public V1JSON Merge { get; set; }

public V1alpha1PluginGenerator Plugin { get; set; }

public V1alpha1PullRequestGenerator PullRequest { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
public class V1alpha1GitFileGeneratorItem
{
public string MyProperty { get; set; }
public string Path { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ public V1alpha1GitGenerator() { }

public V1alpha1GitDirectoryGeneratorItem[] Directories { get; set; }

public int Files { get; set; }
public V1alpha1GitFileGeneratorItem[] Files { get; set; }

public string RepoURL { get; set; }

public string RequeueAfterSeconds { get; set; }

public string Revision { get; set; }

/// <summary>
/// ApplicationSetTemplate represents argocd ApplicationSpec
/// </summary>
public V1alpha1ApplicationSetTemplate Template { get; set; }

/// <summary>
/// Values contains key/value pairs which are passed directly as parameters to the template
/// </summary>
public object Values { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
public class V1alpha1ListGenerator
{
public V1alpha1ListGenerator() { }

public V1JSON Elements { get; set; }

public string ElementsYaml { get; set; }

/// <summary>
/// ApplicationSetTemplate represents argocd ApplicationSpec
/// </summary>
public V1alpha1ApplicationSetTemplate Template { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
public class V1alpha1MatrixGenerator
{
public V1alpha1MatrixGenerator() { }

public string generators { get; set; }


}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
public class V1alpha1PluginConfigMapRef
{
/// <summary>
/// Name of the ConfigMap
/// </summary>
public string Name { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
public class V1alpha1PluginGenerator
{
public V1alpha1PluginGenerator() { }

public V1alpha1PluginConfigMapRef ConfigMapRef { get; set; }

public V1alpha1PluginInput Input { get; set; }

/// <summary>
/// RequeueAfterSeconds determines how long the ApplicationSet controller will wait before reconciling the ApplicationSet again.
/// </summary>
public string RequeueAfterSeconds { get; set; }

public V1alpha1ApplicationSetTemplate Template { get; set; }

public object Values { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
public class V1alpha1PluginInput
{
public V1alpha1PluginInput() { }

public object Parameters { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
/// <summary>
/// PullRequestGenerator defines a generator that scrapes a PullRequest API to find candidate pull requests.
/// </summary>
public class V1alpha1PullRequestGenerator
{
public V1alpha1PullRequestGenerator() { }


public V1alpha1PullRequestGeneratorAzureDevOps Azuredevops { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
/// <summary>
/// PullRequestGeneratorAzureDevOps defines connection info specific to AzureDevOps.
/// </summary>
public class V1alpha1PullRequestGeneratorAzureDevOps
{
/// <summary>
/// The Azure DevOps API URL to talk to. If blank, use https://dev.azure.com/.
/// </summary>
public string Api { get; set; }

/// <summary>
/// Labels is used to filter the PRs that you want to target
/// </summary>
public string[] Labels { get; set; }

/// <summary>
/// Azure DevOps org to scan. Required.
/// </summary>
public string Organization { get; set; }


/// <summary>
/// Azure DevOps project name to scan. Required.
/// </summary>
public string Project { get; set; }

/// <summary>
/// Azure DevOps repo name to scan. Required
/// </summary>
public string Repo { get; set; }

public V1alpha1SecretRef TokenRef { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace ArgoCD.Client.Models.ApplicationSet.Reponses
{
/// <summary>
/// Utility struct for a reference to a secret key.
/// </summary>
public class V1alpha1SecretRef
{
public string Key { get; set; }

public string SecretName { get; set; }
}
}

0 comments on commit 2abcaec

Please sign in to comment.