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.
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 == "google_drive" || provider.Type == "google_photo" {Google if provider.Type == "google_drive" { Drive } else { Photos } if provider.DriveID != "" { : { provider.DriveID } }
if provider.Authenticated != nil && *provider.Authenticated { Authenticated } else { Not Authenticated } } else if provider.Type == "webdav" || provider.Type == "nextcloud" {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") }