51 lines
1.1 KiB
Go
51 lines
1.1 KiB
Go
package config
|
|
|
|
type backendView struct {
|
|
Backend string
|
|
Host string
|
|
User string
|
|
Port int
|
|
Path string
|
|
Endpoint string
|
|
Bucket string
|
|
Prefix string
|
|
Region string
|
|
ForcePath *bool
|
|
Creds Credentials
|
|
SSH SSH
|
|
}
|
|
|
|
func backendViewFromSource(source Backend) backendView {
|
|
return backendView{
|
|
Backend: source.Backend,
|
|
Host: source.Host,
|
|
User: source.User,
|
|
Port: source.Port,
|
|
Path: source.Path,
|
|
Endpoint: source.Endpoint,
|
|
Bucket: source.Bucket,
|
|
Prefix: source.Prefix,
|
|
Region: source.Region,
|
|
ForcePath: source.ForcePath,
|
|
Creds: source.Creds,
|
|
SSH: source.SSH,
|
|
}
|
|
}
|
|
|
|
func backendViewFromDestination(destination Destination) backendView {
|
|
return backendView{
|
|
Backend: destination.Backend,
|
|
Host: destination.Host,
|
|
User: destination.User,
|
|
Port: destination.Port,
|
|
Path: destination.Path,
|
|
Endpoint: destination.Endpoint,
|
|
Bucket: destination.Bucket,
|
|
Prefix: destination.Prefix,
|
|
Region: destination.Region,
|
|
ForcePath: destination.ForcePath,
|
|
Creds: destination.Creds,
|
|
SSH: destination.SSH,
|
|
}
|
|
}
|