github.heygears.com/openimsdk/tools@v0.0.49/s3/oss/internal.go (about)

     1  // Copyright © 2023 OpenIM. All rights reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package oss
    16  
    17  import (
    18  	"net/http"
    19  	"net/url"
    20  	_ "unsafe"
    21  
    22  	"github.com/aliyun/aliyun-oss-go-sdk/oss"
    23  )
    24  
    25  //go:linkname signHeader github.com/aliyun/aliyun-oss-go-sdk/oss.Conn.signHeader
    26  func signHeader(c oss.Conn, req *http.Request, canonicalizedResource string, credentials oss.Credentials)
    27  
    28  //go:linkname getURLParams github.com/aliyun/aliyun-oss-go-sdk/oss.Conn.getURLParams
    29  func getURLParams(c oss.Conn, params map[string]any) string
    30  
    31  //go:linkname getURL github.com/aliyun/aliyun-oss-go-sdk/oss.urlMaker.getURL
    32  func getURL(um urlMaker, bucket, object, params string) *url.URL
    33  
    34  type urlMaker struct {
    35  	Scheme  string
    36  	NetLoc  string
    37  	Type    int
    38  	IsProxy bool
    39  }