Documentation ¶
Overview ¶
Connector for Aliyun
Connector for Aliyun OSS ¶
Connector for Azure using Azure Resource Manager(arm)
Package connector: Used to connect to different types of cloud
TODO: More flexible use of rate limit control by APIs instead of by connectors
Connector for k8s ¶
Connector for Tencent cloud ¶
Connector for Tencent COS
Index ¶
- Constants
- func CallAliyunCloud(authProvider auth.IAuthProvider, endpoint string, bEpWithRegion bool, ...) (*json.RawMessage, error)
- func CallAliyunOSS(authProvider auth.IAuthProvider, bucketName string, action string, ...) (*json.RawMessage, error)
- func CallAzureList(authProvider auth.IAuthProvider, provider string, version string, ...) (*json.RawMessage, error)
- func CallAzureWithEndpoint(authProvider auth.IAuthProvider, version string, endpoint string, ...) (*json.RawMessage, error)
- func CallK8sList(authProvider auth.IAuthProvider, namespace string, group string, ...) (*json.RawMessage, error)
- func CallTencentCOS(authProvider auth.IAuthProvider, bucketName string, service string, ...) (*json.RawMessage, error)
- func CallTencentCloud(authProvider auth.IAuthProvider, service string, version string, action string, ...) (*json.RawMessage, error)
Constants ¶
const ( ALIYUN_ACCESS_KEY_ID = "ALIBABA_CLOUD_ACCESS_KEY_ID" ALIYUN_ACCESS_KEY_SECRET = "ALIBABA_CLOUD_ACCESS_KEY_SECRET" ALIYUN_REGION = "ALIBABA_CLOUD_REGION" )
const ( AZURE_CLIENT_ID = "AZURE_CLIENT_ID" AZURE_TENANT_ID = "AZURE_TENANT_ID" AZURE_CLIENT_SECRET = "AZURE_CLIENT_SECRET" AZURE_SUBSCRIPTION_ID = "AZURE_SUBSCRIPTION_ID" )
const ( TENCENTCLOUD_SECRET_ID = "TENCENTCLOUD_SECRET_ID" TENCENTCLOUD_SECRET_KEY = "TENCENTCLOUD_SECRET_KEY" TENCENTCLOUD_REGION = "TENCENTCLOUD_REGION" )
const ALIYUN_OSS_MARKER_KEY = "marker"
Variables ¶
This section is empty.
Functions ¶
func CallAliyunCloud ¶
func CallAliyunCloud(authProvider auth.IAuthProvider, endpoint string, bEpWithRegion bool, version string, action string, extraParam map[string]any) ( *json.RawMessage, error)
CallAliyunCloud: Send a request to Aliyun and parse response
TODO: Deal with more types of extraParam for tea @param: authProvider: IAuthProvider to provide profile of auth @param: endpoint: Parameter for Aliyun common request @param: bEpWithRegion: Indicate if region should be added to endpoint @param: version: Parameter for Aliyun common request @param: action: Parameter for Aliyun common request @param: extraParam: Extra parameters provided to Aliyun @return: Response data from Aliyun @return: Error
func CallAliyunOSS ¶
func CallAliyunOSS(authProvider auth.IAuthProvider, bucketName string, action string, extraParam map[string]any) ( *json.RawMessage, error)
CallAliyunOSS: Send a request to Aliyun OSS and parse response
TODO: Deal with more extra parameters for different reflect call @param: authProvider: IAuthProvider to provide profile of auth @param: bucketName: Name of the bucket. List all buckets if empty string given @param: action: Parameter for the reflection of Aliyun OSS API @param: extraParam: Currently only used to transfer marker when listing buckets @return: Response data from Aliyun OSS @return: Error
func CallAzureList ¶
func CallAzureList(authProvider auth.IAuthProvider, provider string, version string, rsType string, nextLink string) ( *json.RawMessage, error)
CallAzureList: Send a request to Azure to list resources
TODO: Deal with extra parameters for Azure request @param: authProvider: IAuthProvider to provide profile of auth @param: provider: Parameter for Azure common request @param: version: Parameter for Azure common request @param: rsType: Parameter for Azure common request @param: nextLink: Returned from the previous call for pagination @return: Response data from Azure @return: Error
func CallAzureWithEndpoint ¶
func CallAzureWithEndpoint(authProvider auth.IAuthProvider, version string, endpoint string, action string) ( *json.RawMessage, error)
CallAzureList: Send a request to Azure with an endpoint provided
The endpoint may be returned from the previous call as nextLink or resource id. Other functions like CallAzureList also concats endpoint string from their own parameters.
TODO: Deal with extra parameters for Azure request @param: authProvider: IAuthProvider to provide profile of auth @param: version: Parameter for Azure common request @param: endpoint: Parameter for Azure common request @param: action: Parameter for Azure common request @return: Response data from Azure @return: Error
func CallK8sList ¶
func CallK8sList(authProvider auth.IAuthProvider, namespace string, group string, version string, resource string, listOpts map[string]any) ( *json.RawMessage, error)
CallK8sList: Send a request to a k8s server to list resources. If group and version are both empty, RESTMapper is used to search for mapped gvr
NOTE: It's not necessary to define a function to get data of single resource, since all the data will be returned in the result of listing in the current usages @param: authProvider: IAuthProvider to provide pathname of kubeconfig @param: namespace: Parameter for k8s request @param: group: Parameter for k8s request @param: version: Parameter for k8s request @param: resource: Parameter for k8s request @param: extraParam: Parameters of ListOptions @return: Response data from k8s server @return: Error
func CallTencentCOS ¶
func CallTencentCOS(authProvider auth.IAuthProvider, bucketName string, service string, action string) ( *json.RawMessage, error)
CallTencentCOS: Send a request to Tencent COS and parse response
TODO: Deal with extra parameters for different reflect call @param: authProvider: IAuthProvider to provide profile of auth @param: bucketName: Name of bucket. List all buckets if empty string given @param: service: Parameter for the reflection of Tencent COS API @param: action: Parameter for the reflection of Tencent COS API @return: Response data from Tencent COS @return: Error
func CallTencentCloud ¶
func CallTencentCloud(authProvider auth.IAuthProvider, service string, version string, action string, extraParam map[string]any) ( *json.RawMessage, error)
CallTencentCloud: Send a request to Tencent cloud and parse response @param: authProvider: IAuthProvider to provide profile of auth @param: service: Parameter for Tencent cloud common request @param: version: Parameter for Tencent cloud common request @param: action: Parameter for Tencent cloud common request @param: extraParam: Extra Parameter provided to Tencent cloud @return: Response data from Tencent cloud @return: Error
Types ¶
This section is empty.