Documentation ¶
Index ¶
- Constants
- Variables
- func AddKeywords(exportedYaml interface{}, localFileData []byte, ...) (interface{}, error)
- func AddNewSecretIndicatorToSummary(appName string)
- func AddTypeTags(data []byte) []byte
- func AreSecretsExcluded(resourceConfigs map[string]interface{}) bool
- func Contains(slice []string, item string) bool
- func ContainsKeywords(data string, keywordMapping map[string]interface{}) bool
- func CreateFile()
- func CreateSampleSPFile()
- func GetArrayIdentifiers(resourceType string) map[string]string
- func GetArrayIndex(arrayMap []interface{}, elementIdentifier string) (int, error)
- func GetKeywordLocations(fileData interface{}, path []string, keywordMapping map[string]interface{}, ...) []string
- func GetPathKeys(pathString string) []string
- func GetValue(data interface{}, key string) string
- func InitializeResourceSummary()
- func IsResourceExcluded(resourceName string, resourceConfigs map[string]interface{}) bool
- func IsResourceTypeExcluded(resourceType string) bool
- func LoadConfigs(envConfigPath string) (baseDir string)
- func ModifyFieldsWithKeywords(exportedFileData interface{}, localFileData interface{}, ...) interface{}
- func PrintExportSummary()
- func PrintFailedResources(summary ResourceSummary)
- func PrintImportSummary()
- func PrintSummary(Operation string)
- func ProcessExportedContent(exportedFileName string, exportedFileContent []byte, ...) ([]byte, error)
- func ReadFile() string
- func ReadSPConfig() (string, string, string, string)
- func RemoveDeletedLocalResources(filePath string, deployedResourceNames []string)
- func RemoveSecretMasks(modifiedFileData string) string
- func ReplaceKeywords(fileContent string, keywordMapping map[string]interface{}) string
- func ReplacePlaceholders(configFile []byte) []byte
- func ReplaceTypeTags(data []byte) []byte
- func ReplaceValue(data interface{}, pathString string, replacement string) interface{}
- func ResolveAdvancedKeywordMapping(resourceName string, resourceConfigs map[string]interface{}) map[string]interface{}
- func SendDeleteRequest(resourceId string, resourceType string) error
- func SendExportRequest(resourceId, fileType, resourceType string, excludeSecrets bool) (resp *http.Response, err error)
- func SendGetListRequest(resourceType string, resourceLimit int) (*http.Response, error)
- func SendImportRequest(importFilePath, fileData, resourceType string) error
- func SendUpdateRequest(resourceId, importFilePath, fileData, resourceType string) error
- func UpdateFailureSummary(resourceType string, resourceName string)
- func UpdateSuccessSummary(resourceType string, operation string)
- func WriteFiles(server string, token string, refreshToken string)
- type ErrorResponse
- type FailedOperation
- type FileInfo
- type KeywordConfigs
- type MyJSON
- type ResourceSummary
- type SampleSP
- type ServerConfigs
- type ServerDetails
- type Summary
- type ToolConfigs
Constants ¶
View Source
const ( AppName = "IAM-CTL" ShortAppDesc = "Service Provider configuration" LongAPPConfig = "Service Provider configuration" )
View Source
const ALLOW_DELETE_CONFIG = "ALLOW_DELETE"
View Source
const APPLICATIONS = "Applications"
Resource types
View Source
const APPLICATIONS_CONFIG = "APPLICATIONS"
Resource type configs
View Source
const CLAIMS = "Claims"
View Source
const CLAIM_CONFIG = "CLAIMS"
View Source
const CLIENT_ID_CONFIG = "CLIENT_ID"
View Source
const CLIENT_SECRET_CONFIG = "CLIENT_SECRET"
View Source
const CONSOLE = "Console"
View Source
const DEFAULT_TENANT_DOMAIN = "carbon.super"
View Source
const DELETE = "delete"
View Source
const EXCLUDE_CONFIG = "EXCLUDE"
Tool configs
View Source
const EXCLUDE_SECRETS_CONFIG = "EXCLUDE_SECRETS"
View Source
const EXPORT = "export"
View Source
const IDENTITY_PROVIDERS = "IdentityProviders"
View Source
const IDP_CONFIG = "IDENTITY_PROVIDERS"
View Source
const IMPORT = "import"
View Source
const INCLUDE_ONLY_CONFIG = "INCLUDE_ONLY"
View Source
const KEYWORD_CONFIG_FILE = "keywordConfig.json"
View Source
const KEYWORD_CONFIG_PATH = "KEYWORD_CONFIG_PATH"
View Source
const KEYWORD_MAPPINGS_CONFIG = "KEYWORD_MAPPINGS"
Keyword configs
View Source
const LIST = "list"
View Source
const MEDIA_TYPE_FORM = "application/x-www-form-urlencoded"
View Source
const MEDIA_TYPE_JSON = "application/json"
Media types
View Source
const MEDIA_TYPE_XML = "application/xml"
View Source
const MEDIA_TYPE_YAML = "application/yaml"
View Source
const MY_ACCOUNT = "My Account"
View Source
const OAUTH2 = "oauth2"
View Source
const RESIDENT_IDP_NAME = "LOCAL"
View Source
const SCOPE string = "" /* 411-byte string literal not displayed */
View Source
const SENSITIVE_FIELD_MASK = "'********'"
View Source
const SERVER_CONFIG_FILE = "serverConfig.json"
Config file names
View Source
const SERVER_URL_CONFIG = "SERVER_URL"
Server configs
View Source
const TENANT_DOMAIN_CONFIG = "TENANT_DOMAIN"
View Source
const TOKEN_CONFIG = "TOKEN"
View Source
const TOOL_CONFIG_FILE = "toolConfig.json"
View Source
const TOOL_CONFIG_PATH = "TOOL_CONFIG_PATH"
View Source
const UPDATE = "update"
View Source
const USERSTORES = "UserStores"
View Source
const USERSTORES_CONFIG = "USERSTORES"
Variables ¶
View Source
var ErrorCodes = map[int]string{
400: "Bad request. Provided parameters are not in correct format.",
401: "Unauthorized access.\nPlease check your server configurations.",
403: "Forbidden request.",
404: "Resource not found for the given ID.",
409: "A resource with the same name already exists.",
500: "Internal server error.",
}
Error codes
View Source
var Path = dir + "/iamctl.json"
View Source
var PathSampleSPDetails = dir + "/init.json"
Functions ¶
func AddKeywords ¶
func AddNewSecretIndicatorToSummary ¶
func AddNewSecretIndicatorToSummary(appName string)
func AddTypeTags ¶
func AreSecretsExcluded ¶
func ContainsKeywords ¶
func CreateFile ¶
func CreateFile()
func CreateSampleSPFile ¶
func CreateSampleSPFile()
func GetArrayIdentifiers ¶
func GetArrayIndex ¶
func GetKeywordLocations ¶
func GetPathKeys ¶
func InitializeResourceSummary ¶
func InitializeResourceSummary()
func IsResourceExcluded ¶
func IsResourceTypeExcluded ¶
func LoadConfigs ¶
func PrintExportSummary ¶
func PrintExportSummary()
func PrintFailedResources ¶
func PrintFailedResources(summary ResourceSummary)
func PrintImportSummary ¶
func PrintImportSummary()
func PrintSummary ¶
func PrintSummary(Operation string)
func ProcessExportedContent ¶
func RemoveSecretMasks ¶
func ReplaceKeywords ¶
func ReplacePlaceholders ¶
func ReplaceTypeTags ¶
func ReplaceValue ¶
func SendDeleteRequest ¶
func SendExportRequest ¶
func SendGetListRequest ¶
func SendImportRequest ¶
func SendUpdateRequest ¶
func UpdateFailureSummary ¶
func UpdateSuccessSummary ¶
func WriteFiles ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Code string `json:"code"` Message string `json:"message"` Description string `json:"description"` TraceID string `json:"traceId"` FailedOperations []FailedOperation `json:"failedOperations"` }
type FailedOperation ¶
type FileInfo ¶
func GetFileInfo ¶
type KeywordConfigs ¶
type KeywordConfigs struct { KeywordMappings map[string]interface{} `json:"KEYWORD_MAPPINGS"` ApplicationConfigs map[string]interface{} `json:"APPLICATIONS"` IdpConfigs map[string]interface{} `json:"IDENTITY_PROVIDERS"` ClaimConfigs map[string]interface{} `json:"CLAIMS"` UserStoreConfigs map[string]interface{} `json:"USERSTORES"` }
var KEYWORD_CONFIGS KeywordConfigs
type MyJSON ¶
type MyJSON struct {
Array []ServerDetails
}
type ResourceSummary ¶
type ServerConfigs ¶
type ServerConfigs struct { ServerUrl string `json:"SERVER_URL"` ClientId string `json:"CLIENT_ID"` ClientSecret string `json:"CLIENT_SECRET"` TenantDomain string `json:"TENANT_DOMAIN"` Token string `json:"TOKEN"` }
var SERVER_CONFIGS ServerConfigs
type ServerDetails ¶
type Summary ¶
var ( SummaryData Summary ResourceSummaries map[string]ResourceSummary )
type ToolConfigs ¶
type ToolConfigs struct { AllowDelete bool `json:"ALLOW_DELETE"` Exclude []string `json:"EXCLUDE"` IncludeOnly []string `json:"INCLUDE_ONLY"` ExcludeSecrets bool `json:"EXCLUDE_SECRETS"` ApplicationConfigs map[string]interface{} `json:"APPLICATIONS"` IdpConfigs map[string]interface{} `json:"IDENTITY_PROVIDERS"` ClaimConfigs map[string]interface{} `json:"CLAIMS"` UserStoreConfigs map[string]interface{} `json:"USERSTORES"` }
var TOOL_CONFIGS ToolConfigs
Click to show internal directories.
Click to hide internal directories.