-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Releasing version 65.67.1
- Loading branch information
Showing
51 changed files
with
1,763 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,7 +209,7 @@ go install github.com/golang/lint/golint | |
``` | ||
- Install [staticcheck](https://github.com/dominikh/go-tools) with the command: | ||
``` | ||
go install honnef.co/go/tools/cmd/[email protected].3 | ||
go install honnef.co/go/tools/cmd/[email protected].7 | ||
``` | ||
|
||
### Linting and Staticcheck | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
// Application Performance Monitoring Configuration API | ||
// | ||
// Use the Application Performance Monitoring Configuration API to query and set Application Performance Monitoring | ||
// configuration. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). | ||
// | ||
|
||
package apmconfig | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// FilterTextOrId A span filter written in text, or as the OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a | ||
// SpanFilter resource. If both are given, the filterText is used. | ||
type FilterTextOrId struct { | ||
|
||
// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of a Span Filter. The filterId is mandatory for the creation | ||
// of MetricGroups. A filterId is generated when a Span Filter is created. | ||
FilterId *string `mandatory:"false" json:"filterId"` | ||
|
||
// The string that defines the Span Filter expression. | ||
FilterText *string `mandatory:"false" json:"filterText"` | ||
} | ||
|
||
func (m FilterTextOrId) String() string { | ||
return common.PointerString(m) | ||
} | ||
|
||
// ValidateEnumValue returns an error when providing an unsupported enum value | ||
// This function is being called during constructing API request process | ||
// Not recommended for calling this function directly | ||
func (m FilterTextOrId) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
// Application Performance Monitoring Configuration API | ||
// | ||
// Use the Application Performance Monitoring Configuration API to query and set Application Performance Monitoring | ||
// configuration. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). | ||
// | ||
|
||
package apmconfig | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// TestDetails The request body used to execute a test. | ||
type TestDetails interface { | ||
} | ||
|
||
type testdetails struct { | ||
JsonData []byte | ||
TestType string `json:"testType"` | ||
} | ||
|
||
// UnmarshalJSON unmarshals json | ||
func (m *testdetails) UnmarshalJSON(data []byte) error { | ||
m.JsonData = data | ||
type Unmarshalertestdetails testdetails | ||
s := struct { | ||
Model Unmarshalertestdetails | ||
}{} | ||
err := json.Unmarshal(data, &s.Model) | ||
if err != nil { | ||
return err | ||
} | ||
m.TestType = s.Model.TestType | ||
|
||
return err | ||
} | ||
|
||
// UnmarshalPolymorphicJSON unmarshals polymorphic json | ||
func (m *testdetails) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { | ||
|
||
if data == nil || string(data) == "null" { | ||
return nil, nil | ||
} | ||
|
||
var err error | ||
switch m.TestType { | ||
case "SPAN_ENRICHMENT": | ||
mm := TestSpanEnrichmentDetails{} | ||
err = json.Unmarshal(data, &mm) | ||
return mm, err | ||
default: | ||
common.Logf("Recieved unsupported enum value for TestDetails: %s.", m.TestType) | ||
return *m, nil | ||
} | ||
} | ||
|
||
func (m testdetails) String() string { | ||
return common.PointerString(m) | ||
} | ||
|
||
// ValidateEnumValue returns an error when providing an unsupported enum value | ||
// This function is being called during constructing API request process | ||
// Not recommended for calling this function directly | ||
func (m testdetails) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
// Application Performance Monitoring Configuration API | ||
// | ||
// Use the Application Performance Monitoring Configuration API to query and set Application Performance Monitoring | ||
// configuration. For more information, see Application Performance Monitoring (https://docs.oracle.com/iaas/application-performance-monitoring/index.html). | ||
// | ||
|
||
package apmconfig | ||
|
||
import ( | ||
"encoding/json" | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"strings" | ||
) | ||
|
||
// TestOutput The result of running a test. | ||
type TestOutput interface { | ||
} | ||
|
||
type testoutput struct { | ||
JsonData []byte | ||
TestType string `json:"testType"` | ||
} | ||
|
||
// UnmarshalJSON unmarshals json | ||
func (m *testoutput) UnmarshalJSON(data []byte) error { | ||
m.JsonData = data | ||
type Unmarshalertestoutput testoutput | ||
s := struct { | ||
Model Unmarshalertestoutput | ||
}{} | ||
err := json.Unmarshal(data, &s.Model) | ||
if err != nil { | ||
return err | ||
} | ||
m.TestType = s.Model.TestType | ||
|
||
return err | ||
} | ||
|
||
// UnmarshalPolymorphicJSON unmarshals polymorphic json | ||
func (m *testoutput) UnmarshalPolymorphicJSON(data []byte) (interface{}, error) { | ||
|
||
if data == nil || string(data) == "null" { | ||
return nil, nil | ||
} | ||
|
||
var err error | ||
switch m.TestType { | ||
case "SPAN_ENRICHMENT": | ||
mm := TestSpanEnrichmentOutput{} | ||
err = json.Unmarshal(data, &mm) | ||
return mm, err | ||
default: | ||
common.Logf("Recieved unsupported enum value for TestOutput: %s.", m.TestType) | ||
return *m, nil | ||
} | ||
} | ||
|
||
func (m testoutput) String() string { | ||
return common.PointerString(m) | ||
} | ||
|
||
// ValidateEnumValue returns an error when providing an unsupported enum value | ||
// This function is being called during constructing API request process | ||
// Not recommended for calling this function directly | ||
func (m testoutput) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
|
||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
// Copyright (c) 2016, 2018, 2024, Oracle and/or its affiliates. All rights reserved. | ||
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. | ||
// Code generated. DO NOT EDIT. | ||
|
||
package apmconfig | ||
|
||
import ( | ||
"fmt" | ||
"github.com/oracle/oci-go-sdk/v65/common" | ||
"net/http" | ||
"strings" | ||
) | ||
|
||
// TestRequest wrapper for the Test operation | ||
// | ||
// # See also | ||
// | ||
// Click https://docs.cloud.oracle.com/en-us/iaas/tools/go-sdk-examples/latest/apmconfig/Test.go.html to see an example of how to use TestRequest. | ||
type TestRequest struct { | ||
|
||
// The APM Domain ID the request is intended for. | ||
ApmDomainId *string `mandatory:"true" contributesTo:"query" name:"apmDomainId"` | ||
|
||
// The test input. | ||
TestDetails `contributesTo:"body"` | ||
|
||
// Unique identifier for the request. | ||
// If you need to contact Oracle about a particular request, please provide the request ID. | ||
OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` | ||
|
||
// Metadata about the request. This information will not be transmitted to the service, but | ||
// represents information that the SDK will consume to drive retry behavior. | ||
RequestMetadata common.RequestMetadata | ||
} | ||
|
||
func (request TestRequest) String() string { | ||
return common.PointerString(request) | ||
} | ||
|
||
// HTTPRequest implements the OCIRequest interface | ||
func (request TestRequest) HTTPRequest(method, path string, binaryRequestBody *common.OCIReadSeekCloser, extraHeaders map[string]string) (http.Request, error) { | ||
|
||
_, err := request.ValidateEnumValue() | ||
if err != nil { | ||
return http.Request{}, err | ||
} | ||
return common.MakeDefaultHTTPRequestWithTaggedStructAndExtraHeaders(method, path, request, extraHeaders) | ||
} | ||
|
||
// BinaryRequestBody implements the OCIRequest interface | ||
func (request TestRequest) BinaryRequestBody() (*common.OCIReadSeekCloser, bool) { | ||
|
||
return nil, false | ||
|
||
} | ||
|
||
// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. | ||
func (request TestRequest) RetryPolicy() *common.RetryPolicy { | ||
return request.RequestMetadata.RetryPolicy | ||
} | ||
|
||
// ValidateEnumValue returns an error when providing an unsupported enum value | ||
// This function is being called during constructing API request process | ||
// Not recommended for calling this function directly | ||
func (request TestRequest) ValidateEnumValue() (bool, error) { | ||
errMessage := []string{} | ||
if len(errMessage) > 0 { | ||
return true, fmt.Errorf(strings.Join(errMessage, "\n")) | ||
} | ||
return false, nil | ||
} | ||
|
||
// TestResponse wrapper for the Test operation | ||
type TestResponse struct { | ||
|
||
// The underlying http response | ||
RawResponse *http.Response | ||
|
||
// The TestOutput instance | ||
TestOutput `presentIn:"body"` | ||
|
||
// Unique Oracle-assigned identifier for the request. If you need to contact | ||
// Oracle about a particular request, please provide the request ID. | ||
OpcRequestId *string `presentIn:"header" name:"opc-request-id"` | ||
|
||
// For optimistic concurrency control. See `if-match`. | ||
Etag *string `presentIn:"header" name:"etag"` | ||
} | ||
|
||
func (response TestResponse) String() string { | ||
return common.PointerString(response) | ||
} | ||
|
||
// HTTPResponse implements the OCIResponse interface | ||
func (response TestResponse) HTTPResponse() *http.Response { | ||
return response.RawResponse | ||
} |
Oops, something went wrong.