core

module
v0.0.0-...-73717b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2023 License: Apache-2.0

README

AttainsCloud SDK Core Package For Golang.

中文文档

Install SDK Toolkit

Run environments

The GO SDK can run in environments of 'go1.13' and above.

Install SDK

Download directly from GitHub

Download from GitHub using the 'go get' tool:

go get github.com/attains/attainscloud-sdk-go/core

SDK directory structure

core
|--auth                     // Signature and permission authentication
|--config                   // Configuration
|--errors                   // Error
|--httpclient               // http client
|--logger                   // logger package
|--metadata                 // Predefined Resources
|--model                    // Predefined model
|--retry                    // Retry policy
|--utils                    // Common tool implementation

Uninstalling SDK

When uninstalling the SDK, simply delete the downloaded source code.

Usage

package main

import (
	"fmt"
	"github.com/attains/attainscloud-sdk-go/core/httpclient"
)

func main() {
	ak, sk, region := "<your-access-key>", "<your-secret-key>", "<service-region>"
	attainsClient := httpclient.NewDefaultAttainsClient(ak, sk, fmt.Sprintf("smsv1.%s.api.attains.cloud", region))
}

Directories

Path Synopsis
Package auth credentials.go - the credentials data structure definition
Package auth credentials.go - the credentials data structure definition
utils

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL