Documentation
¶
Index ¶
- Constants
- func AddFakeRemote(name, directory string) error
- func AddRemote(remote *RemoteObject) error
- func LoadConfig(dir string) (bool, error)
- func SaveConfig(dir string, leafSize uint32, maxRepoSize uint64) error
- func SaveConfigFromUrl(url, dir, accessKey, secretKey, endpoint string, leafSize uint32, ...) error
- type ConfigObject
- type RemoteObject
Constants ¶
View Source
const CONFIG = "config"
View Source
const LeafSizeDefault = 5 * 1024 * 1024
View Source
const LeafSizeMinimum = 1024
View Source
const MaxRepoSizeDefault = 25 * 1024 * 1024 * 1024
View Source
const MaxRepoSizeMinimum = 1024 * 1024
View Source
const REMOTE_ACD = "acd"
View Source
const REMOTE_DYNAMODB = "dynamodb"
View Source
const REMOTE_FAKE = "fake"
View Source
const REMOTE_S3 = "s3"
View Source
const RegionDefault = "us-east-1"
View Source
const S3GIT_CONFIG = ".s3git.config"
View Source
const S3GIT_DIR = ".s3git"
Variables ¶
This section is empty.
Functions ¶
func AddFakeRemote ¶
func AddRemote ¶
func AddRemote(remote *RemoteObject) error
func LoadConfig ¶
Types ¶
type ConfigObject ¶
type ConfigObject struct {
Version int `json:"s3gitVersion"`
Type string `json:"s3gitType"` // config
BasePath string `json:"s3gitBasePath"`
LeafSize uint32 `json:"s3gitLeafSize"`
MaxRepoSize uint64 `json:"s3gitMaxRepoSize"`
RollingHashBits int `json:"s3gitRollingHashBits"`
RollingHashMin int `json:"s3gitRollingHashMin"`
Remotes []RemoteObject `json:"s3gitRemotes"`
}
var Config ConfigObject
type RemoteObject ¶
type RemoteObject struct {
Name string `json:"Name"`
Type string `json:"Type"`
Hydrate bool `json:"Hydrate"`
// Remote object for S3
S3Bucket string `json:"S3Bucket"`
S3Region string `json:"S3Region"`
S3AccessKey string `json:"S3AccessKey"`
S3SecretKey string `json:"S3SecretKey"`
S3Endpoint string `json:"S3Endpoint"`
// Remote object for DynamoDB
DynamoDbTable string `json:"DynamoDbTable"`
DynamoDbRegion string `json:"DynamoDbRegion"`
DynamoDbAccessKey string `json:"DynamoDbAccessKey"`
DynamoDbSecretKey string `json:"DynamoDbSecretKey"`
MinioInsecure bool `json:"MinioInsecure"`
AcdRefreshToken string `json:"AcdRefreshToken"`
// Remote object for fake backend
FakeDirectory string `json:"FakeDirectory"`
}
Base object for Remotes
func CreateRemote ¶
func CreateRemote(name, resource, accessKey, secretKey, endpoint string) (*RemoteObject, error)
Click to show internal directories.
Click to hide internal directories.