Documentation ¶
Index ¶
- Constants
- func GetAdminContext() context.Context
- func GetFilter(request *restful.Request, filterOpts []string) (map[string]string, error)
- func GetFilterPathParams(request *restful.Request, filterOpts []string) (map[string]string, error)
- func GetOwner(request *restful.Request) (ownerId string)
- func GetPaginationParam(request *restful.Request) (int32, int32, error)
- func GetSizeRequestParamAsInt64(request *restful.Request, param string) (int64, error)
- func GetSortParam(request *restful.Request) (sortKeys []string, sortDirs []string, err error)
- func InitCtxWithAuthInfo(request *restful.Request) context.Context
- func InitCtxWithAuthInfoNonAdmin(request *restful.Request) context.Context
- func InitCtxWithVal(request *restful.Request, md map[string]string) context.Context
Constants ¶
View Source
const ( MaxPaginationLimit = 1000 DefaultPaginationLimit = MaxPaginationLimit DefaultPaginationOffset = 0 MaxObjectSize = 5 * 1024 * 1024 * 1024 // 5GB SortDirectionAsc = "asc" SortDirectionDesc = "desc" DefaultAdminTenantId = "94b280022d0c4401bcf3b0ea85870519" )
View Source
const ( KLimit = "limit" KOffset = "offset" KSort = "sort" KLastModified = "lastmodified" KObjKey = "objkey" KStorageTier = "tier" KPrefix = "prefix" KMarker = "marker" KDelimiter = "delimiter" KVerMarker = "verMarker" )
View Source
const ( CTX_KEY_TENANT_ID = "Tenantid" CTX_KEY_USER_ID = "Userid" CTX_KEY_IS_ADMIN = "Isadmin" CTX_VAL_TRUE = "true" CTX_REPRE_TENANT = "Representedtenantid" CTX_KEY_OBJECT_KEY = "ObjectKey" CTX_KEY_BUCKET_NAME = "BucketName" CTX_KEY_SIZE = "ObjectSize" CTX_KEY_LOCATION = "Location" )
View Source
const ( REQUEST_PATH_BUCKET_NAME = "bucketName" REQUEST_PATH_OBJECT_KEY = "objectKey" REQUEST_PATH_BACKEND_ID = "backendId" REQUEST_HEADER_CONTENT_LENGTH = "Content-Length" REQUEST_HEADER_BACKEND = "x-amz-meta-backend" REQUEST_HEADER_STORAGE_CLASS = "x-amz-storage-class" REQUEST_HEADER_COPY_SOURCE = "X-Amz-Copy-Source" REQUEST_HEADER_COPY_SOURCE_RANGE = "X-Amz-Copy-Source-Range" REQUEST_HEADER_ACL = "X-Amz-Acl" REQUEST_HEADER_CONTENT_MD5 = "Content-Md5" REQUEST_HEADER_CONTENT_TYPE = "Content-Type" REQUEST_HEADER_SSE_KEY = "x-amz-server-side-encryption" REQUEST_HEADER_SSE_VALUE_AES256 = "AES256" REQUEST_HEADER_ARCHIVE = "X-Amz-Storage-Class" )
View Source
const ( REQUEST_FORM_KEY = "Key" REQUEST_FORM_BUCKET = "Bucket" )
Variables ¶
This section is empty.
Functions ¶
func GetAdminContext ¶ added in v1.3.2
func GetFilterPathParams ¶ added in v1.0.0
func GetPaginationParam ¶
func GetSizeRequestParamAsInt64 ¶ added in v1.8.1
func GetSortParam ¶
An example of sort key parameter will be like this: sort=key1:asc,key2:desc
func InitCtxWithAuthInfo ¶ added in v0.6.3
func InitCtxWithAuthInfoNonAdmin ¶ added in v1.3.2
TODO: Can be optimized with above function InitCtxWithAuthInfo()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.