Documentation ¶
Index ¶
- Constants
- Variables
- type ActionsConfig
- type AuthProviderConfig
- type BasicAuthConfig
- type BasicAuthUserConfig
- type BucketConfig
- type BucketCredentialConfig
- type BucketRequestConfig
- type CacheConfig
- type Config
- type CredentialConfig
- type DeleteActionConfig
- type DeleteActionConfigConfig
- type GetActionConfig
- type GetActionConfigConfig
- type HeaderAuthConfig
- type HeaderOIDCAuthorizationAccess
- type ListTargetsConfig
- type LogConfig
- type Manager
- type MetricsConfig
- type MountConfig
- type OIDCAuthConfig
- type OPAServerAuthorization
- type PutActionConfig
- type PutActionConfigConfig
- type PutActionConfigSystemMetadataConfig
- type Resource
- type ResourceBasic
- type ResourceHeaderOIDC
- type SSLURLConfig
- type ServerCompressConfig
- type ServerConfig
- type ServerCorsConfig
- type ServerSSLCertificate
- type ServerSSLConfig
- type ServerTimeoutsConfig
- type TargetConfig
- type TargetHelperConfigItem
- type TargetKeyRewriteConfig
- type TargetTemplateConfig
- type TargetTemplateConfigItem
- type TemplateConfig
- type TemplateConfigItem
- type TracingConfig
- type WebhookConfig
Constants ¶
const DefaultBucketRegion = "us-east-1"
DefaultBucketRegion Default bucket region.
const DefaultBucketS3ListMaxKeys int64 = 1000
DefaultBucketS3ListMaxKeys Default bucket S3 list max keys.
const DefaultInternalPort = 9090
DefaultInternalPort Default internal port.
const DefaultLogFormat = "json"
DefaultLogFormat Default Log format.
const DefaultLogLevel = "info"
DefaultLogLevel Default log level.
const DefaultOIDCCookieName = "oidc"
DefaultOIDCCookieName Default OIDC Cookie name.
const DefaultOIDCGroupClaim = "groups"
DefaultOIDCGroupClaim Default OIDC group claim.
const DefaultPort = 8080
DefaultPort Default port.
const DefaultS3MaxUploadParts = s3manager.MaxUploadParts
Default Upload configurations.
const DefaultS3UploadConcurrency = s3manager.DefaultUploadConcurrency
const DefaultS3UploadPartSize int64 = 5
const DefaultServerCompressLevel = 5
DefaultServerCompressLevel Default server compress level.
const DefaultServerTimeoutsReadHeaderTimeout = "60s"
DefaultServerTimeoutsReadHeaderTimeout Server timeouts ReadHeaderTimeout.
const DefaultTargetActionsGETConfigSignedURLExpiration = 15 * time.Minute
DefaultTargetActionsGETConfigSignedURLExpiration default signed url expiration.
const DefaultTemplateBadRequestErrorPath = "templates/bad-request-error.tpl"
DefaultTemplateBadRequestErrorPath Default template bad request path.
const DefaultTemplateDeletePath = "templates/delete.tpl"
DefaultTemplateDeletePath Default template delete path.
const DefaultTemplateFolderListPath = "templates/folder-list.tpl"
DefaultTemplateFolderListPath Default template folder list path.
const DefaultTemplateForbiddenErrorPath = "templates/forbidden-error.tpl"
DefaultTemplateForbiddenErrorPath Default template forbidden path.
const DefaultTemplateHelpersPath = "templates/_helpers.tpl"
DefaultTemplateHelpersPath Default template helpers path.
const DefaultTemplateInternalServerErrorPath = "templates/internal-server-error.tpl"
DefaultTemplateInternalServerErrorPath Default template Internal server error path.
const DefaultTemplateNotFoundErrorPath = "templates/not-found-error.tpl"
DefaultTemplateNotFoundErrorPath Default template not found path.
const DefaultTemplatePutPath = "templates/put.tpl"
DefaultTemplatePutPath Default template put path.
const DefaultTemplateStatusBadRequest = "400"
DefaultTemplateStatusBadRequest Default template for status bad request.
const DefaultTemplateStatusForbidden = "403"
DefaultTemplateStatusForbidden Default template for status forbidden.
const DefaultTemplateStatusInternalServerError = "500"
DefaultTemplateStatusInternalServerError Default template for status Internal Server Error.
const DefaultTemplateStatusNoContent = "204"
DefaultTemplateStatusNoContent Default template for status no content.
const DefaultTemplateStatusNotFound = "404"
DefaultTemplateStatusNotFound Default template for status not found.
const DefaultTemplateStatusOk = "200"
DefaultTemplateStatusOk Default template for status ok.
DefaultTemplateStatusUnauthorized Default template for status Unauthorized.
const DefaultTemplateTargetListPath = "templates/target-list.tpl"
DefaultTemplateTargetListPath Default template target list path.
DefaultTemplateUnauthorizedErrorPath Default template unauthorized error path.
const RegexTargetKeyRewriteTargetType = "REGEX"
RegexTargetKeyRewriteTargetType Regex target key rewrite Target type.
const TemplateTargetKeyRewriteTargetType = "TEMPLATE"
TemplateTargetKeyRewriteTargetType Template Target key rewrite Target type.
Variables ¶
var DefaultEmptyTemplateHeaders = map[string]string{}
DefaultEmptyTemplateHeaders Default empty template headers.
var DefaultOIDCScopes = []string{"openid", "profile", "email"}
DefaultOIDCScopes Default OIDC Scopes.
var DefaultServerCompressEnabled = true
DefaultServerCompressEnabled Default server compress enabled.
var DefaultServerCompressTypes = []string{
"text/html",
"text/css",
"text/plain",
"text/javascript",
"application/javascript",
"application/x-javascript",
"application/json",
"application/atom+xml",
"application/rss+xml",
"image/svg+xml",
}
DefaultServerCompressTypes Default server compress types.
var DefaultTemplateHeaders = map[string]string{
"Content-Type": "{{ template \"main.headers.contentType\" . }}",
}
DefaultTemplateHeaders Default template headers.
var ErrMainBucketPathSupportNotValid = errors.New("main bucket path support option can be enabled only when only one bucket is configured")
ErrMainBucketPathSupportNotValid Error thrown when main bucket path support option isn't valid.
var TemplateErrLoadingEnvCredentialEmpty = "error loading credentials, environment variable %s is empty" //nolint: gosec // No credentials here, false positive
TemplateErrLoadingEnvCredentialEmpty Template Error when Loading Environment variable Credentials.
Functions ¶
This section is empty.
Types ¶
type ActionsConfig ¶
type ActionsConfig struct { GET *GetActionConfig `mapstructure:"GET"` PUT *PutActionConfig `mapstructure:"PUT"` DELETE *DeleteActionConfig `mapstructure:"DELETE"` }
ActionsConfig is dedicated to actions configuration in a target.
type AuthProviderConfig ¶
type AuthProviderConfig struct { Basic map[string]*BasicAuthConfig `mapstructure:"basic" validate:"omitempty"` OIDC map[string]*OIDCAuthConfig `mapstructure:"oidc" validate:"omitempty"` Header map[string]*HeaderAuthConfig `mapstructure:"header" validate:"omitempty"` }
AuthProviderConfig Authentication provider configurations.
type BasicAuthConfig ¶
type BasicAuthConfig struct {
Realm string `mapstructure:"realm" validate:"required"`
}
BasicAuthConfig Basic auth configurations.
type BasicAuthUserConfig ¶
type BasicAuthUserConfig struct { Password *CredentialConfig `mapstructure:"password" validate:"required"` User string `mapstructure:"user" validate:"required"` }
BasicAuthUserConfig Basic User auth configuration.
type BucketConfig ¶
type BucketConfig struct { Credentials *BucketCredentialConfig `mapstructure:"credentials" validate:"omitempty"` RequestConfig *BucketRequestConfig `mapstructure:"requestConfig" validate:"omitempty"` Name string `mapstructure:"name" validate:"required"` Prefix string `mapstructure:"prefix"` Region string `mapstructure:"region"` S3Endpoint string `mapstructure:"s3Endpoint"` S3ListMaxKeys int64 `mapstructure:"s3ListMaxKeys" validate:"gt=0"` S3MaxUploadParts int `mapstructure:"s3MaxUploadParts" validate:"required,gte=1"` S3UploadPartSize int64 `mapstructure:"s3UploadPartSize" validate:"required,gte=5"` S3UploadConcurrency int `mapstructure:"s3UploadConcurrency" validate:"required,gte=1"` S3UploadLeavePartsOnError bool `mapstructure:"s3UploadLeavePartsOnError"` DisableSSL bool `mapstructure:"disableSSL"` }
BucketConfig Bucket configuration.
func (*BucketConfig) GetRootPrefix ¶
func (bcfg *BucketConfig) GetRootPrefix() string
GetRootPrefix Get bucket root prefix.
type BucketCredentialConfig ¶
type BucketCredentialConfig struct { AccessKey *CredentialConfig `mapstructure:"accessKey" validate:"omitempty"` SecretKey *CredentialConfig `mapstructure:"secretKey" validate:"omitempty"` }
BucketCredentialConfig Bucket Credentials configurations.
type BucketRequestConfig ¶
type BucketRequestConfig struct { ListHeaders map[string]string `mapstructure:"listHeaders"` GetHeaders map[string]string `mapstructure:"getHeaders"` PutHeaders map[string]string `mapstructure:"putHeaders"` DeleteHeaders map[string]string `mapstructure:"deleteHeaders"` }
BucketRequestConfig Bucket request configuration.
type CacheConfig ¶
type CacheConfig struct { Expires string `mapstructure:"expires"` CacheControl string `mapstructure:"cacheControl"` Pragma string `mapstructure:"pragma"` XAccelExpires string `mapstructure:"xAccelExpires"` NoCacheEnabled bool `mapstructure:"noCacheEnabled"` }
CacheConfig Cache configuration.
type Config ¶
type Config struct { Log *LogConfig `mapstructure:"log"` Tracing *TracingConfig `mapstructure:"tracing"` Metrics *MetricsConfig `mapstructure:"metrics"` Server *ServerConfig `mapstructure:"server"` InternalServer *ServerConfig `mapstructure:"internalServer"` Targets map[string]*TargetConfig `mapstructure:"targets"` Templates *TemplateConfig `mapstructure:"templates"` AuthProviders *AuthProviderConfig `mapstructure:"authProviders"` ListTargets *ListTargetsConfig `mapstructure:"listTargets"` }
Config Application Configuration.
type CredentialConfig ¶
type CredentialConfig struct { Path string `mapstructure:"path" validate:"required_without_all=Env Value"` Env string `mapstructure:"env" validate:"required_without_all=Path Value"` Value string `mapstructure:"value" validate:"required_without_all=Path Env"` }
CredentialConfig Credential Configurations.
type DeleteActionConfig ¶
type DeleteActionConfig struct { Config *DeleteActionConfigConfig `mapstructure:"config"` Enabled bool `mapstructure:"enabled"` }
DeleteActionConfig Delete action configuration.
type DeleteActionConfigConfig ¶
type DeleteActionConfigConfig struct {
Webhooks []*WebhookConfig `mapstructure:"webhooks" validate:"dive"`
}
DeleteActionConfigConfig Delete action configuration object configuration.
type GetActionConfig ¶
type GetActionConfig struct { Config *GetActionConfigConfig `mapstructure:"config"` Enabled bool `mapstructure:"enabled"` }
GetActionConfig Get action configuration.
type GetActionConfigConfig ¶
type GetActionConfigConfig struct { StreamedFileHeaders map[string]string `mapstructure:"streamedFileHeaders"` IndexDocument string `mapstructure:"indexDocument"` SignedURLExpirationString string `mapstructure:"signedUrlExpiration"` Webhooks []*WebhookConfig `mapstructure:"webhooks" validate:"dive"` SignedURLExpiration time.Duration RedirectWithTrailingSlashForNotFoundFile bool `mapstructure:"redirectWithTrailingSlashForNotFoundFile"` RedirectToSignedURL bool `mapstructure:"redirectToSignedUrl"` DisableListing bool `mapstructure:"disableListing"` }
GetActionConfigConfig Get action configuration object configuration.
type HeaderAuthConfig ¶
type HeaderAuthConfig struct { UsernameHeader string `mapstructure:"usernameHeader" validate:"required"` EmailHeader string `mapstructure:"emailHeader" validate:"required"` GroupsHeader string `mapstructure:"groupsHeader"` }
HeaderAuthConfig Header auth configuration.
type HeaderOIDCAuthorizationAccess ¶
type HeaderOIDCAuthorizationAccess struct { GroupRegexp *regexp.Regexp EmailRegexp *regexp.Regexp Group string `mapstructure:"group" validate:"required_without=Email"` Email string `mapstructure:"email" validate:"required_without=Group"` Regexp bool `mapstructure:"regexp"` }
HeaderOIDCAuthorizationAccess OpenID Connect or Header authorization accesses.
type ListTargetsConfig ¶
type ListTargetsConfig struct { Mount *MountConfig `mapstructure:"mount" validate:"required_with=Enabled"` Resource *Resource `mapstructure:"resource" validate:"omitempty"` Enabled bool `mapstructure:"enabled"` }
ListTargetsConfig List targets configuration.
type LogConfig ¶
type LogConfig struct { Level string `mapstructure:"level" validate:"required"` Format string `mapstructure:"format" validate:"required"` FilePath string `mapstructure:"filePath"` }
LogConfig Log configuration.
type Manager ¶
type Manager interface { // Load configuration Load(mainConfDir string) error // Get configuration object GetConfig() *Config // Add on change hook for configuration change AddOnChangeHook(hook func()) }
Manager
func NewManager ¶
type MetricsConfig ¶
type MetricsConfig struct {
DisableRouterPath bool `mapstructure:"disableRouterPath"`
}
MetricsConfig represents the metrics configuration structure.
type MountConfig ¶
type MountConfig struct { Host string `mapstructure:"host"` Path []string `mapstructure:"path" validate:"required,dive,required"` }
MountConfig Mount configuration.
type OIDCAuthConfig ¶
type OIDCAuthConfig struct { ClientSecret *CredentialConfig `mapstructure:"clientSecret" validate:"omitempty"` GroupClaim string `mapstructure:"groupClaim"` IssuerURL string `mapstructure:"issuerUrl" validate:"required,url"` RedirectURL string `mapstructure:"redirectUrl" validate:"omitempty,url"` State string `mapstructure:"state" validate:"required"` ClientID string `mapstructure:"clientID" validate:"required"` CookieName string `mapstructure:"cookieName"` LoginPath string `mapstructure:"loginPath"` CallbackPath string `mapstructure:"callbackPath"` Scopes []string `mapstructure:"scopes"` CookieDomains []string `mapstructure:"cookieDomains"` EmailVerified bool `mapstructure:"emailVerified"` CookieSecure bool `mapstructure:"cookieSecure"` }
OIDCAuthConfig OpenID Connect authentication configurations.
type OPAServerAuthorization ¶
type OPAServerAuthorization struct { Tags map[string]string `mapstructure:"tags"` URL string `mapstructure:"url" validate:"required,url"` }
OPAServerAuthorization OPA Server authorization.
type PutActionConfig ¶
type PutActionConfig struct { Config *PutActionConfigConfig `mapstructure:"config"` Enabled bool `mapstructure:"enabled"` }
PutActionConfig Put action configuration.
type PutActionConfigConfig ¶
type PutActionConfigConfig struct { Metadata map[string]string `mapstructure:"metadata"` SystemMetadata *PutActionConfigSystemMetadataConfig `mapstructure:"systemMetadata"` CannedACL *string `mapstructure:"cannedACL"` StorageClass string `mapstructure:"storageClass"` Webhooks []*WebhookConfig `mapstructure:"webhooks" validate:"dive"` AllowOverride bool `mapstructure:"allowOverride"` }
PutActionConfigConfig Put action configuration object configuration.
type PutActionConfigSystemMetadataConfig ¶
type PutActionConfigSystemMetadataConfig struct { CacheControl string `mapstructure:"cacheControl"` ContentDisposition string `mapstructure:"contentDisposition"` ContentEncoding string `mapstructure:"contentEncoding"` ContentLanguage string `mapstructure:"contentLanguage"` Expires string `mapstructure:"expires"` }
PutActionConfigSystemMetadataConfig Put action configuration system metadata object configuration.
type Resource ¶
type Resource struct { WhiteList *bool `mapstructure:"whiteList"` Basic *ResourceBasic `mapstructure:"basic" validate:"omitempty"` OIDC *ResourceHeaderOIDC `mapstructure:"oidc" validate:"omitempty"` Header *ResourceHeaderOIDC `mapstructure:"header" validate:"omitempty"` Path string `mapstructure:"path" validate:"required"` Provider string `mapstructure:"provider"` Methods []string `mapstructure:"methods" validate:"required,dive,required"` }
Resource Resource.
type ResourceBasic ¶
type ResourceBasic struct {
Credentials []*BasicAuthUserConfig `mapstructure:"credentials" validate:"omitempty,dive"`
}
ResourceBasic Basic auth resource.
type ResourceHeaderOIDC ¶
type ResourceHeaderOIDC struct { AuthorizationOPAServer *OPAServerAuthorization `mapstructure:"authorizationOPAServer" validate:"omitempty"` AuthorizationAccesses []*HeaderOIDCAuthorizationAccess `mapstructure:"authorizationAccesses" validate:"omitempty,dive"` }
ResourceHeaderOIDC OIDC or Header auth Resource.
type SSLURLConfig ¶
type SSLURLConfig struct { AWSCredentials *BucketCredentialConfig `mapstructure:"awsCredentials" validate:"omitempty"` HTTPTimeout string `mapstructure:"httpTimeout"` AWSRegion string `mapstructure:"awsRegion"` AWSEndpoint string `mapstructure:"awsEndpoint"` AWSDisableSSL bool `mapstructure:"awsDisableSSL"` }
SSLURLConfig SSL certificate/private key configuration for URLs.
type ServerCompressConfig ¶
type ServerCompressConfig struct { Enabled *bool `mapstructure:"enabled"` Types []string `mapstructure:"types" validate:"required,min=1"` Level int `mapstructure:"level" validate:"required,min=1"` }
ServerCompressConfig Server compress configuration.
type ServerConfig ¶
type ServerConfig struct { Timeouts *ServerTimeoutsConfig `mapstructure:"timeouts" validate:"required"` CORS *ServerCorsConfig `mapstructure:"cors" validate:"omitempty"` Cache *CacheConfig `mapstructure:"cache" validate:"omitempty"` Compress *ServerCompressConfig `mapstructure:"compress" validate:"omitempty"` SSL *ServerSSLConfig `mapstructure:"ssl" validate:"omitempty"` ListenAddr string `mapstructure:"listenAddr"` Port int `mapstructure:"port" validate:"required"` }
ServerConfig Server configuration.
type ServerCorsConfig ¶
type ServerCorsConfig struct { MaxAge *int `mapstructure:"maxAge"` AllowCredentials *bool `mapstructure:"allowCredentials"` Debug *bool `mapstructure:"debug"` OptionsPassthrough *bool `mapstructure:"optionsPassthrough"` AllowOrigins []string `mapstructure:"allowOrigins"` AllowMethods []string `mapstructure:"allowMethods"` AllowHeaders []string `mapstructure:"allowHeaders"` ExposeHeaders []string `mapstructure:"exposeHeaders"` Enabled bool `mapstructure:"enabled"` AllowAll bool `mapstructure:"allowAll"` }
ServerCorsConfig Server CORS configuration.
type ServerSSLCertificate ¶
type ServerSSLCertificate struct { Certificate *string `mapstructure:"certificate"` CertificateURL *string `mapstructure:"certificateUrl"` CertificateURLConfig *SSLURLConfig `mapstructure:"certificateUrlConfig"` PrivateKey *string `mapstructure:"privateKey"` PrivateKeyURL *string `mapstructure:"privateKeyUrl"` PrivateKeyURLConfig *SSLURLConfig `mapstructure:"privateKeyUrlConfig"` }
ServerSSLCertificate Server SSL certificate.
type ServerSSLConfig ¶
type ServerSSLConfig struct { MinTLSVersion *string `mapstructure:"minTLSVersion"` MaxTLSVersion *string `mapstructure:"maxTLSVersion"` Certificates []*ServerSSLCertificate `mapstructure:"certificates"` SelfSignedHostnames []string `mapstructure:"selfSignedHostnames"` CipherSuites []string `mapstructure:"cipherSuites"` Enabled bool `mapstructure:"enabled"` }
ServerSSLConfig Server SSL configuration.
type ServerTimeoutsConfig ¶
type ServerTimeoutsConfig struct { ReadTimeout string `mapstructure:"readTimeout"` ReadHeaderTimeout string `mapstructure:"readHeaderTimeout"` WriteTimeout string `mapstructure:"writeTimeout"` IdleTimeout string `mapstructure:"idleTimeout"` }
ServerTimeoutsConfig Server timeouts configuration.
type TargetConfig ¶
type TargetConfig struct { Name string `validate:"required"` Bucket *BucketConfig `mapstructure:"bucket" validate:"required"` Resources []*Resource `mapstructure:"resources" validate:"dive"` Mount *MountConfig `mapstructure:"mount" validate:"required"` Actions *ActionsConfig `mapstructure:"actions"` Templates *TargetTemplateConfig `mapstructure:"templates"` KeyRewriteList []*TargetKeyRewriteConfig `mapstructure:"keyRewriteList"` }
TargetConfig Bucket instance configuration.
type TargetHelperConfigItem ¶
type TargetHelperConfigItem struct { Path string `mapstructure:"path" validate:"required,min=1"` InBucket bool `mapstructure:"inBucket"` }
TargetHelperConfigItem Target helper configuration item.
type TargetKeyRewriteConfig ¶
type TargetKeyRewriteConfig struct { Source string `mapstructure:"source" validate:"required,min=1"` SourceRegex *regexp.Regexp Target string `mapstructure:"target" validate:"required,min=1"` TargetType string `mapstructure:"targetType" validate:"required,oneof=REGEX TEMPLATE"` }
TargetKeyRewriteConfig Target key rewrite configuration.
type TargetTemplateConfig ¶
type TargetTemplateConfig struct { FolderList *TargetTemplateConfigItem `mapstructure:"folderList"` NotFoundError *TargetTemplateConfigItem `mapstructure:"notFoundError"` InternalServerError *TargetTemplateConfigItem `mapstructure:"internalServerError"` ForbiddenError *TargetTemplateConfigItem `mapstructure:"forbiddenError"` BadRequestError *TargetTemplateConfigItem `mapstructure:"badRequestError"` Put *TargetTemplateConfigItem `mapstructure:"put"` Delete *TargetTemplateConfigItem `mapstructure:"delete"` Helpers []*TargetHelperConfigItem `mapstructure:"helpers"` }
TargetTemplateConfig Target templates configuration to override default ones.
type TargetTemplateConfigItem ¶
type TargetTemplateConfigItem struct { Path string `mapstructure:"path" validate:"required,min=1"` Headers map[string]string `mapstructure:"headers"` Status string `mapstructure:"status"` InBucket bool `mapstructure:"inBucket"` }
TargetTemplateConfigItem Target template configuration item.
type TemplateConfig ¶
type TemplateConfig struct { FolderList *TemplateConfigItem `mapstructure:"folderList" validate:"required"` TargetList *TemplateConfigItem `mapstructure:"targetList" validate:"required"` NotFoundError *TemplateConfigItem `mapstructure:"notFoundError" validate:"required"` InternalServerError *TemplateConfigItem `mapstructure:"internalServerError" validate:"required"` ForbiddenError *TemplateConfigItem `mapstructure:"forbiddenError" validate:"required"` BadRequestError *TemplateConfigItem `mapstructure:"badRequestError" validate:"required"` Put *TemplateConfigItem `mapstructure:"put" validate:"required"` Delete *TemplateConfigItem `mapstructure:"delete" validate:"required"` Helpers []string `mapstructure:"helpers" validate:"required,min=1,dive,required"` }
TemplateConfig Templates configuration.
type TemplateConfigItem ¶
type TemplateConfigItem struct { Path string `mapstructure:"path" validate:"required"` Headers map[string]string `mapstructure:"headers"` Status string `mapstructure:"status"` }
TemplateConfigItem Template configuration item.
type TracingConfig ¶
type TracingConfig struct { FixedTags map[string]interface{} `mapstructure:"fixedTags"` FlushInterval string `mapstructure:"flushInterval"` UDPHost string `mapstructure:"udpHost"` QueueSize int `mapstructure:"queueSize"` Enabled bool `mapstructure:"enabled"` LogSpan bool `mapstructure:"logSpan"` }
TracingConfig represents the Tracing configuration structure.
type WebhookConfig ¶
type WebhookConfig struct { Headers map[string]string `mapstructure:"headers"` SecretHeaders map[string]*CredentialConfig `mapstructure:"secretHeaders" validate:"omitempty"` Method string `mapstructure:"method" validate:"required,oneof=POST PATCH PUT DELETE"` URL string `mapstructure:"url" validate:"required,url"` MaxWaitTime string `mapstructure:"maxWaitTime"` DefaultWaitTime string `mapstructure:"defaultWaitTime"` RetryCount int `mapstructure:"retryCount" validate:"gte=0"` }
WebhookConfig Webhook configuration.