Documentation
¶
Index ¶
- Constants
- func AdRolesCountAzure(z Bundle) int64
- func AdRolesCountLocal(z Bundle) int64
- func AddAppSecret(uuid, displayName, expiry string, z Bundle)
- func AddSpSecret(uuid, displayName, expiry string, z Bundle)
- func ApiCall(method, url string, z Bundle, payload jsonT, params strMapT, verbose bool) (result jsonT, rsc int, err error)
- func ApiDelete(url string, z Bundle, params strMapT) (result jsonT, rsc int, err error)
- func ApiDeleteDebug(url string, z Bundle, params strMapT) (result jsonT, rsc int, err error)
- func ApiErrorCheck(method, url, caller string, r jsonT)
- func ApiGet(url string, z Bundle, params strMapT) (result jsonT, rsc int, err error)
- func ApiGetDebug(url string, z Bundle, params strMapT) (result jsonT, rsc int, err error)
- func ApiPost(url string, z Bundle, payload jsonT, params strMapT) (result jsonT, rsc int, err error)
- func ApiPostDebug(url string, z Bundle, payload jsonT, params strMapT) (result jsonT, rsc int, err error)
- func ApiPut(url string, z Bundle, payload jsonT, params strMapT) (result jsonT, rsc int, err error)
- func ApiPutDebug(url string, z Bundle, payload jsonT, params strMapT) (result jsonT, rsc int, err error)
- func AppsCountAzure(z Bundle) int64
- func AppsCountLocal(z Bundle) int64
- func CompareSpecfileToAzure(filePath string, z Bundle)
- func CreateAzRoleAssignment(x map[string]interface{}, z Bundle)
- func CreateSkeletonFile(t string)
- func DecodeJwtToken(tokenString string)
- func DeleteAzObject(specifier string, z Bundle)
- func DeleteAzRoleAssignmentByFqid(fqid string, z Bundle) map[string]interface{}
- func DeleteAzRoleDefinitionByFqid(fqid string, z Bundle) map[string]interface{}
- func DumpLoginValues(z Bundle)
- func DumpRuntimeValues(z Bundle)
- func FindAzObjectsByUuid(uuid string, z Bundle) (list []interface{})
- func GetAdRoles(filter string, force bool, z Bundle) (list []interface{})
- func GetApps(filter string, force bool, z Bundle) (list []interface{})
- func GetAzAdRoleByUuid(uuid string, z Bundle) map[string]interface{}
- func GetAzAdRoles(z Bundle, verbose bool) (list []interface{})
- func GetAzAppByUuid(uuid string, z Bundle) map[string]interface{}
- func GetAzApps(z Bundle, verbose bool) (list []interface{})
- func GetAzGroupByUuid(uuid string, z Bundle) map[string]interface{}
- func GetAzGroups(z Bundle, verbose bool) (list []interface{})
- func GetAzMgGroups(z Bundle) (list []interface{})
- func GetAzObjectByUuid(t, uuid string, z Bundle) (x map[string]interface{})
- func GetAzObjects(url string, z Bundle, verbose bool) (deltaSet []interface{}, deltaLinkMap map[string]interface{})
- func GetAzRbacScopes(z Bundle) (scopes []string)
- func GetAzRoleAssignmentByObject(x map[string]interface{}, z Bundle) (y map[string]interface{})
- func GetAzRoleAssignmentByUuid(uuid string, z Bundle) map[string]interface{}
- func GetAzRoleAssignments(z Bundle, verbose bool) (list []interface{})
- func GetAzRoleDefinitionByName(roleName string, z Bundle) (y map[string]interface{})
- func GetAzRoleDefinitionByObject(x map[string]interface{}, z Bundle) (y map[string]interface{})
- func GetAzRoleDefinitionByUuid(uuid string, z Bundle) map[string]interface{}
- func GetAzRoleDefinitions(z Bundle, verbose bool) (list []interface{})
- func GetAzSpByUuid(uuid string, z Bundle) map[string]interface{}
- func GetAzSps(z Bundle, verbose bool) (list []interface{})
- func GetAzSubscriptionByUuid(uuid string, z Bundle) map[string]interface{}
- func GetAzSubscriptions(z Bundle) (list []interface{})
- func GetAzSubscriptionsIds(z Bundle) (scopes []string)
- func GetAzUserByUuid(uuid string, z Bundle) map[string]interface{}
- func GetAzUsers(z Bundle, verbose bool) (list []interface{})
- func GetCachedObjects(cacheFile string) (cachedList []interface{})
- func GetGroups(filter string, force bool, z Bundle) (list []interface{})
- func GetIdMapApps(z Bundle) (nameMap map[string]string)
- func GetIdMapGroups(z Bundle) (nameMap map[string]string)
- func GetIdMapMgGroups(z Bundle) (nameMap map[string]string)
- func GetIdMapRoleDefs(z Bundle) (nameMap map[string]string)
- func GetIdMapSps(z Bundle) (nameMap map[string]string)
- func GetIdMapSubs(z Bundle) (nameMap map[string]string)
- func GetIdMapUsers(z Bundle) (nameMap map[string]string)
- func GetMgGroups(filter string, force bool, z Bundle) (list []interface{})
- func GetObjectFromFile(filePath string) (formatType, t string, obj map[string]interface{})
- func GetObjects(t, filter string, force bool, z Bundle) (list []interface{})
- func GetRoleAssignments(filter string, force bool, z Bundle) (list []interface{})
- func GetRoleDefinitions(filter string, force bool, z Bundle) (list []interface{})
- func GetSps(filter string, force bool, z Bundle) (list []interface{})
- func GetSubscriptions(filter string, force bool, z Bundle) (list []interface{})
- func GetTokenByCredentials(scopes []string, ...) (token string, err error)
- func GetTokenInteractively(scopes []string, confDir, tokenFile, authorityUrl, username string) (token string, err error)
- func GetUsers(filter string, force bool, z Bundle) (list []interface{})
- func GroupsCountAzure(z Bundle) int64
- func GroupsCountLocal(z Bundle) int64
- func MgGroupCountAzure(z Bundle) int64
- func MgGroupCountLocal(z Bundle) int64
- func MgType(typeIn string) string
- func NormalizeCache(baseSet, deltaSet []interface{}) (list []interface{})
- func PrintAdRole(x map[string]interface{}, z Bundle)
- func PrintApiErrMsg(msg string)
- func PrintApp(x map[string]interface{}, z Bundle)
- func PrintCertificateList(certificates []interface{})
- func PrintCountStatus(z Bundle)
- func PrintGroup(x map[string]interface{}, z Bundle)
- func PrintHeaders(headers http.Header)
- func PrintMatching(printFormat, t, specifier string, z Bundle)
- func PrintMemberOfs(t string, memberOf []interface{})
- func PrintMgChildren(indent int, children []interface{})
- func PrintMgGroup(x map[string]interface{})
- func PrintMgTree(z Bundle)
- func PrintObject(t string, x map[string]interface{}, z Bundle)
- func PrintObjectByUuid(uuid string, z Bundle)
- func PrintOwners(owners []interface{})
- func PrintPags(z Bundle)
- func PrintParams(params url.Values)
- func PrintRoleAssignment(x map[string]interface{}, z Bundle)
- func PrintRoleAssignmentReport(z Bundle)
- func PrintRoleDefinition(x map[string]interface{}, z Bundle)
- func PrintSecretList(pwdCreds []interface{})
- func PrintSp(x map[string]interface{}, z Bundle)
- func PrintStringMapColor(strMap map[string]string)
- func PrintSubscription(x map[string]interface{})
- func PrintTersely(t string, object interface{})
- func PrintUser(x map[string]interface{}, z Bundle)
- func RemoveAppSecret(uuid, keyId string, z Bundle)
- func RemoveCacheFile(t string, z Bundle)
- func RemoveSpSecret(uuid, keyId string, z Bundle)
- func RoleAssignmentsCountAzure(z Bundle) int64
- func RoleAssignmentsCountLocal(z Bundle) int64
- func RoleDefinitionCountAzure(z Bundle) (builtin, custom int64)
- func RoleDefinitionCountLocal(z Bundle) (builtin, custom int64)
- func SelectObject(id string, objSet []interface{}) (x map[string]interface{})
- func SetupAutomatedLogin(z Bundle)
- func SetupInterativeLogin(z Bundle)
- func SpsCountAzure(z Bundle) (native, microsoft int64)
- func SpsCountLocal(z Bundle) (native, microsoft int64)
- func SubsCountAzure(z Bundle) int64
- func SubsCountLocal(z Bundle) int64
- func UpsertAzObject(filePath string, z Bundle)
- func UpsertAzRoleDefinition(x map[string]interface{}, z Bundle)
- func UsersCountAzure(z Bundle) int64
- func UsersCountLocal(z Bundle) int64
- type Bundle
- type TokenCache
Constants ¶
View Source
const ( ConstAuthUrl = "https://login.microsoftonline.com/" ConstMgUrl = "https://graph.microsoft.com" ConstAzUrl = "https://management.azure.com" ConstAzPowerShellClientId = "1950a258-227b-4e31-a9cf-717495945fc2" // 'Microsoft Azure PowerShell' ClientId // See https://stackoverflow.com/questions/1508490/erase-the-current-printed-console-line ConstCacheFileExtension = "gz" ConstMgCacheFileAgePeriod = 1800 // Half hour ConstAzCacheFileAgePeriod = 86400 // One day )
Variables ¶
This section is empty.
Functions ¶
func AdRolesCountAzure ¶ added in v0.8.0
func AdRolesCountLocal ¶ added in v0.8.0
func AddAppSecret ¶ added in v0.10.0
func AddSpSecret ¶ added in v0.10.0
func ApiDeleteDebug ¶ added in v0.8.8
func ApiErrorCheck ¶ added in v0.8.0
func ApiErrorCheck(method, url, caller string, r jsonT)
func ApiGetDebug ¶ added in v0.8.0
func ApiPostDebug ¶ added in v0.10.0
func ApiPutDebug ¶ added in v0.8.8
func AppsCountAzure ¶ added in v0.8.0
func AppsCountLocal ¶ added in v0.8.0
func CompareSpecfileToAzure ¶ added in v0.8.0
func CreateAzRoleAssignment ¶ added in v0.8.8
func CreateSkeletonFile ¶ added in v0.8.7
func CreateSkeletonFile(t string)
func DecodeJwtToken ¶ added in v0.9.9
func DecodeJwtToken(tokenString string)
func DeleteAzObject ¶ added in v0.8.8
func DeleteAzRoleAssignmentByFqid ¶ added in v0.8.8
func DeleteAzRoleDefinitionByFqid ¶ added in v0.8.8
func DumpLoginValues ¶ added in v0.12.0
func DumpLoginValues(z Bundle)
func DumpRuntimeValues ¶ added in v0.12.0
func DumpRuntimeValues(z Bundle)
func FindAzObjectsByUuid ¶ added in v0.8.8
func GetAdRoles ¶ added in v0.8.0
func GetAzAdRoleByUuid ¶ added in v0.8.8
func GetAzAdRoles ¶ added in v0.8.0
func GetAzAppByUuid ¶ added in v0.8.8
func GetAzGroupByUuid ¶ added in v0.8.8
func GetAzGroups ¶ added in v0.8.0
func GetAzMgGroups ¶ added in v0.8.0
func GetAzMgGroups(z Bundle) (list []interface{})
func GetAzObjectByUuid ¶ added in v0.8.8
func GetAzObjects ¶ added in v0.8.0
func GetAzRbacScopes ¶ added in v0.8.0
func GetAzRoleAssignmentByObject ¶ added in v0.8.8
func GetAzRoleAssignmentByUuid ¶ added in v0.8.8
func GetAzRoleAssignments ¶ added in v0.8.0
func GetAzRoleDefinitionByName ¶ added in v0.8.8
func GetAzRoleDefinitionByObject ¶ added in v0.8.8
func GetAzRoleDefinitionByUuid ¶ added in v0.8.8
func GetAzRoleDefinitions ¶ added in v0.8.0
func GetAzSpByUuid ¶ added in v0.8.8
func GetAzSubscriptionByUuid ¶ added in v0.8.8
func GetAzSubscriptions ¶ added in v0.8.0
func GetAzSubscriptions(z Bundle) (list []interface{})
func GetAzSubscriptionsIds ¶ added in v0.8.0
func GetAzUserByUuid ¶ added in v0.8.8
func GetAzUsers ¶ added in v0.8.0
func GetCachedObjects ¶ added in v1.0.0
func GetCachedObjects(cacheFile string) (cachedList []interface{})
func GetIdMapApps ¶ added in v0.8.0
func GetIdMapGroups ¶ added in v0.8.0
func GetIdMapMgGroups ¶ added in v0.8.8
func GetIdMapRoleDefs ¶ added in v0.8.0
func GetIdMapSps ¶ added in v0.8.0
func GetIdMapSubs ¶ added in v0.8.0
func GetIdMapUsers ¶ added in v0.8.0
func GetMgGroups ¶ added in v0.8.0
func GetObjectFromFile ¶ added in v0.8.0
func GetObjects ¶ added in v0.8.0
func GetRoleAssignments ¶ added in v0.8.0
func GetRoleDefinitions ¶ added in v0.8.0
func GetSubscriptions ¶ added in v0.8.0
func GetTokenByCredentials ¶
func GetTokenInteractively ¶
func GroupsCountAzure ¶ added in v0.8.0
func GroupsCountLocal ¶ added in v0.8.0
func MgGroupCountAzure ¶ added in v0.8.0
func MgGroupCountLocal ¶ added in v0.8.0
func NormalizeCache ¶ added in v0.8.0
func NormalizeCache(baseSet, deltaSet []interface{}) (list []interface{})
func PrintAdRole ¶ added in v0.8.0
func PrintApiErrMsg ¶ added in v0.12.0
func PrintApiErrMsg(msg string)
func PrintCertificateList ¶ added in v0.9.10
func PrintCertificateList(certificates []interface{})
func PrintCountStatus ¶ added in v0.8.0
func PrintCountStatus(z Bundle)
func PrintGroup ¶ added in v0.8.0
func PrintHeaders ¶ added in v0.9.2
func PrintMatching ¶ added in v0.9.13
func PrintMemberOfs ¶ added in v0.8.0
func PrintMemberOfs(t string, memberOf []interface{})
func PrintMgChildren ¶ added in v0.8.0
func PrintMgChildren(indent int, children []interface{})
func PrintMgGroup ¶ added in v0.8.0
func PrintMgGroup(x map[string]interface{})
func PrintMgTree ¶ added in v0.8.0
func PrintMgTree(z Bundle)
func PrintObject ¶ added in v0.8.0
func PrintObjectByUuid ¶ added in v0.8.8
func PrintOwners ¶ added in v0.9.10
func PrintOwners(owners []interface{})
func PrintParams ¶ added in v0.9.2
func PrintRoleAssignment ¶ added in v0.8.0
func PrintRoleAssignmentReport ¶ added in v0.8.0
func PrintRoleAssignmentReport(z Bundle)
func PrintRoleDefinition ¶ added in v0.8.0
func PrintSecretList ¶ added in v0.9.10
func PrintSecretList(pwdCreds []interface{})
func PrintStringMapColor ¶ added in v0.9.3
func PrintSubscription ¶ added in v0.8.0
func PrintSubscription(x map[string]interface{})
func PrintTersely ¶ added in v0.8.0
func PrintTersely(t string, object interface{})
func RemoveAppSecret ¶ added in v0.10.0
func RemoveCacheFile ¶ added in v0.8.0
func RemoveSpSecret ¶ added in v0.10.0
func RoleAssignmentsCountAzure ¶ added in v0.8.0
func RoleAssignmentsCountLocal ¶ added in v0.8.0
func RoleDefinitionCountAzure ¶ added in v0.8.0
func RoleDefinitionCountLocal ¶ added in v0.8.0
func SelectObject ¶ added in v0.8.0
func SetupAutomatedLogin ¶
func SetupAutomatedLogin(z Bundle)
func SetupInterativeLogin ¶
func SetupInterativeLogin(z Bundle)
func SpsCountAzure ¶ added in v0.8.0
func SpsCountLocal ¶ added in v0.8.0
func SubsCountAzure ¶ added in v0.8.0
func SubsCountLocal ¶ added in v0.8.0
func UpsertAzObject ¶ added in v0.8.8
func UpsertAzRoleDefinition ¶ added in v0.8.8
func UsersCountAzure ¶ added in v0.8.0
func UsersCountLocal ¶ added in v0.8.0
Types ¶
type Bundle ¶
type Bundle struct {
ConfDir string // Directory where utility will store all its file
CredsFile string
TokenFile string
TenantId string
ClientId string
ClientSecret string
Interactive bool
Username string
AuthorityUrl string
MgToken string // This and below to support MS Graph API
MgHeaders map[string]string
AzToken string // This and below to support Azure Resource Management API
AzHeaders map[string]string
}
func SetupApiTokens ¶
func SetupCredentials ¶
type TokenCache ¶
type TokenCache struct {
// contains filtered or unexported fields
}
func (*TokenCache) Replace ¶
func (t *TokenCache) Replace(cache cache.Unmarshaler, key string)
Click to show internal directories.
Click to hide internal directories.