Documentation ¶
Overview ¶
Package validators provides basic validation for splice requests and exposes an interface for additional validators.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Basic ¶
type Basic struct { }
Basic implements Validator and performs basic checking of a request.
type GenericGeneratorChecks ¶ added in v1.2.0
type GenericGeneratorChecks struct{}
GenericGeneratorChecks provides general sanity checks for SpliceD generators
func (GenericGeneratorChecks) Check ¶ added in v1.2.0
func (c GenericGeneratorChecks) Check(ctx context.Context, req *models.Request) (server.StatusCode, error)
Check returns StatusSuccess if req is valid. It may modify req to sanitize it.
type PrefixGeneratorCheck ¶ added in v1.2.0
type PrefixGeneratorCheck struct{}
PrefixGeneratorCheck provides sanity checks for the SpliceD "prefix" Generator. It may modify the request to sanitize certain inputs for compatibility.
func (PrefixGeneratorCheck) Check ¶ added in v1.2.0
func (c PrefixGeneratorCheck) Check(ctx context.Context, req *models.Request) (server.StatusCode, error)
Check returns StatusSuccess if req is valid. It may modify req to sanitize it.
type Reuse ¶ added in v1.2.0
type Reuse struct{}
Reuse implements validators.Validator and checks if the request is permitted to enable name reuse.
type Validator ¶
type Validator interface { // Check returns a status code and an error if the check failed. Check // should perform its own cleanup (defer or otherwise) prior to returning. Check(context.Context, *models.Request) (server.StatusCode, error) }
Validator performs metadata checking for requests.
func NewUnattended ¶
NewUnattended returns a slice containing all validators required for unattended requests.