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 ( S3GIT_CONFIG = ".s3git.config" S3GIT_DIR = ".s3git" CONFIG = "config" REMOTE_S3 = "s3" REMOTE_FAKE = "fake" REMOTE_ACD = "acd" REMOTE_DYNAMODB = "dynamodb" REMOTE_GNFD = "gnfd" )
View Source
const ( LeafSizeMinimum = 1024 LeafSizeDefault = 5 * 1024 * 1024 MaxRepoSizeMinimum = 1024 * 1024 MaxRepoSizeDefault = 25 * 1024 * 1024 * 1024 )
View Source
const RegionDefault = "us-east-1"
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 greenfield GreenfieldBucket string `json:"GreenfieldBucket"` GreenfieldPrivKey string `json:"GreenfieldPrivKey"` GreenfieldChainID string `json:"GreenfieldChainID"` GreenfieldEndpoint string `json:"GreenfieldEndpoint"` // 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.