Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultConfigChunkSize is the default maximum size in bytes of one config validation request.
DefaultConfigChunkSize = 5 << 20
)
Variables ¶
View Source
var EntityMap = map[string]string{
"ACLGroups": "acls",
"BasicAuths": "basicauth_credentials",
"CACertificates": "ca_certificates",
"Certificates": "certificates",
"Consumers": "consumers",
"Documents": "documents",
"FilterChains": "filter_chains",
"HMACAuths": "hmacauth_credentials",
"JWTAuths": "jwt_secrets",
"KeyAuths": "keyauth_credentials",
"Oauth2Creds": "oauth2_credentials",
"Partials": "partials",
"Plugins": "plugins",
"RBACEndpointPermissions": "rbac-endpointpermission",
"RBACRoles": "rbac-role",
"Routes": "routes",
"SNIs": "snis",
"Services": "services",
"Targets": "targets",
"Upstreams": "upstreams",
"Vaults": "vaults",
}
Define a map of entity object field names and their corresponding string names
Functions ¶
Types ¶
type ErrorsWrapper ¶
type ErrorsWrapper struct {
Errors []error
}
func (ErrorsWrapper) Error ¶
func (v ErrorsWrapper) Error() string
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
func NewValidator ¶
func NewValidator(opt ValidatorOpts) *Validator
type ValidatorOpts ¶
type ValidatorOpts struct {
Ctx context.Context
State *state.KongState
Client *kong.Client
// ConfigClient sends the config validation requests. These can take longer than other requests.
// If it is nil, Client sends them.
ConfigClient *kong.Client
// ConfigChunkSize is the maximum size in bytes of one config validation request.
// If it is 0, DefaultConfigChunkSize applies.
ConfigChunkSize int
// UseBulkValidation opts into the Konnect bulk config validation endpoint, instead of
// validating each entity with a separate request. Validation falls back to the per-entity
// requests if the control plane does not have the endpoint, unless RequireBulkValidation is set.
UseBulkValidation bool
// RequireBulkValidation makes validation fail if the control plane does not have the config validation
// endpoint, instead of falling back to per-entity requests. It implies UseBulkValidation.
RequireBulkValidation bool
Parallelism int
RBACResourcesOnly bool
OnlineEntitiesFilter []string
}
Click to show internal directories.
Click to hide internal directories.