# README
Go DeployGate
Go DeployGate is a Golang API client for interacting with most facets of the DeployGate API.
Installation
This is a client library, so there is nothing to install.
Usage
Download the library into your $GOPATH
:
$ go get github.com/fnaoto/go-deploygate
Import the library into your tool:
import "github.com/fnaoto/go-deploygate"
Examples
DeployGate's API is designed to work in the following manner:
- Create (or clone) a new configuration version for the service
- Make any changes to the version
- Validate the version
- Activate the version
This flow using the Golang client looks like this:
// Create a client object. The client has no state, so it can be persisted
// and re-used. It is also safe to use concurrently due to its lack of state.
// There is also a DefaultClient() method that reads an environment variable.
// Please see the documentation for more information and details.
client, err := deploygate.NewClient("YOUR_DEPLOYGATE_API_KEY")
// Get users who collaborate with your App
g := &deploygate.GetAppCollaboratorInput{
Owner: "owner-name",
Platform: "ios", // ios or android
AppId: "your.app.id",
}
// Add collaborator to your App
collaborator, err := client.GetAppCollaborator(g)
a := &deploygate.AddAppCollaboratorInput{
Owner: "owner-name",
Platform: "ios",
AppId: "your.app.id",
Users: "username",
Role: 2, //`1`(for developer) or `2`(for tester)
}
addResponse, err2 := client.AddAppCollaborator(a)
// Delete collaborator from your App
d := &deploygate.DeleteAppCollaboratorInput{
Owner: "owner-name",
Platform: "ios",
AppId: "your.app.id",
Users: "username",
Role: 2, //`1`(for developer) or `2`(for tester)
}
deleteResponse, err3 := client.DeleteAppCollaborator(d)
More information can be found in the DeployGate Godoc.
Reference
TODO
- Support following DeployGate API:
- [ ]: App Upload API
License
- Copyright 2016 Naoki Ainoya, Recruit Marketing Partners Co., Ltd., Apache License, Version 2.0
- This base client implementation is copied from sethvargo/go-fastly which is licensed as Copyright 2015 Seth Vargo, Apache Lisense, Version 2.0
# Functions
DefaultClient instantiates a new DeployGate API client.
NewClient creates a new API client with the given key.
NewHTTPError creates a new HTTP error from the given code.
# Constants
APIKeyEnvVar is the name of the environment variable where the DeployGate API key should be read from.
APIKeyHeader is the name of the header that contains the DeployGate API key.
DefaultEndpoint is the default endpoint for DeployGate.
# Variables
ErrMissingBackend is an error that is returned when an input struct requires a "Backend" key, but one was not set.
ErrMissingDictionary is an error that is returned when an input struct requires a "Dictionary" key, but one was not set.
ErrMissingDirector is an error that is returned when an input struct requires a "From" key, but one was not set.
ErrMissingFrom is an error that is returned when an input struct requires a "From" key, but one was not set.
ErrMissingID is an error that is returned when an input struct requires an "ID" key, but one was not set.
ErrMissingItemKey is an error that is returned when an input struct requires a "ItemKey" key, but one was not set.
ErrMissingKey is an error that is returned when an input struct requires a "Name" key, but one was not set.
ErrMissingMonth is an error that is returned when an input struct requires a "Month" key, but one was not set.
ErrMissingName is an error that is returned when an input struct requires a "Name" key, but one was not set.
ErrMissingService is an error that is returned when an input struct requires a "Service" key, but one was not set.
ErrMissingTo is an error that is returned when an input struct requires a "To" key, but one was not set.
ErrMissingURL is an error that is returned when an input struct requires a "Name" key, but one was not set.
ErrMissingVersion is an error that is returned when an input struct requires a "Version" key, but one was not set.
ErrMissingYear is an error that is returned when an input struct requires a "Year" key, but one was not set.
ProjectURL is the url for this library.
ProjectVersion is the version of this library.
UserAgent is the user agent for this particular client.
# 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
Client is the main entrypoint to the DeployGate golang API library.
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
HTTPError is a custom error type that wraps an HTTP status code with some helper functions.
No description provided by the author
RequestOptions is the list of options to pass to the request.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author