Categorygithub.com/ianb-mp/megaportgo
modulepackage
1.0.0-alpha.3
Repository: https://github.com/ianb-mp/megaportgo.git
Documentation: pkg.go.dev

# README

Go Reference

Megaport Go

Overview

This is the Megaport Go Library. It allows users to orchestrate the creation of Megaport Services.

Before using this library, please ensure you read Megaport's Terms and Conditions.

The Megaport API Documentation is also available online.

Testing

For mock tests go test ./...

To run integration tests against the Megaport API you will need to generate an API key

export MEGAPORT_ACCESS_KEY=YOUR_KEY
export MEGAPORT_SECRET_KEY=YOUR_KEY

go test -integration ./... 

Contributing

Contributions via pull request are welcome. Familiarize yourself with these guidelines to increase the likelihood of your pull request being accepted.

All contributions are subject to the Megaport Contributor Licence Agreement. The CLA clarifies the terms of the Mozilla Public Licence 2.0 used to Open Source this respository and ensures that contributors are explictly informed of the conditions. Megaport requires all contributors to accept these terms to ensure that the Megaport Terraform Provider remains available and licensed for the community.

The main themes of the Megaport Contributor Licence Agreement cover the following conditions:

  • Clarifying the Terms of the Mozilla Public Licence 2.0, used to Open Source this project.
  • As a contributor, you have permission to agree to the License terms.
  • As a contributor, you are not obligated to provide support or warranty for your contributions.
  • Copyright is assigned to Megaport to use as Megaport determines, including within commercial products.
  • Grant of Patent Licence to Megaport for any contributions containing patented or future patented works.

The Megaport Contributor Licence Agreement is the authoritative document over these conditions and any other communications unless explicitly stated otherwise.

When you open a Pull Request, all authors of the contributions are required to comment on the Pull Request confirming acceptance of the CLA terms. Pull Requests can not be mMegaport_Contributor_Licence_Agreementerged until this is complete.

The Megaport Contributor Licence Agreement applies to contributions. All users are free to use the MegaportGo project under the MPL-2.0 Open Source Licence.

Megaport users are also bound by the Acceptable Use Policy.

Getting Started

Prior to working on new code, review the Open Issues. Check whether your issue has already been raised, and consider working on an issue with votes or clear demand.

If you don't see an open issue for your need, open one and let others know what you are working on. Avoid lengthy or complex changes that rewrite the repository or introduce breaking changes. Straightforward pull requests based on discussion or ideas and Megaport feedback are the most likely to be accepted.

Megaport is under no obligation to accept any pull requests or to accept them in full. You are free to fork and modify the code for your own use as long is it is published under the MPL-2.0 License.

Notes

The MegaportGo project is not part of the official Megaport product and is not supported through the usual product support channels. Megaport will work on the repository as it fits within other internal activities.

Issues will be tracked for their source and type.

  • Priority will be given to issues and bugs within the existing feature set.
  • Development requests may receive a response on the issue boards. Some features cannot be discussed until after their official launch.
  • Usage support requests will get limited responses. The tool is not part of the paid product and support is limited.

# Functions

CheckResponse checks the API response for errors, and returns them if present.
DoRequest submits an HTTP request.
DoRequestWithClient submits an HTTP request using the specified client.
GenerateRandomNumber generates a random number between an upper and lower bound.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
New returns a new Megaport API client instance.
No description provided by the author
No description provided by the author
NewFromToken returns a new Megaport API client with the given API token.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PtrTo returns a pointer to the provided input.
SetBaseURL is a client option for setting the base URL.
SetLogHandler is an option to pass in a custom slog handler.
SetRequestHeaders sets optional HTTP headers on the client that are sent on each HTTP request.
SetUserAgent is a client option for setting the user agent.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The CONFIGURED service state.
The LIVE service state.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Client manges communication with the Megaport API.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
An ErrorResponse reports the error caused by an API request.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ProductServiceOp handles communication with Product methods of the Megaport API.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NetworkInterface represents a vNIC.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MVEServiceOp handles communication with MVE methods of the Megaport API.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PortServiceOp handles communication with Port methods of the Megaport API.
No description provided by the author
ProductServiceOp handles communication with Product methods of the Megaport API.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
---- VXC Detail Types //.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
MVEService is an interface for interfacing with the MVE endpoints of the Megaport API.
No description provided by the author
No description provided by the author
No description provided by the author

# Type aliases

ClientOpt are options for New.
InstanceSize encodes the available MVE instance sizes.
RequestCompletionCallback defines the type of the request callback function.