pub struct SignedURLOptions {
pub method: SignedURLMethod,
pub start_time: Option<SystemTime>,
pub expires: Duration,
pub content_type: Option<String>,
pub headers: Vec<String>,
pub query_parameters: HashMap<String, Vec<String>>,
pub md5: Option<String>,
pub style: Box<dyn URLStyle + Send + Sync>,
pub insecure: bool,
}Expand description
SignedURLOptions allows you to restrict the access to the signed URL.
Fields§
§method: SignedURLMethodMethod is the HTTP method to be used with the signed URL. Signed URLs can be used with GET, HEAD, PUT, and DELETE requests. Required.
start_time: Option<SystemTime>StartTime is the time at which the signed URL starts being valid. Defaults to the current time. Optional.
expires: DurationExpires is the duration of time, beginning at StartTime, within which the signed URL is valid. For SigningSchemeV4, the duration may be no more than 604800 seconds (7 days). Required.
content_type: Option<String>ContentType is the content type header the client must provide to use the generated signed URL. Optional.
headers: Vec<String>Headers is a list of extension headers the client must provide in order to use the generated signed URL. Each must be a string of the form “key:values”, with multiple values separated by a semicolon. Optional.
query_parameters: HashMap<String, Vec<String>>QueryParameters is a map of additional query parameters. When SigningScheme is V4, this is used in computing the signature, and the client must use the same query parameters when using the generated signed URL. Optional.
md5: Option<String>MD5 is the base64 encoded MD5 checksum of the file. If provided, the client should provide the exact value on the request header in order to use the signed URL. Optional.
style: Box<dyn URLStyle + Send + Sync>Style provides options for the type of URL to use. Options are PathStyle (default), BucketBoundHostname, and VirtualHostedStyle. See https://cloud.google.com/storage/docs/request-endpoints for details. Only supported for V4 signing. Optional.
insecure: boolInsecure determines whether the signed URL should use HTTPS (default) or HTTP. Only supported for V4 signing. Optional.