Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustRenderLocal ¶
MustRenderLocal panics on error. @group Config
func MustRenderS3 ¶
MustRenderS3 panics on error. @group Config
func RenderLocal ¶
func RenderLocal(remote LocalRemote) (string, error)
RenderLocal returns ini-formatted rclone config for a local backend. @group Config
Example ¶
ExampleRenderLocal shows generating a local remote section.
cfg, err := RenderLocal(LocalRemote{Name: "localdata"})
fmt.Println(err == nil)
fmt.Println(cfg)
Output: true [localdata] type = local
func RenderS3 ¶
RenderS3 returns ini-formatted rclone config content for a single S3 remote. @group Config
Example ¶
ExampleRenderS3 shows generating an S3 remote section.
cfg, err := RenderS3(S3Remote{
Name: "s3primary",
Region: "us-east-1",
AccessKeyID: "AKIA...",
SecretAccessKey: "SECRET",
Endpoint: "http://localhost:4566",
PathStyle: true,
})
fmt.Println(err == nil)
fmt.Println(cfg)
Output: true [s3primary] type = s3 provider = AWS access_key_id = AKIA... secret_access_key = SECRET region = us-east-1 endpoint = http://localhost:4566 force_path_style = true
Types ¶
type LocalRemote ¶
type LocalRemote struct {
Name string
}
LocalRemote defines a local backend configuration.
type S3Remote ¶
type S3Remote struct {
Name string
Endpoint string
Region string
AccessKeyID string
SecretAccessKey string
Provider string // optional, defaults to "AWS"
PathStyle bool
BucketACL string // optional
UseUnsignedPayload bool // optional
}
S3Remote defines parameters for constructing an rclone S3 remote.
Click to show internal directories.
Click to hide internal directories.