github.com/weaviate/weaviate@v1.24.6/modules/backup-s3/config.go (about)

     1  //                           _       _
     2  // __      _____  __ ___   ___  __ _| |_ ___
     3  // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
     4  //  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
     5  //   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
     6  //
     7  //  Copyright © 2016 - 2024 Weaviate B.V. All rights reserved.
     8  //
     9  //  CONTACT: hello@weaviate.io
    10  //
    11  
    12  package modstgs3
    13  
    14  type clientConfig struct {
    15  	Endpoint string
    16  	Bucket   string
    17  	UseSSL   bool
    18  
    19  	// this is an optional value, allowing for
    20  	// the backup to be stored in a specific
    21  	// directory inside the provided bucket
    22  	BackupPath string
    23  }
    24  
    25  func newConfig(endpoint, bucket, path string, useSSL bool) *clientConfig {
    26  	const DEFAULT_ENDPOINT = "s3.amazonaws.com"
    27  	if endpoint == "" {
    28  		endpoint = DEFAULT_ENDPOINT
    29  	}
    30  	return &clientConfig{endpoint, bucket, useSSL, path}
    31  }