Documentation ¶
Overview ¶
Package inputparser contains code to parse experiments input.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptyDefaultScheme = errors.New("inputparser: empty default scheme")
ErrEmptyDefaultScheme indicates that the default scheme is empty.
View Source
var ErrEmptyHostname = errors.New("inputparser: empty URL.Hostname()")
ErrEmptyHostname indicates that the URL.Hostname() is empty.
View Source
var ErrIDNAToASCII = errors.New("inputparser: cannot convert IDNA to ASCII")
ErrIDNAToASCII indicates that we cannot convert IDNA to ASCII.
View Source
var ErrInvalidEndpoint = errors.New("inputparser: invalid endpoint")
ErrInvalidEndpoint indicates that we are not parsing a valid endpoint.
View Source
var ErrURLParse = errors.New("inputparser: cannot parse URL")
ErrURLParse indicates that we could not parse the URL.
View Source
var ErrUnsupportedScheme = errors.New("inputparser: unsupported URL.Scheme")
ErrUnsupportedScheme indicates that we do not support the given URL.Scheme.
Functions ¶
Types ¶
type Config ¶
type Config struct { // AcceptedSchemes is the list of accepted URL schemes. This field is // MANDATORY except when parsing endpoints where we do not need to // validate the scheme since we use DefaultScheme. AcceptedSchemes []string // AllowEndpoints OPTIONALLY tells the input parser to also // accept endpoints as experiment inputs. AllowEndpoints bool // DefaultScheme is the scheme to use when accepting endpoints, // which is MANDATORY iff AllowEndpoints is true. DefaultScheme string }
Config contains config for parsing experiments input. You MUST set the fields marked as MANDATORY otherwise Parse will fail.
Click to show internal directories.
Click to hide internal directories.