本文整理汇总了Golang中github.com/docker/distribution/registry/storage/driver/factory.Register函数的典型用法代码示例。如果您正苦于以下问题:Golang Register函数的具体用法?Golang Register怎么用?Golang Register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Register函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: init
func init() {
for _, region := range []string{
"us-east-1",
"us-west-1",
"us-west-2",
"eu-west-1",
"eu-central-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-northeast-1",
"ap-northeast-2",
"sa-east-1",
"cn-north-1",
"us-gov-west-1",
} {
validRegions[region] = struct{}{}
}
for _, objectAcl := range []string{
s3.ObjectCannedACLPrivate,
s3.ObjectCannedACLPublicRead,
s3.ObjectCannedACLPublicReadWrite,
s3.ObjectCannedACLAuthenticatedRead,
s3.ObjectCannedACLAwsExecRead,
s3.ObjectCannedACLBucketOwnerRead,
s3.ObjectCannedACLBucketOwnerFullControl,
} {
validObjectAcls[objectAcl] = struct{}{}
}
// Register this as the default s3 driver in addition to s3aws
factory.Register("s3", &s3DriverFactory{})
factory.Register(driverName, &s3DriverFactory{})
}
示例2: init
func init() {
for _, region := range []string{
"us-east-1",
"us-west-1",
"us-west-2",
"eu-west-1",
"eu-central-1",
"ap-southeast-1",
"ap-southeast-2",
"ap-northeast-1",
"ap-northeast-2",
"sa-east-1",
} {
validRegions[region] = struct{}{}
}
// Register this as the default s3 driver in addition to s3aws
factory.Register("s3", &s3DriverFactory{})
factory.Register(driverName, &s3DriverFactory{})
}
示例3: init
func init() {
factory.Register(driverName, &swiftDriverFactory{})
}
示例4: init
func init() {
factory.Register(driverName, &ipfsDriverFactory{})
}
示例5: init
func init() {
factory.Register(driverName, &filesystemDriverFactory{})
}
示例6: init
func init() {
factory.Register(driverName, &inMemoryDriverFactory{})
}
示例7: init
func init() {
factory.Register(driverName, &azureDriverFactory{})
}
示例8: init
func init() {
factory.Register(driverName, &speedyDriverFactory{})
}
示例9: init
func init() {
registry.Register(DriverName, factory{})
}
示例10: init
func init() {
factory.Register(driverName, &kodoDriverFactory{})
}