google_cloud_storage/
signed_url.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Types related to the signed URL feature. See [SignedUrlBuilder][crate::builder::storage::SignedUrlBuilder].
16
17/// Formatting style for signed URLs.
18///
19/// There are several equivalent formats for signed URLs, see the [resource path] docs for more information.
20///
21/// [resource path]: https://docs.cloud.google.com/storage/docs/authentication/canonical-requests#about-resource-path
22#[derive(Debug, Clone, Copy, Default)]
23pub enum UrlStyle {
24    /// Path style URL: `https://storage.googleapis.com/bucket/object`.
25    ///
26    /// This is the default style.
27    #[default]
28    PathStyle,
29
30    /// Bucket bound hostname URL: `https://bucket-name/object`.
31    ///
32    /// This style is used when you have a CNAME alias for your bucket.
33    BucketBoundHostname,
34
35    /// Virtual hosted style URL: `https://bucket.storage.googleapis.com/object`.
36    VirtualHostedStyle,
37}