Giter VIP home page Giter VIP logo

alibabacloud-dkms-gcs-go-sdk's Introduction

English | 简体中文

AlibabaCloud DKMS-GCS SDK for Go

Requirements

  • Go 1.13 or later.

Installation

If you use go mod to manage your dependence, You can declare the dependency on AlibabaCloud DKMS SDK for Go in the go.mod file:

require (
	github.com/aliyun/alibabacloud-dkms-gcs-go-sdk v0.5.1
	github.com/alibabacloud-go/tea v1.1.17
)

Or, Run the following command to get the remote code package:

$ go get -u github.com/aliyun/alibabacloud-dkms-gcs-go-sdk

Quick Examples

package example

import (
	"fmt"
	"github.com/alibabacloud-go/tea/tea"
	dedicatedkmsopenapi "github.com/aliyun/alibabacloud-dkms-gcs-go-sdk/openapi"
	dedicatedkmsopenapiutil "github.com/aliyun/alibabacloud-dkms-gcs-go-sdk/openapi-util"
	dedicatedkmssdk "github.com/aliyun/alibabacloud-dkms-gcs-go-sdk/sdk"
)

func main() {
	config := &dedicatedkmsopenapi.Config{
		Protocol:         tea.String("https"),
		ClientKeyContent: tea.String("<your client key content>"),
		Password:         tea.String("<your client key password>"),
		Endpoint:         tea.String("<your dkms instance service endpoint>"),
	}
	client, err := dedicatedkmssdk.NewClient(config)
	if err != nil {
		panic(err)
	}
	runtimeOptions := &dedicatedkmsopenapiutil.RuntimeOptions{
		IgnoreSSL: tea.Bool(true),
	}
	advanceEncryptRequest := &dedicatedkmssdk.AdvanceEncryptRequest{
		KeyId:     tea.String("<your key id>"),
		Plaintext: []byte("plaintext"),
	}
	advanceEncryptResponse, err := client.AdvanceEncryptWithOptions(advanceEncryptRequest, runtimeOptions)
	if err != nil {
		panic(err)
	}
	fmt.Println(advanceEncryptResponse)
}

License

Apache-2.0

Copyright (c) 2009-present, Alibaba Cloud All rights reserved.

alibabacloud-dkms-gcs-go-sdk's People

Contributors

alibaba-oss avatar dependabot[bot] avatar oobujieshi avatar wanglixiang01 avatar yingzhi-aliyun avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

alibabacloud-dkms-gcs-go-sdk's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.