Documentation ¶
Index ¶
- func AutotypeList(input []interface{}) []interface{}
- func AutotypeMap(input map[string]interface{}) map[string]interface{}
- func AutotypeValue(input interface{}) interface{}
- func CleanupJSON(input interface{}) interface{}
- func DCOSHTTPClient(client *dcos.APIClient) *http.Client
- func DCOSNewRequest(client *dcos.APIClient, method, url string, body io.Reader) (*http.Request, error)
- func DefaultJSONFromSchema(inputSchema map[string]interface{}) (map[string]map[string]interface{}, error)
- func FlatToNestedMap(input map[string]interface{}) (map[string]map[string]interface{}, error)
- func GetDictDiff(reference map[string]interface{}, input map[string]interface{}) map[string]interface{}
- func GetVerboseCosmosError(error error, resp *http.Response) string
- func HashDict(input map[string]interface{}) (string, error)
- func InterfaceSliceInt32(s []interface{}) (r []int32, ok bool)
- func InterfaceSliceString(s []interface{}) (r []string, ok bool)
- func NestedToFlatMap(input map[string]map[string]interface{}) map[string]interface{}
- func NormalizeJSON(inputJson string) (string, error)
- func PrintJSON(anyJson interface{}) string
- type DCOSVersionSpec
- type PlanPhase
- type PlanRestartRequest
- type PlanStep
- type PlansListResponse
- type SDKApiClient
- func (client *SDKApiClient) GetAllMeta() (map[string]interface{}, error)
- func (client *SDKApiClient) GetMeta(key string, defaultValue interface{}) (interface{}, error)
- func (client *SDKApiClient) PlanGetStatus(plan string) (*PlansListResponse, error)
- func (client *SDKApiClient) PlanRestart(plan string) error
- func (client *SDKApiClient) SetAllMeta(meta map[string]interface{}) error
- func (client *SDKApiClient) SetMeta(key string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutotypeList ¶
func AutotypeList(input []interface{}) []interface{}
*
- Processes the values of the given slice and tries some best-effort type-casting
func AutotypeValue ¶
func AutotypeValue(input interface{}) interface{}
*
- Best-effort auto-typing of strings that follow the given patterns: *
- 1) Numeric values --> float64
- 2) "true" / "false" --> bool
- 3) "null" --> nil
- 5) <anything else> --> string
func CleanupJSON ¶
func CleanupJSON(input interface{}) interface{}
*
- Remove empty strings, nulls, empty arrays and empty objects from the given dict
func DCOSNewRequest ¶
func DefaultJSONFromSchema ¶
func DefaultJSONFromSchema(inputSchema map[string]interface{}) (map[string]map[string]interface{}, error)
*
- Processes the given JSON schema and extracts the default values into a
- configuration JSON object
func GetDictDiff ¶
func GetDictDiff(reference map[string]interface{}, input map[string]interface{}) map[string]interface{}
*
- GetDictDiff Returns a map with all the different keys in `input`, compared to `reference`
func GetVerboseCosmosError ¶
*
- GetVerboseCosmosError collects as much information as possible from the error
- and the HTTP response in order to provide enough information to the user,
- explaining the error that occurred.
func InterfaceSliceInt32 ¶
InterfaceSliceInt32 transforms a []interface{} into []int32
func InterfaceSliceString ¶
InterfaceSliceString transforms a []interface{} into []string
Types ¶
type DCOSVersionSpec ¶
type DCOSVersionSpec struct { Version string `json:"version,omitempty"` DcosVariant string `json:"dcos-variant,omitempty"` DcosImageCommit string `json:"dcos-image-commit,omitempty"` BootstrapId string `json:"bootstrap-id,omitempty"` }
func DCOSGetVersion ¶
func DCOSGetVersion(client *dcos.APIClient) (DCOSVersionSpec, error)
*
- Get the DC/OS version from /dcos-metadata/dcos-version.json
type PlanRestartRequest ¶
type PlansListResponse ¶
type SDKApiClient ¶
type SDKApiClient struct { AppID string ClusterURL string Client *http.Client Headers map[string]string }
func CreateSDKAPIClient ¶
func CreateSDKAPIClient(client *dcos.APIClient, appId string) *SDKApiClient
*
- CreateSDKAPIClientFor initializes an SDKApiClient API
func (*SDKApiClient) GetAllMeta ¶
func (client *SDKApiClient) GetAllMeta() (map[string]interface{}, error)
*
- GetAllMeta returns a map with all the stored configuration properties for this SDK app
func (*SDKApiClient) GetMeta ¶
func (client *SDKApiClient) GetMeta(key string, defaultValue interface{}) (interface{}, error)
*
- GetMeta returns a single meta-data parameter value
func (*SDKApiClient) PlanGetStatus ¶
func (client *SDKApiClient) PlanGetStatus(plan string) (*PlansListResponse, error)
*
- Describe package
func (*SDKApiClient) PlanRestart ¶
func (client *SDKApiClient) PlanRestart(plan string) error
*
- Describe package
func (*SDKApiClient) SetAllMeta ¶
func (client *SDKApiClient) SetAllMeta(meta map[string]interface{}) error
*
- SetAllMeta replaces the entire configuration properties of the SDK app
func (*SDKApiClient) SetMeta ¶
func (client *SDKApiClient) SetMeta(key string, value interface{}) error
*
- SetMeta updates a single meta-data parameter value
Click to show internal directories.
Click to hide internal directories.