change package name & format document

Signed-off-by: Shawn Chen <chen8132@gmail.com>
This commit is contained in:
Shawn Chen 2019-03-18 11:25:35 +08:00
parent 3390f32aec
commit fd77cf43a6
2 changed files with 8 additions and 8 deletions

View file

@ -719,12 +719,12 @@ Then value of ipfilteredby:
`alicdn` storage middleware allows the registry to serve layers via a content delivery network provided by Alibaba Cloud. Alicdn requires the OSS storage driver. `alicdn` storage middleware allows the registry to serve layers via a content delivery network provided by Alibaba Cloud. Alicdn requires the OSS storage driver.
| Parameter | Required | Description | | Parameter | Required | Description |
|-----------|----------|-------------------------------------------------------| |--------------|----------|-------------------------------------------------------------------------|
| `baseurl` | yes | The `SCHEME://HOST` at which Alicdn is served. | | `baseurl` | yes | The `SCHEME://HOST` at which Alicdn is served. |
| `authtype` | yes | The URL authentication type for Alicdn, which should be `a`, `b` or `c`. | | `authtype` | yes | The URL authentication type for Alicdn, which should be `a`, `b` or `c`. See the [Authentication configuration](https://www.alibabacloud.com/help/doc-detail/85117.htm).|
| `privatekey` | yes | The URL authentication key for Alicdn. | | `privatekey` | yes | The URL authentication key for Alicdn. |
| `duration` | no | An integer and unit for the duration of the Alicdn session. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, or `h`.| | `duration` | no | An integer and unit for the duration of the Alicdn session. Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, or `h`.|
### `redirect` ### `redirect`

View file

@ -1,4 +1,4 @@
package middleware package alicdn
import ( import (
"context" "context"
@ -27,7 +27,7 @@ type aliCDNStorageMiddleware struct {
var _ storagedriver.StorageDriver = &aliCDNStorageMiddleware{} var _ storagedriver.StorageDriver = &aliCDNStorageMiddleware{}
// newAliCDNStorageMiddleware constructs and returns a new AliCDN // newAliCDNStorageMiddleware constructs and returns a new AliCDN
// layerHandler implementation. // StorageDriver implementation.
// Required options: baseurl, authtype, privatekey // Required options: baseurl, authtype, privatekey
// Optional options: duration // Optional options: duration
func newAliCDNStorageMiddleware(storageDriver storagedriver.StorageDriver, options map[string]interface{}) (storagedriver.StorageDriver, error) { func newAliCDNStorageMiddleware(storageDriver storagedriver.StorageDriver, options map[string]interface{}) (storagedriver.StorageDriver, error) {