当前位置: 首页>>代码示例>>Golang>>正文


Golang factory.Register函数代码示例

本文整理汇总了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{})
}
开发者ID:tpounds,项目名称:distribution,代码行数:34,代码来源:s3.go

示例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{})
}
开发者ID:sebrandon1,项目名称:distribution,代码行数:20,代码来源:s3.go

示例3: init

func init() {
	factory.Register(driverName, &swiftDriverFactory{})
}
开发者ID:waynew,项目名称:distribution,代码行数:3,代码来源:swift.go

示例4: init

func init() {
	factory.Register(driverName, &ipfsDriverFactory{})
}
开发者ID:thelinuxkid,项目名称:distribution,代码行数:3,代码来源:ipfs.go

示例5: init

func init() {
	factory.Register(driverName, &filesystemDriverFactory{})
}
开发者ID:RomainVabre,项目名称:origin,代码行数:3,代码来源:driver.go

示例6: init

func init() {
	factory.Register(driverName, &inMemoryDriverFactory{})
}
开发者ID:CowLeo,项目名称:distribution,代码行数:3,代码来源:driver.go

示例7: init

func init() {
	factory.Register(driverName, &azureDriverFactory{})
}
开发者ID:orivej,项目名称:distribution,代码行数:3,代码来源:azure.go

示例8: init

func init() {
	factory.Register(driverName, &speedyDriverFactory{})
}
开发者ID:zhangcoldwater,项目名称:distribution,代码行数:3,代码来源:speedy.go

示例9: init

func init() {
	registry.Register(DriverName, factory{})
}
开发者ID:ably-forks,项目名称:flynn,代码行数:3,代码来源:blobstore.go

示例10: init

func init() {
	factory.Register(driverName, &kodoDriverFactory{})
}
开发者ID:slene,项目名称:distribution,代码行数:3,代码来源:kodo.go


注:本文中的github.com/docker/distribution/registry/storage/driver/factory.Register函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。