Documentation ¶
Index ¶
- func GetEnvOrDefault(k string, defaultvalue string) string
- func GetKeys(hash map[string]interface{}) []string
- func GetObjectAtKey(data map[string]interface{}, path string, debug bool) (interface{}, error)
- func GetStringAtKey(data map[string]interface{}, path string, debug bool) (string, error)
- func Provider() *schema.Provider
- type APIClient
- type APIObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvOrDefault ¶ added in v1.8.0
GetEnvOrDefault is a helper function that returns the value of the given environment variable, if one exists, or the default value
func GetKeys ¶ added in v1.3.0
GetKeys is a handy helper to just dump the keys of a map into a slice
func GetObjectAtKey ¶ added in v1.3.0
GetObjectAtKey is a handy helper that will dig through a map and find something
at the defined key. The returned data is not type checked Example: Given: { "attrs": { "id": 1234 }, "config": { "foo": "abc", "bar": "xyz" } }
Result: attrs/id => 1234 config/foo => "abc"
func GetStringAtKey ¶ added in v1.3.0
GetStringAtKey uses GetObjectAtKey to verify the resulting
object is either a JSON string or Number and returns it as a string
Types ¶
type APIClient ¶ added in v1.16.0
type APIClient struct {
// contains filtered or unexported fields
}
APIClient is a HTTP client with additional controlling fields
func NewAPIClient ¶
NewAPIClient makes a new api client for RESTful calls
type APIObject ¶ added in v1.16.0
type APIObject struct {
// contains filtered or unexported fields
}
APIObject is the state holding struct for a restapi_object resource
func NewAPIObject ¶
NewAPIObject makes an APIobject to manage a RESTful object in an API
Click to show internal directories.
Click to hide internal directories.