Documentation
¶
Index ¶
- Constants
- Variables
- func Base64ToJWK(privateKey string) (jwk jose.JSONWebKey, err error)
- func EcdsaToJWK(key any) (*jose.JSONWebKey, error)
- func GenerateKeys() (*jose.JSONWebKey, *jose.JSONWebKey, error)
- func GeneratePARJWT(orgId int64, runnerId string, privateKey *ecdsa.PrivateKey, ...) (string, error)
- func JWKToPEM(pubJWK *jose.JSONWebKey) (string, error)
- func MakeRunnerURN(region string, orgID int64, runnerID string) string
- func ParseResponseBody(contentType string, data []byte, responseParsing string, ...) (interface{}, error)
- type CircuitBreaker
- type FormDataField
- type PARError
- func DefaultActionError(e error) PARError
- func DefaultActionErrorWithDisplayError(e error, displayError string) PARError
- func DefaultPARError(e error) PARError
- func NewPARError(code aperrorpb.ActionPlatformErrorCode, e error) PARError
- func NewPARErrorWithDisplayError(code aperrorpb.ActionPlatformErrorCode, e error, displayError string) PARError
- type RunnerURNParts
Constants ¶
View Source
const ( Raw string = "raw" JSON string = "json" FormData string = "form-data" FormURLEncoded string = "form-urlencoded" )
Variables ¶
View Source
var CharsetAliases = map[string]string{
"iso-8859-1": "latin1",
"iso88591": "latin1",
"iso8859-1": "latin1",
}
View Source
var Encoding = []string{"ascii", "utf8", "utf-8", "utf16le", "ucs2", "ucs-2", "base64", "base64url", "latin1", "binary", "hex"}
Functions ¶
func Base64ToJWK ¶
func Base64ToJWK(privateKey string) (jwk jose.JSONWebKey, err error)
func EcdsaToJWK ¶
func EcdsaToJWK(key any) (*jose.JSONWebKey, error)
func GenerateKeys ¶
func GenerateKeys() (*jose.JSONWebKey, *jose.JSONWebKey, error)
func GeneratePARJWT ¶
Types ¶
type CircuitBreaker ¶
type CircuitBreaker struct {
// contains filtered or unexported fields
}
CircuitBreaker is a rudimentary circuit breaker that performs retries using exponential backoff.
func NewCircuitBreaker ¶
func NewCircuitBreaker(name string, minBackoff, maxBackoff, waitBeforeRetry time.Duration, maxAttempts int32) *CircuitBreaker
type FormDataField ¶
type PARError ¶
type PARError struct {
*aperrorpb.ActionPlatformError
}
func DefaultActionError ¶
DefaultActionError generates the default PAR action error with a default action error code.
func DefaultActionErrorWithDisplayError ¶
DefaultActionErrorWithDisplayError generates the default PAR action error with a default action error code and display error.
func DefaultPARError ¶
DefaultPARError generates the default PAR error with a default error code, and default internal error message.
func NewPARError ¶
func NewPARError(code aperrorpb.ActionPlatformErrorCode, e error) PARError
NewPARError creates a general PAR error with default config.
func NewPARErrorWithDisplayError ¶
func NewPARErrorWithDisplayError(code aperrorpb.ActionPlatformErrorCode, e error, displayError string) PARError
NewPARErrorWithDisplayError creates a general PAR error with display error.
type RunnerURNParts ¶
func ParseRunnerURN ¶
func ParseRunnerURN(urn string) (RunnerURNParts, error)
Click to show internal directories.
Click to hide internal directories.