package components import ( "context" "fmt" "github.com/starfleetcptn/gomft/components/shared/toast" "github.com/starfleetcptn/gomft/internal/db" ) type StorageProvidersData struct { Providers []db.StorageProvider Error string Status string } // Main template for Storage Providers page templ StorageProviders(ctx context.Context, data StorageProvidersData) { @LayoutWithContext("Storage Providers", ctx) { @toast.Container() @toast.ShowToastJS() if data.Error != "" {
Storage providers define connection details to different storage systems.
Your credentials are encrypted for security. You can test connections before using them in transfers.
Google Drive and Google Photos providers require authentication. Click the "Authenticate" button to complete setup.
Providers can be used in multiple transfer configurations. Deleting a provider will affect any transfer that uses it.
{ provider.Name }
{ string(provider.Type) }Path: { provider.Host }
} else if provider.Type == "s3" || provider.Type == "wasabi" || provider.Type == "minio" {Endpoint: { provider.Host }
Bucket: { provider.Bucket }
if provider.Region != "" {Region: { provider.Region }
} } else if provider.Type == "drive" || provider.Type == "gphotos" {Google if provider.Type == "drive" { Drive } else { Photos } if provider.DriveID != "" { : { provider.DriveID } }
if provider.Authenticated != nil && *provider.Authenticated { Authenticated } else {Server: { provider.Host }
if provider.Username != "" {User: { provider.Username }
} } else if provider.Type == "sftp" || provider.Type == "hetzner" {Host: { provider.Host } if provider.Port > 0 { :{ fmt.Sprint(provider.Port) } }
if provider.Username != "" {User: { provider.Username }
} } else if provider.Type == "b2" {Backblaze B2
if provider.Bucket != "" {Bucket: { provider.Bucket }
} } else {Host: { provider.Host } if provider.Port > 0 { :{ fmt.Sprint(provider.Port) } }
}Updated: { provider.UpdatedAt.Format("2006-01-02 15:04:05") }