You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: providers.go
    path of file: ./repos/trivy/pkg/iac/rules
    
    the code of the file until where you have to start completion: package rules

import (
	"encoding/json"
	"strings"
)

type Provider struct {
	Name     string    `json:"name"`
	Services []Service `json:"services"`
}

type Service struct {
	Name   string  `json:"name"`
	Checks []Check `json:"checks"`
}

type Check struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

func GetProvidersHierarchy() (providers map[string]map[string][]string) {

	registeredRules := 
    
func GetProviderServiceNames(providerName string) []string {

	registeredRules := GetRegistered()

	services := make(map[string]bool)

	for _, rule := range registeredRules {

		if !strings.EqualFold(providerName, rule.GetRule().Provider.DisplayName()) {
			continue
		}

		if _, ok := services[rule.GetRule().Service]; !ok {
			services[rule.GetRule().Service] = true
		}

	}
	var uniqueServices []string
	for p := range services {
		uniqueServices = append(uniqueServices, p)
	}

	return uniqueServices
}