Documentation ¶
Index ¶
- func ExtractObject(old interface{}, path string) interface{}
- func GetAzureResourceTypeApiVersion(resourceType string) (string, string, error)
- func GetId(resource interface{}) *string
- func GetName(id string) string
- func GetParentId(id string) string
- func GetParentType(resourceType string) string
- func GetResourceType(id string) string
- func GetScopeType(id string) types.ScopeType
- func IsTopLevelResourceType(resourceType string) bool
- func MergeObject(old interface{}, new interface{}) interface{}
- func NormalizeJson(jsonString interface{}) string
- func NormalizeObject(input interface{}) interface{}
- func OverrideWithPaths(old interface{}, new interface{}, path string, pathSet map[string]bool) (interface{}, error)
- func ResponseErrorWasNotFound(err error) bool
- func ResponseErrorWasStatusCode(err error, statusCode int) bool
- func UpdateObject(old interface{}, new interface{}, option UpdateJsonOption) interface{}
- type UpdateJsonOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractObject ¶
func ExtractObject(old interface{}, path string) interface{}
ExtractObject is used to extract object from old for a json path
func GetParentId ¶
func GetParentType ¶
func GetResourceType ¶
func GetScopeType ¶
func IsTopLevelResourceType ¶
func MergeObject ¶ added in v1.9.0
func MergeObject(old interface{}, new interface{}) interface{}
MergeObject is used to merge object old and new, if overlaps, use new value
func NormalizeJson ¶
func NormalizeJson(jsonString interface{}) string
func NormalizeObject ¶
func NormalizeObject(input interface{}) interface{}
NormalizeObject is used to remove customized type and replaced with builtin type
func OverrideWithPaths ¶ added in v1.9.0
func OverrideWithPaths(old interface{}, new interface{}, path string, pathSet map[string]bool) (interface{}, error)
OverrideWithPaths is used to override old object with new object for specific paths
func UpdateObject ¶ added in v1.9.0
func UpdateObject(old interface{}, new interface{}, option UpdateJsonOption) interface{}
UpdateObject is used to get an updated object which has same schema as old, but with new value
Types ¶
type UpdateJsonOption ¶
Click to show internal directories.
Click to hide internal directories.