Skip to content

Commit

Permalink
fix: udpate es file
Browse files Browse the repository at this point in the history
  • Loading branch information
artaasadi committed Dec 19, 2024
1 parent 026c4f6 commit 4eb7318
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 61 deletions.
28 changes: 6 additions & 22 deletions pkg/sdk/es/resources_clients.go
Original file line number Diff line number Diff line change
Expand Up @@ -2838,7 +2838,7 @@ type OrgAlertDependabotPaginator struct {
}

func (k Client) NewOrgAlertDependabotPaginator(filters []essdk.BoolFilter, limit *int64) (OrgAlertDependabotPaginator, error) {
paginator, err := essdk.NewPaginator(k.ES(), "github_organization_dependabotalert", filters, limit)
paginator, err := essdk.NewPaginator(k.ES(), "github_organization_dependabot_alert", filters, limit)
if err != nil {
return OrgAlertDependabotPaginator{}, err
}
Expand Down Expand Up @@ -3075,7 +3075,7 @@ type OrgExternalIdentityPaginator struct {
}

func (k Client) NewOrgExternalIdentityPaginator(filters []essdk.BoolFilter, limit *int64) (OrgExternalIdentityPaginator, error) {
paginator, err := essdk.NewPaginator(k.ES(), "github_organization_externalidentity", filters, limit)
paginator, err := essdk.NewPaginator(k.ES(), "github_organization_external_identity", filters, limit)
if err != nil {
return OrgExternalIdentityPaginator{}, err
}
Expand Down Expand Up @@ -3867,10 +3867,6 @@ func (p RepositoryPaginator) NextPage(ctx context.Context) ([]Repository, error)
var listRepositoryFilters = map[string]string{
"allow_update_branch": "Description.AllowUpdateBranch",
"auto_merge_allowed": "Description.AutoMergeAllowed",
"can_administer": "Description.CanAdminister",
"can_create_projects": "Description.CanCreateProjects",
"can_subscribe": "Description.CanSubscribe",
"can_update_topics": "Description.CanUpdateTopics",
"code_of_conduct": "Description.CodeOfConduct",
"contact_links": "Description.ContactLinks",
"default_branch_ref": "Description.DefaultBranchRef",
Expand All @@ -3886,7 +3882,6 @@ var listRepositoryFilters = map[string]string{
"has_issues_enabled": "Description.HasIssuesEnabled",
"has_pages": "Description.HasPages",
"has_projects_enabled": "Description.HasProjectsEnabled",
"has_starred": "Description.HasStarred",
"has_vulnerability_alerts_enabled": "Description.HasVulnerabilityAlertsEnabled",
"has_wiki_enabled": "Description.HasWikiEnabled",
"homepage_url": "Description.HomepageURL",
Expand Down Expand Up @@ -3932,14 +3927,11 @@ var listRepositoryFilters = map[string]string{
"ssh_url": "Description.SSHURL",
"stargazer_count": "Description.StargazerCount",
"subscribers_count": "Description.SubscribersCount",
"subscription": "Description.Subscription",
"topics": "Description.Topics",
"url": "Description.URL",
"uses_custom_open_graph_image": "Description.UsesCustomOpenGraphImage",
"visibility": "Description.Visibility",
"watchers_total_count": "Description.WatchersTotalCount",
"web_commit_signoff_required": "Description.WebCommitSignOffRequired",
"your_permission": "Description.YourPermission",
}

func ListRepository(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) {
Expand Down Expand Up @@ -4005,10 +3997,6 @@ func ListRepository(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateD
var getRepositoryFilters = map[string]string{
"allow_update_branch": "Description.AllowUpdateBranch",
"auto_merge_allowed": "Description.AutoMergeAllowed",
"can_administer": "Description.CanAdminister",
"can_create_projects": "Description.CanCreateProjects",
"can_subscribe": "Description.CanSubscribe",
"can_update_topics": "Description.CanUpdateTopics",
"code_of_conduct": "Description.CodeOfConduct",
"contact_links": "Description.ContactLinks",
"default_branch_ref": "Description.DefaultBranchRef",
Expand All @@ -4024,7 +4012,6 @@ var getRepositoryFilters = map[string]string{
"has_issues_enabled": "Description.HasIssuesEnabled",
"has_pages": "Description.HasPages",
"has_projects_enabled": "Description.HasProjectsEnabled",
"has_starred": "Description.HasStarred",
"has_vulnerability_alerts_enabled": "Description.HasVulnerabilityAlertsEnabled",
"has_wiki_enabled": "Description.HasWikiEnabled",
"homepage_url": "Description.HomepageURL",
Expand Down Expand Up @@ -4070,14 +4057,11 @@ var getRepositoryFilters = map[string]string{
"ssh_url": "Description.SSHURL",
"stargazer_count": "Description.StargazerCount",
"subscribers_count": "Description.SubscribersCount",
"subscription": "Description.Subscription",
"topics": "Description.Topics",
"url": "Description.URL",
"uses_custom_open_graph_image": "Description.UsesCustomOpenGraphImage",
"visibility": "Description.Visibility",
"watchers_total_count": "Description.WatchersTotalCount",
"web_commit_signoff_required": "Description.WebCommitSignOffRequired",
"your_permission": "Description.YourPermission",
}

func GetRepository(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) {
Expand Down Expand Up @@ -7769,7 +7753,7 @@ type ContainerPackagePaginator struct {
}

func (k Client) NewContainerPackagePaginator(filters []essdk.BoolFilter, limit *int64) (ContainerPackagePaginator, error) {
paginator, err := essdk.NewPaginator(k.ES(), "github_package_container", filters, limit)
paginator, err := essdk.NewPaginator(k.ES(), "github_container_package", filters, limit)
if err != nil {
return ContainerPackagePaginator{}, err
}
Expand Down Expand Up @@ -7968,7 +7952,7 @@ type PackageDetailPaginator struct {
}

func (k Client) NewPackageDetailPaginator(filters []essdk.BoolFilter, limit *int64) (PackageDetailPaginator, error) {
paginator, err := essdk.NewPaginator(k.ES(), "github_package_npm", filters, limit)
paginator, err := essdk.NewPaginator(k.ES(), "github_npm_package", filters, limit)
if err != nil {
return PackageDetailPaginator{}, err
}
Expand Down Expand Up @@ -8167,7 +8151,7 @@ type PackagePaginator struct {
}

func (k Client) NewPackagePaginator(filters []essdk.BoolFilter, limit *int64) (PackagePaginator, error) {
paginator, err := essdk.NewPaginator(k.ES(), "github_package_nuget", filters, limit)
paginator, err := essdk.NewPaginator(k.ES(), "github_nuget_package", filters, limit)
if err != nil {
return PackagePaginator{}, err
}
Expand Down Expand Up @@ -8366,7 +8350,7 @@ type ArtifactDockerFilePaginator struct {
}

func (k Client) NewArtifactDockerFilePaginator(filters []essdk.BoolFilter, limit *int64) (ArtifactDockerFilePaginator, error) {
paginator, err := essdk.NewPaginator(k.ES(), "github_artifactdockerfile", filters, limit)
paginator, err := essdk.NewPaginator(k.ES(), "github_artifact_dockerfile", filters, limit)
if err != nil {
return ArtifactDockerFilePaginator{}, err
}
Expand Down
24 changes: 12 additions & 12 deletions provider/resource_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ var ResourceTypes = map[string]model.ResourceType{
GetDescriber: nil,
},

"Github/Organization/DependabotAlert": {
"Github/Organization/Dependabot/Alert": {
IntegrationType: configs.IntegrationName,
ResourceName: "Github/Organization/DependabotAlert",
ResourceName: "Github/Organization/Dependabot/Alert",
Tags: map[string][]string{
"category": {"Organization"},
},
Expand All @@ -188,9 +188,9 @@ var ResourceTypes = map[string]model.ResourceType{
GetDescriber: nil,
},

"Github/Organization/ExternalIdentity": {
"Github/Organization/External/Identity": {
IntegrationType: configs.IntegrationName,
ResourceName: "Github/Organization/ExternalIdentity",
ResourceName: "Github/Organization/External/Identity",
Tags: map[string][]string{
"category": {"Organization"},
},
Expand Down Expand Up @@ -468,9 +468,9 @@ var ResourceTypes = map[string]model.ResourceType{
GetDescriber: nil,
},

"Github/Package/Container": {
"Github/Container/Package": {
IntegrationType: configs.IntegrationName,
ResourceName: "Github/Package/Container",
ResourceName: "Github/Container/Package",
Tags: map[string][]string{
"category": {"package"},
},
Expand All @@ -496,9 +496,9 @@ var ResourceTypes = map[string]model.ResourceType{
GetDescriber: nil,
},

"Github/Package/NPM": {
"Github/NPM/Package": {
IntegrationType: configs.IntegrationName,
ResourceName: "Github/Package/NPM",
ResourceName: "Github/NPM/Package",
Tags: map[string][]string{
"category": {"package"},
},
Expand All @@ -510,9 +510,9 @@ var ResourceTypes = map[string]model.ResourceType{
GetDescriber: nil,
},

"Github/Package/Nuget": {
"Github/Nuget/Package": {
IntegrationType: configs.IntegrationName,
ResourceName: "Github/Package/Nuget",
ResourceName: "Github/Nuget/Package",
Tags: map[string][]string{
"category": {"package"},
},
Expand All @@ -524,9 +524,9 @@ var ResourceTypes = map[string]model.ResourceType{
GetDescriber: DescribeSingleByRepo(describer.GetNugetPackage),
},

"Github/ArtifactDockerFile": {
"Github/Artifact/DockerFile": {
IntegrationType: configs.IntegrationName,
ResourceName: "Github/ArtifactDockerFile",
ResourceName: "Github/Artifact/DockerFile",
Tags: map[string][]string{
"category": {"artifact_dockerfile"},
},
Expand Down
14 changes: 7 additions & 7 deletions provider/resource_types/resource-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@
},
"ListDescriber": "DescribeByGithub(describer.GetAllOrganizationsCollaborators)",
"GetDescriber": "",
"SteampipeTable": "github_organization_collaborators",
"SteampipeTable": "github_organization_collaborator",
"Model": "OrgCollaborators"
},
{
"ResourceName": "Github/Organization/DependabotAlert",
"ResourceName": "Github/Organization/Dependabot/Alert",
"Tags": {
"category": [
"Organization"
Expand All @@ -156,7 +156,7 @@
"Model": "OrgAlertDependabot"
},
{
"ResourceName": "Github/Organization/ExternalIdentity",
"ResourceName": "Github/Organization/External/Identity",
"Tags": {
"category": [
"Organization"
Expand Down Expand Up @@ -396,7 +396,7 @@
"Model": "CodeOwner"
},
{
"ResourceName": "Github/Package/Container",
"ResourceName": "Github/Container/Package",
"Tags": {
"category": [
"package"
Expand All @@ -420,7 +420,7 @@
"Model": "PackageDetail"
},
{
"ResourceName": "Github/Package/NPM",
"ResourceName": "Github/NPM/Package",
"Tags": {
"category": [
"package"
Expand All @@ -432,7 +432,7 @@
"Model": "PackageDetail"
},
{
"ResourceName": "Github/Package/Nuget",
"ResourceName": "Github/Nuget/Package",
"Tags": {
"category": [
"package"
Expand All @@ -444,7 +444,7 @@
"Model": "Package"
},
{
"ResourceName": "Github/ArtifactDockerFile",
"ResourceName": "Github/Artifact/DockerFile",
"Tags": {
"category": [
"artifact_dockerfile"
Expand Down
40 changes: 20 additions & 20 deletions steampipe/table_index_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ var Map = map[string]string{
"Github/Issue": "github_issue",
"Github/License": "github_license",
"Github/Organization": "github_organization",
"Github/Organization/Collaborator": "github_organization_collaborators",
"Github/Organization/DependabotAlert": "github_organization_dependabot_alert",
"Github/Organization/ExternalIdentity": "github_organization_external_identity",
"Github/Organization/Collaborator": "github_organization_collaborator",
"Github/Organization/Dependabot/Alert": "github_organization_dependabot_alert",
"Github/Organization/External/Identity": "github_organization_external_identity",
"Github/Organization/Member": "github_organization_member",
"Github/PullRequest": "github_pull_request",
"Github/Release": "github_release",
Expand All @@ -38,11 +38,11 @@ var Map = map[string]string{
"Github/User": "github_user",
"Github/Workflow": "github_workflow",
"Github/CodeOwner": "github_code_owner",
"Github/Package/Container": "github_container_package",
"Github/Container/Package": "github_container_package",
"Github/Package/Maven": "github_maven_package",
"Github/Package/NPM": "github_npm_package",
"Github/Package/Nuget": "github_nuget_package",
"Github/ArtifactDockerFile": "github_artifact_dockerfile",
"Github/NPM/Package": "github_npm_package",
"Github/Nuget/Package": "github_nuget_package",
"Github/Artifact/DockerFile": "github_artifact_dockerfile",
}

var DescriptionMap = map[string]interface{}{
Expand All @@ -58,8 +58,8 @@ var DescriptionMap = map[string]interface{}{
"Github/License": opengovernance.License{},
"Github/Organization": opengovernance.Organization{},
"Github/Organization/Collaborator": opengovernance.OrgCollaborators{},
"Github/Organization/DependabotAlert": opengovernance.OrgAlertDependabot{},
"Github/Organization/ExternalIdentity": opengovernance.OrgExternalIdentity{},
"Github/Organization/Dependabot/Alert": opengovernance.OrgAlertDependabot{},
"Github/Organization/External/Identity": opengovernance.OrgExternalIdentity{},
"Github/Organization/Member": opengovernance.OrgMembers{},
"Github/PullRequest": opengovernance.PullRequest{},
"Github/Release": opengovernance.Release{},
Expand All @@ -79,11 +79,11 @@ var DescriptionMap = map[string]interface{}{
"Github/User": opengovernance.User{},
"Github/Workflow": opengovernance.Workflow{},
"Github/CodeOwner": opengovernance.CodeOwner{},
"Github/Package/Container": opengovernance.ContainerPackage{},
"Github/Container/Package": opengovernance.ContainerPackage{},
"Github/Package/Maven": opengovernance.PackageDetail{},
"Github/Package/NPM": opengovernance.PackageDetail{},
"Github/Package/Nuget": opengovernance.Package{},
"Github/ArtifactDockerFile": opengovernance.ArtifactDockerFile{},
"Github/NPM/Package": opengovernance.PackageDetail{},
"Github/Nuget/Package": opengovernance.Package{},
"Github/Artifact/DockerFile": opengovernance.ArtifactDockerFile{},
}

var ReverseMap = map[string]string{
Expand All @@ -98,9 +98,9 @@ var ReverseMap = map[string]string{
"github_issue": "Github/Issue",
"github_license": "Github/License",
"github_organization": "Github/Organization",
"github_organization_collaborators": "Github/Organization/Collaborator",
"github_organization_dependabot_alert": "Github/Organization/DependabotAlert",
"github_organization_external_identity": "Github/Organization/ExternalIdentity",
"github_organization_collaborator": "Github/Organization/Collaborator",
"github_organization_dependabot_alert": "Github/Organization/Dependabot/Alert",
"github_organization_external_identity": "Github/Organization/External/Identity",
"github_organization_member": "Github/Organization/Member",
"github_pull_request": "Github/PullRequest",
"github_release": "Github/Release",
Expand All @@ -120,9 +120,9 @@ var ReverseMap = map[string]string{
"github_user": "Github/User",
"github_workflow": "Github/Workflow",
"github_code_owner": "Github/CodeOwner",
"github_container_package": "Github/Package/Container",
"github_container_package": "Github/Container/Package",
"github_maven_package": "Github/Package/Maven",
"github_npm_package": "Github/Package/NPM",
"github_nuget_package": "Github/Package/Nuget",
"github_artifact_dockerfile": "Github/ArtifactDockerFile",
"github_npm_package": "Github/NPM/Package",
"github_nuget_package": "Github/Nuget/Package",
"github_artifact_dockerfile": "Github/Artifact/DockerFile",
}

0 comments on commit 4eb7318

Please sign in to comment.