-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8b0fd1
commit cda67b2
Showing
4 changed files
with
95 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Manually added | ||
package abtest | ||
|
||
import ( | ||
"github.com/newrelic/newrelic-client-go/v2/internal/http" | ||
"github.com/newrelic/newrelic-client-go/v2/pkg/config" | ||
"github.com/newrelic/newrelic-client-go/v2/pkg/logging" | ||
) | ||
|
||
type AbTest struct { | ||
client http.Client | ||
logger logging.Logger | ||
} | ||
|
||
// New is used to create a new Ab Test. | ||
func New(config config.Config) AbTest { | ||
client := http.NewClient(config) | ||
|
||
pkg := AbTest{ | ||
client: client, | ||
logger: config.GetLogger(), | ||
} | ||
|
||
return pkg | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,18 @@ | ||
// Manually added types | ||
package abtest | ||
|
||
// AbTestGetVariationResponse - A response returning a VariationKey and a potential array of abTestError | ||
type AbTestGetVariationResponse struct { | ||
// An array of errors | ||
Errors []abTestError `json:"errors,omitempty"` | ||
// Variation key denoted the inclusion status of an accountId for a given experiment | ||
VariationKey string `json:"variationKey,omitempty"` | ||
} | ||
|
||
// abTestError - An error Message combined with its Type of error | ||
type abTestError struct { | ||
// A description of the error | ||
Message string `json:"message"` | ||
// The kind of error which occurred | ||
Type string `json:"type"` | ||
} |