config

package
v0.0.0-...-41cac4f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 AddFakeRemote(name, directory string) error

func AddRemote

func AddRemote(remote *RemoteObject) error

func LoadConfig

func LoadConfig(dir string) (bool, error)

func SaveConfig

func SaveConfig(dir string, leafSize uint32, maxRepoSize uint64) error

func SaveConfigFromUrl

func SaveConfigFromUrl(url, dir, accessKey, secretKey, endpoint string, leafSize uint32, maxRepoSize uint64) error

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL