// ValidateURI is used to define what a valid URI for an implementation is.
func (v *visibilityArchiver) ValidateURI(URI archiver.URI) (err error) {
visibility_archiver.go
ctx, cancel := context.WithTimeout(context.Background(), timeoutInSeconds*time.Second)
defer cancel()
if err = v.validateURI(URI); err == nil {
_, err = v.gcloudStorage.Exist(ctx, URI, "")
}
}
func (v *visibilityArchiver) validateURI(URI archiver.URI) (err error) {
visibility_archiver.go
if URI.Scheme() != URIScheme {
return archiver.ErrURISchemeMismatch
}