Skip to content

Commit

Permalink
Release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed May 7, 2024
1 parent 7c4a530 commit 710d61d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion core/client_option.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ func (c *ClientOptions) cloneHeader() http.Header {
headers := c.HTTPHeader.Clone()
headers.Set("X-Fern-Language", "Go")
headers.Set("X-Fern-SDK-Name", "github.com/hookdeck/hookdeck-go-sdk")
headers.Set("X-Fern-SDK-Version", "v0.1.0")
headers.Set("X-Fern-SDK-Version", "v0.2.0")
return headers
}
42 changes: 21 additions & 21 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,45 +894,45 @@ type DestinationAuthMethodOAuth2AuthorizationCodeConfig struct {
Scope *string `json:"scope,omitempty"`
// URL of the auth server
AuthServer string `json:"auth_server"`
}

// OAuth2 Client Credentials config for the destination's auth method
type DestinationAuthMethodOAuth2ClientCredentialsConfig struct {
// Client id in the auth server
ClientId string `json:"client_id"`
// Client secret in the auth server
ClientSecret string `json:"client_secret"`
// Scope to access
Scope *string `json:"scope,omitempty"`
// URL of the auth server
AuthServer string `json:"auth_server"`
// Basic (default) or Bearer Authentication
AuthenticationType *DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationType `json:"authentication_type,omitempty"`
AuthenticationType *DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationType `json:"authentication_type,omitempty"`
}

// Basic (default) or Bearer Authentication
type DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationType string
type DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationType string

const (
DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationTypeBasic DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationType = "basic"
DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationTypeBearer DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationType = "bearer"
DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationTypeBasic DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationType = "basic"
DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationTypeBearer DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationType = "bearer"
)

func NewDestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationTypeFromString(s string) (DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationType, error) {
func NewDestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationTypeFromString(s string) (DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationType, error) {
switch s {
case "basic":
return DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationTypeBasic, nil
return DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationTypeBasic, nil
case "bearer":
return DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationTypeBearer, nil
return DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationTypeBearer, nil
}
var t DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationType
var t DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationType
return "", fmt.Errorf("%s is not a valid %T", s, t)
}

func (d DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationType) Ptr() *DestinationAuthMethodOAuth2AuthorizationCodeConfigAuthenticationType {
func (d DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationType) Ptr() *DestinationAuthMethodOAuth2ClientCredentialsConfigAuthenticationType {
return &d
}

// OAuth2 Client Credentials config for the destination's auth method
type DestinationAuthMethodOAuth2ClientCredentialsConfig struct {
// Client id in the auth server
ClientId string `json:"client_id"`
// Client secret in the auth server
ClientSecret string `json:"client_secret"`
// Scope to access
Scope *string `json:"scope,omitempty"`
// URL of the auth server
AuthServer string `json:"auth_server"`
}

// Empty config for the destination's auth method
type DestinationAuthMethodSignatureConfig struct {
}
Expand Down

0 comments on commit 710d61d

Please sign in to comment.