-
Notifications
You must be signed in to change notification settings - Fork 4
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
0 parents
commit 29c7dde
Showing
331 changed files
with
17,558 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Specify files that shouldn't be modified by Fern |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Fern | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,39 @@ | ||
// This file was auto-generated by Fern from our API Definition. | ||
|
||
package api | ||
|
||
import ( | ||
json "encoding/json" | ||
) | ||
|
||
type AlertRule struct { | ||
Strategy AlertStrategy `json:"strategy,omitempty"` | ||
type_ string | ||
} | ||
|
||
func (a *AlertRule) Type() string { | ||
return a.type_ | ||
} | ||
|
||
func (a *AlertRule) UnmarshalJSON(data []byte) error { | ||
type unmarshaler AlertRule | ||
var value unmarshaler | ||
if err := json.Unmarshal(data, &value); err != nil { | ||
return err | ||
} | ||
*a = AlertRule(value) | ||
a.type_ = "alert" | ||
return nil | ||
} | ||
|
||
func (a *AlertRule) MarshalJSON() ([]byte, error) { | ||
type embed AlertRule | ||
var marshaler = struct { | ||
embed | ||
Type string `json:"type,omitempty"` | ||
}{ | ||
embed: embed(*a), | ||
Type: "alert", | ||
} | ||
return json.Marshal(marshaler) | ||
} |
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,48 @@ | ||
// This file was auto-generated by Fern from our API Definition. | ||
|
||
package api | ||
|
||
import ( | ||
json "encoding/json" | ||
fmt "fmt" | ||
strconv "strconv" | ||
) | ||
|
||
// Alert strategy to use | ||
type AlertStrategy uint8 | ||
|
||
const ( | ||
AlertStrategyEachAttempt AlertStrategy = iota + 1 | ||
AlertStrategyLastAttempt | ||
) | ||
|
||
func (a AlertStrategy) String() string { | ||
switch a { | ||
default: | ||
return strconv.Itoa(int(a)) | ||
case AlertStrategyEachAttempt: | ||
return "each_attempt" | ||
case AlertStrategyLastAttempt: | ||
return "last_attempt" | ||
} | ||
} | ||
|
||
func (a AlertStrategy) MarshalJSON() ([]byte, error) { | ||
return []byte(fmt.Sprintf("%q", a.String())), nil | ||
} | ||
|
||
func (a *AlertStrategy) UnmarshalJSON(data []byte) error { | ||
var raw string | ||
if err := json.Unmarshal(data, &raw); err != nil { | ||
return err | ||
} | ||
switch raw { | ||
case "each_attempt": | ||
value := AlertStrategyEachAttempt | ||
*a = value | ||
case "last_attempt": | ||
value := AlertStrategyLastAttempt | ||
*a = value | ||
} | ||
return 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,14 @@ | ||
// This file was auto-generated by Fern from our API Definition. | ||
|
||
package api | ||
|
||
// Error response model | ||
type ApiErrorResponse struct { | ||
// Error code | ||
Code string `json:"code,omitempty"` | ||
// Status code | ||
Status float64 `json:"status,omitempty"` | ||
// Error description | ||
Message string `json:"message,omitempty"` | ||
Data *ApiErrorResponseData `json:"data,omitempty"` | ||
} |
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,6 @@ | ||
// This file was auto-generated by Fern from our API Definition. | ||
|
||
package api | ||
|
||
type ApiErrorResponseData struct { | ||
} |
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,8 @@ | ||
// This file was auto-generated by Fern from our API Definition. | ||
|
||
package api | ||
|
||
type ApiKeyIntegrationConfigs struct { | ||
HeaderKey string `json:"header_key,omitempty"` | ||
ApiKey string `json:"api_key,omitempty"` | ||
} |
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,7 @@ | ||
// This file was auto-generated by Fern from our API Definition. | ||
|
||
package api | ||
|
||
type AttachedIntegrationToSource struct { | ||
Success bool `json:"success,omitempty"` | ||
} |
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,150 @@ | ||
// This file was auto-generated by Fern from our API Definition. | ||
|
||
package api | ||
|
||
import ( | ||
json "encoding/json" | ||
fmt "fmt" | ||
strconv "strconv" | ||
) | ||
|
||
// Attempt could not complete because of an error | ||
type AttemptErrorCodes uint8 | ||
|
||
const ( | ||
AttemptErrorCodesTimeout AttemptErrorCodes = iota + 1 | ||
AttemptErrorCodesNotFound | ||
AttemptErrorCodesConnectionRefused | ||
AttemptErrorCodesConnectionReset | ||
AttemptErrorCodesMissingUrl | ||
AttemptErrorCodesCli | ||
AttemptErrorCodesCliUnavailable | ||
AttemptErrorCodesSelfSignedCert | ||
AttemptErrorCodesErrTlsCertAltnameInvalid | ||
AttemptErrorCodesSslErrorCaUnknown | ||
AttemptErrorCodesTtlExpired | ||
AttemptErrorCodesDataArchived | ||
AttemptErrorCodesSslCertExpired | ||
AttemptErrorCodesBulkRetryCancelled | ||
AttemptErrorCodesDnsLookupFailed | ||
AttemptErrorCodesHostUnreachable | ||
AttemptErrorCodesProtocolError | ||
AttemptErrorCodesSocketClosed | ||
AttemptErrorCodesUnknown | ||
) | ||
|
||
func (a AttemptErrorCodes) String() string { | ||
switch a { | ||
default: | ||
return strconv.Itoa(int(a)) | ||
case AttemptErrorCodesTimeout: | ||
return "TIMEOUT" | ||
case AttemptErrorCodesNotFound: | ||
return "NOT_FOUND" | ||
case AttemptErrorCodesConnectionRefused: | ||
return "CONNECTION_REFUSED" | ||
case AttemptErrorCodesConnectionReset: | ||
return "CONNECTION_RESET" | ||
case AttemptErrorCodesMissingUrl: | ||
return "MISSING_URL" | ||
case AttemptErrorCodesCli: | ||
return "CLI" | ||
case AttemptErrorCodesCliUnavailable: | ||
return "CLI_UNAVAILABLE" | ||
case AttemptErrorCodesSelfSignedCert: | ||
return "SELF_SIGNED_CERT" | ||
case AttemptErrorCodesErrTlsCertAltnameInvalid: | ||
return "ERR_TLS_CERT_ALTNAME_INVALID" | ||
case AttemptErrorCodesSslErrorCaUnknown: | ||
return "SSL_ERROR_CA_UNKNOWN" | ||
case AttemptErrorCodesTtlExpired: | ||
return "TTL_EXPIRED" | ||
case AttemptErrorCodesDataArchived: | ||
return "DATA_ARCHIVED" | ||
case AttemptErrorCodesSslCertExpired: | ||
return "SSL_CERT_EXPIRED" | ||
case AttemptErrorCodesBulkRetryCancelled: | ||
return "BULK_RETRY_CANCELLED" | ||
case AttemptErrorCodesDnsLookupFailed: | ||
return "DNS_LOOKUP_FAILED" | ||
case AttemptErrorCodesHostUnreachable: | ||
return "HOST_UNREACHABLE" | ||
case AttemptErrorCodesProtocolError: | ||
return "PROTOCOL_ERROR" | ||
case AttemptErrorCodesSocketClosed: | ||
return "SOCKET_CLOSED" | ||
case AttemptErrorCodesUnknown: | ||
return "UNKNOWN" | ||
} | ||
} | ||
|
||
func (a AttemptErrorCodes) MarshalJSON() ([]byte, error) { | ||
return []byte(fmt.Sprintf("%q", a.String())), nil | ||
} | ||
|
||
func (a *AttemptErrorCodes) UnmarshalJSON(data []byte) error { | ||
var raw string | ||
if err := json.Unmarshal(data, &raw); err != nil { | ||
return err | ||
} | ||
switch raw { | ||
case "TIMEOUT": | ||
value := AttemptErrorCodesTimeout | ||
*a = value | ||
case "NOT_FOUND": | ||
value := AttemptErrorCodesNotFound | ||
*a = value | ||
case "CONNECTION_REFUSED": | ||
value := AttemptErrorCodesConnectionRefused | ||
*a = value | ||
case "CONNECTION_RESET": | ||
value := AttemptErrorCodesConnectionReset | ||
*a = value | ||
case "MISSING_URL": | ||
value := AttemptErrorCodesMissingUrl | ||
*a = value | ||
case "CLI": | ||
value := AttemptErrorCodesCli | ||
*a = value | ||
case "CLI_UNAVAILABLE": | ||
value := AttemptErrorCodesCliUnavailable | ||
*a = value | ||
case "SELF_SIGNED_CERT": | ||
value := AttemptErrorCodesSelfSignedCert | ||
*a = value | ||
case "ERR_TLS_CERT_ALTNAME_INVALID": | ||
value := AttemptErrorCodesErrTlsCertAltnameInvalid | ||
*a = value | ||
case "SSL_ERROR_CA_UNKNOWN": | ||
value := AttemptErrorCodesSslErrorCaUnknown | ||
*a = value | ||
case "TTL_EXPIRED": | ||
value := AttemptErrorCodesTtlExpired | ||
*a = value | ||
case "DATA_ARCHIVED": | ||
value := AttemptErrorCodesDataArchived | ||
*a = value | ||
case "SSL_CERT_EXPIRED": | ||
value := AttemptErrorCodesSslCertExpired | ||
*a = value | ||
case "BULK_RETRY_CANCELLED": | ||
value := AttemptErrorCodesBulkRetryCancelled | ||
*a = value | ||
case "DNS_LOOKUP_FAILED": | ||
value := AttemptErrorCodesDnsLookupFailed | ||
*a = value | ||
case "HOST_UNREACHABLE": | ||
value := AttemptErrorCodesHostUnreachable | ||
*a = value | ||
case "PROTOCOL_ERROR": | ||
value := AttemptErrorCodesProtocolError | ||
*a = value | ||
case "SOCKET_CLOSED": | ||
value := AttemptErrorCodesSocketClosed | ||
*a = value | ||
case "UNKNOWN": | ||
value := AttemptErrorCodesUnknown | ||
*a = value | ||
} | ||
return 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,65 @@ | ||
// This file was auto-generated by Fern from our API Definition. | ||
|
||
package api | ||
|
||
import ( | ||
json "encoding/json" | ||
fmt "fmt" | ||
strconv "strconv" | ||
) | ||
|
||
type AttemptState uint8 | ||
|
||
const ( | ||
AttemptStateDelivering AttemptState = iota + 1 | ||
AttemptStateQueued | ||
AttemptStatePending | ||
AttemptStateCompleted | ||
AttemptStateHold | ||
) | ||
|
||
func (a AttemptState) String() string { | ||
switch a { | ||
default: | ||
return strconv.Itoa(int(a)) | ||
case AttemptStateDelivering: | ||
return "DELIVERING" | ||
case AttemptStateQueued: | ||
return "QUEUED" | ||
case AttemptStatePending: | ||
return "PENDING" | ||
case AttemptStateCompleted: | ||
return "COMPLETED" | ||
case AttemptStateHold: | ||
return "HOLD" | ||
} | ||
} | ||
|
||
func (a AttemptState) MarshalJSON() ([]byte, error) { | ||
return []byte(fmt.Sprintf("%q", a.String())), nil | ||
} | ||
|
||
func (a *AttemptState) UnmarshalJSON(data []byte) error { | ||
var raw string | ||
if err := json.Unmarshal(data, &raw); err != nil { | ||
return err | ||
} | ||
switch raw { | ||
case "DELIVERING": | ||
value := AttemptStateDelivering | ||
*a = value | ||
case "QUEUED": | ||
value := AttemptStateQueued | ||
*a = value | ||
case "PENDING": | ||
value := AttemptStatePending | ||
*a = value | ||
case "COMPLETED": | ||
value := AttemptStateCompleted | ||
*a = value | ||
case "HOLD": | ||
value := AttemptStateHold | ||
*a = value | ||
} | ||
return nil | ||
} |
Oops, something went wrong.