Skip to content

Commit

Permalink
Merge pull request #8 from nirmata/policies-service
Browse files Browse the repository at this point in the history
Add policies service
  • Loading branch information
anushkamittal2001 authored Jan 10, 2024
2 parents dbea004 + e872524 commit a71f2d0
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions pkg/client/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,13 @@ import (
type Service int

const (
// ServiceCatalogs ...
ServiceCatalogs Service = iota + 1

// ServiceEnvironments ...
ServiceEnvironments

// ServiceClusters ...
ServiceClusters

// ServiceUsers ...
ServiceUsers

// ServiceSecurity ...
ServiceSecurity

// ServiceConfig ...
ServiceConfig
ServicePolicies
)

// Name returns the service name
Expand All @@ -49,6 +39,9 @@ func (s Service) Name() string {
case ServiceConfig:
return "config"

case ServicePolicies:
return "policies"

default:
return ""
}
Expand All @@ -75,7 +68,10 @@ func ParseService(s string) (Service, error) {
case "config":
return ServiceConfig, nil

case "policies":
return ServicePolicies, nil

}

return -1, fmt.Errorf("Invalid service %s", s)
return -1, fmt.Errorf("invalid service %s", s)
}

0 comments on commit a71f2d0

Please sign in to comment.