GithubHelp home page GithubHelp logo

denisse-dev / azure-sdk-for-go-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/azure-sdk-for-go-samples

0.0 1.0 0.0 553 KB

Examples of how to utilize Azure services from Go.

License: MIT License

Go 98.57% Smarty 0.35% Shell 1.06% Makefile 0.02%

azure-sdk-for-go-samples's Introduction

languages products page_type description
go
azure
sample
A collection of samples showing how to use the Azure SDK for Go.

Azure SDK for Go Samples

azure-sdk-for-go-samples is a collection of sample usages of the Azure/azure-sdk-for-go.

Repo Build Status

For general SDK help start with the main SDK README.

To run tests

  1. set up authentication (see following)
  2. dep ensure
  3. go test -v ./network/ (or any package)

To run all tests: make test.

To use service principal authentication, create a principal by running az ad sp create-for-rbac -n "<yourAppName>" and set the following environment variables. You can copy .env.tpl to a .env file in each package for ease of use.

export AZURE_SUBSCRIPTION_ID=
export AZURE_TENANT_ID=
export AZURE_CLIENT_ID=
export AZURE_CLIENT_SECRET=

export AZURE_LOCATION_DEFAULT=westus2
export AZURE_BASE_GROUP_NAME=azure-samples-go
export AZURE_KEEP_SAMPLE_RESOURCES=0

For device flow authentication, create a "native" app by running az ad app create --display-name "<yourAppName>" --native-app --requiredResourceAccess @manifest.json; and specify the -useDeviceFlow flag when running tests.

Other notes

AZURE_SP_OBJECT_ID represents a service principal ObjectID. It is needed to run the Create VM with encrypted managed disks sample.

Resources

License

This code is provided under the MIT license. See LICENSE for details.

Contribute

We welcome your contributions! For instructions and our code of conduct see CONTRIBUTING.md. And thank you!

azure-sdk-for-go-samples's People

Contributors

aahill avatar billpratt avatar esell avatar jhendrixmsft avatar joshgav avatar laramume avatar lawrencegripper avatar marstr avatar mcardosos avatar radu-matei avatar seyadava avatar sozercan avatar sptramer avatar supernova-eng avatar tariq1890 avatar theregan avatar v-jaswel avatar

Watchers

 avatar

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.