softlayer-go | SoftLayer API Client for the Go Language | REST library

 by   softlayer Go Version: v1.0.4 License: Apache-2.0

kandi X-RAY | softlayer-go Summary

kandi X-RAY | softlayer-go Summary

softlayer-go is a Go library typically used in Web Services, REST applications. softlayer-go has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This library contains a complete implementation of the SoftLayer API for client application development in the Go programming language. Code for each API data type and service method is pre-generated, using the SoftLayer API metadata endpoint as input, thus ensuring 100% coverage of the API right out of the gate. It was designed to feel as natural as possible for programmers familiar with other popular SoftLayer SDKs, and attempts to minimize unnecessary boilerplate and type assertions where possible.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              softlayer-go has a low active ecosystem.
              It has 51 star(s) with 45 fork(s). There are 17 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 5 open issues and 85 have been closed. On average issues are closed in 71 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of softlayer-go is v1.0.4

            kandi-Quality Quality

              softlayer-go has 0 bugs and 0 code smells.

            kandi-Security Security

              softlayer-go has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              softlayer-go code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              softlayer-go is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              softlayer-go releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              It has 56112 lines of code, 8228 functions and 120 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed softlayer-go and discovered the below as its top functions. This is intended to give you an instant insight into softlayer-go implemented functionality, and help decide if they suit your requirements.
            • SelectProductPricesByCategory filters product items by category code
            • makeHTTPRequest makes an HTTP request
            • New initializes a new session
            • UpgradeVirtualGuestWithPreset upgrades a virtual guest to a virtual guest .
            • generateAPI is used to generate the API code
            • UpgradeVirtualGuest upgrades a virtual guest .
            • VlanListCommand handles VlanList command
            • VlanDetailCommand handles the detail of a VLAN .
            • testHelpers is a test - spy implementation of test helpers
            • Run executes the API call .
            Get all kandi verified functions for this library.

            softlayer-go Key Features

            No Key Features are available at this moment for softlayer-go.

            softlayer-go Examples and Code Snippets

            softlayer-go,Usage,Using datatypes
            Godot img1Lines of Code : 41dot img1License : Permissive (Apache-2.0)
            copy iconCopy
            package main
            
            import (
            	"fmt"
            	"log"
            
            	"github.com/softlayer/softlayer-go/datatypes"
            	"github.com/softlayer/softlayer-go/services"
            	"github.com/softlayer/softlayer-go/session"
            	"github.com/softlayer/softlayer-go/sl"
            )
            
            func main() {
            	sess := session.  
            softlayer-go,Usage,Object Masks, Filters, Result Limits
            Godot img2Lines of Code : 38dot img2License : Permissive (Apache-2.0)
            copy iconCopy
            accountService := services.GetAccountService(sess)
            
            accountService.
            	Mask("id;hostname").
            	Filter(`{"virtualGuests":{"domain":{"operation":"example.com"}}}`).
            	GetObject()
            
            accountServiceWithMaskAndFilter = accountService.Mask("id;hostname").
            	Filter  
            softlayer-go,Usage,Password-based authentication
            Godot img3Lines of Code : 26dot img3License : Permissive (Apache-2.0)
            copy iconCopy
            func main() {
                // Create a session specifying an XML-RPC endpoint url.
                sess := &session.Session{
                    Endpoint: "https://api.softlayer.com/xmlrpc/v3",
                }
            
                // Get a token from the api using your username and password
                userServi  

            Community Discussions

            QUESTION

            softlayer SDK SoftLayer_Exception_Public: Access Denied
            Asked 2019-May-19 at 18:26

            Using examples in Go SDK with Username and apikey returned

            {"error":"Access Denied. ","code":"SoftLayer_Exception_Public"}

            ...

            ANSWER

            Answered 2017-Dec-21 at 14:58

            I didn't have issues when running your code, I recommend to check the username and apikey you are sending. See the API Access Information section in your profile https://control.softlayer.com/account/user/profile

            Source https://stackoverflow.com/questions/47922453

            QUESTION

            Softlayer API for closing a session in golang?
            Asked 2019-Feb-14 at 15:29

            I am using the softlayer go client https://github.com/softlayer/softlayer-go

            I am not able to close the softlayer session. How do I do that?

            I have created the softlayer session using the Session.New() API. Reference:- https://github.com/softlayer/softlayer-go/blob/master/session/session.go

            ...

            ANSWER

            Answered 2019-Feb-14 at 15:29

            The https://github.com/softlayer/softlayer-go/blob/master/session/session.go basically configures the go-client by storing the username, apiKey, endpoint, timeout, etc., in variables, which are used every time do a request to the API.

            If you review the SoftLayer API, it doesn't have any method that will create/close a session, so if you want to simulate something similar then I think you can try by sending blank values to Session.New() and removing any value stored in ~/.softlayer file

            Source https://stackoverflow.com/questions/54675353

            QUESTION

            Snapshotcapacity not being fetched by softlayer-go object mask
            Asked 2018-Aug-22 at 20:56

            I am trying to fetch SnapshotCapacityGb relational datatype in go. Here is what I have:

            ...

            ANSWER

            Answered 2018-Aug-22 at 20:56

            Some network storage devices have not a snapshot, so the snapshotCapacityGb value isn’t present in the response or it is null. Since you are able to retrieve that value by using REST, probably the go-client is using XML-RPC endpoint so I suggest trying with the REST endpoint:

            Source https://stackoverflow.com/questions/51964605

            QUESTION

            Softlayer golang object mask not working
            Asked 2018-Aug-22 at 14:25

            I have the following piece of gloang code. ALthough this works I cannot see the relational property primaryRouter in the result.

            package main

            ...

            ANSWER

            Answered 2018-Aug-22 at 14:25

            Try in your code with the REST endpoint, like this example:

            Source https://stackoverflow.com/questions/51963305

            QUESTION

            GetLocations fails with "Object does not exist to execute method on"
            Asked 2018-May-30 at 16:39

            I am having trouble with the GetLocations call. Every time I try to execute it I receive the error:

            SoftLayer_Exception: Object does not exist to execute method on. (SoftLayer_Location_Group::getLocations) (HTTP 200)

            This makes me think that there is something wrong with the locationService object I created but I don't understand what. Does anyone see the issue?

            ...

            ANSWER

            Answered 2018-May-30 at 16:39

            The error that you got is because you need to use an identifier locationGroup ID.

            Add this locationGroupId to you go code, like this example:

            Source https://stackoverflow.com/questions/50608572

            QUESTION

            Unable to get itemCategory info from call GetConfiguration when called from golang
            Asked 2018-May-09 at 15:09

            The api call

            ...

            ANSWER

            Answered 2018-May-09 at 15:09

            The default endpoint is REST but in your environment you are using xmlrpc, which is probably due to the existence of the ~ / .softlayer file and in this it is configured as an XMLRPC enpoint.

            For more information you can see the following documentation: https://github.com/softlayer/softlayer-go

            This issue happens for the XMLRPC enpoint and you can report it in the go GitHub. https://github.com/softlayer/softlayer-go/issues/

            Try in your code with the REST endpoint, like this example:

            Source https://stackoverflow.com/questions/50241215

            QUESTION

            Response from GetConfiguration does not return ItemCategory information
            Asked 2018-May-08 at 15:13

            The api call I am using is: https://api.softlayer.com/rest/v3/SoftLayer_Product_Package/257/getConfiguration The type returned from this call is an array of Product_Package_Order_Configuration: https://github.com/softlayer/softlayer-go/blob/master/datatypes/product.go#L1413

            The issue I am seeing is that in the response, the ItemCategory field is always nil. I am not using a mask so I would think everything should be returned.

            Is there some way I can modify this call to have it return ItemCategory as well?

            ...

            ANSWER

            Answered 2018-May-08 at 15:13

            The itemCategory is a relational property and this belongs to another datatype, so you need to use object-masks over the getConfiguration method if you want to retrieve this data.

            For more information you can see the following documentation:

            Source https://stackoverflow.com/questions/50223233

            QUESTION

            Receiving error when attempting to verify a virtual machine order
            Asked 2018-May-02 at 19:39

            When I run the below code I get the error SoftLayer_Exception_InvalidValue: Invalid value provided for 'blockDevices.device'. A device number must be provided for all block devices. (HTTP 200)

            What is wrong with the way I initialize the block devices?

            I see the fields, Id and Uuid for type Virtual_Disk_Image, but no number. From the descriptions it sounds like these values are set post-creation. https://github.com/softlayer/softlayer-go/blob/master/datatypes/virtual.go#L91

            ...

            ANSWER

            Answered 2018-May-02 at 19:39

            You just need to add the attribute ¨Device¨ for each Virtual_Guest_Block_Device object and the ¨ LocalDiskFlag ¨ attribute must be added once and not for each Virtual_Guest_Block_Device.

            The same that this example:

            Source https://stackoverflow.com/questions/50123606

            QUESTION

            Mask and filter are not working when using the SoftLayer API
            Asked 2018-Feb-19 at 23:49

            When I add billingItemFlag to my mask and filter it is missing in the results. I am using the SoftLayer-go api from the SoftLayer GitHub account. Is my filter or mask wrong?

            Please consider the following code:

            ...

            ANSWER

            Answered 2018-Feb-19 at 23:49

            The code you posted works when using the default endpoint or any other REST endpoint. It seems an issue from API, I recommend to switch to the default endpoint or use:

            https://api.softlayer.com/rest/v3.1

            Source https://stackoverflow.com/questions/48843367

            QUESTION

            SoftLayer Object Storage API: Creation of 250GB/500GB Block Storage failure. 20GB or 1000GB are OK
            Asked 2017-Mar-10 at 21:12

            I am deploying CloudFoundry and internally calling SoftLayer API to create 250GB iSCSI disk but causes error as below.
            In similar method, 500GB disk creation caused error, but 20GB or 1000GB creation were success.

            Is it SoftLayer API issue or my environment changed some price list?

            ...

            ANSWER

            Answered 2017-Mar-10 at 21:12

            The short answer is that you need to use 1000 instead 250 or 500 in this request if you wanna keep using the same filters:

            Source https://stackoverflow.com/questions/42709272

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install softlayer-go

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/softlayer/softlayer-go.git

          • CLI

            gh repo clone softlayer/softlayer-go

          • sshUrl

            git@github.com:softlayer/softlayer-go.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular REST Libraries

            public-apis

            by public-apis

            json-server

            by typicode

            iptv

            by iptv-org

            fastapi

            by tiangolo

            beego

            by beego

            Try Top Libraries by softlayer

            softlayer-python

            by softlayerPython

            sl-ember-components

            by softlayerJavaScript

            swftp

            by softlayerPython

            softlayer-ruby

            by softlayerRuby

            jumpgate

            by softlayerPython