Documentation
      ¶
    
    
  
    
  
    Index ¶
- func WithInstanceConfig(ctx context.Context, config *conf.Configuration, instanceID string) (context.Context, error)
 - type API
 - func (a *API) CreateInstance(w http.ResponseWriter, r *http.Request) error
 - func (a *API) DeleteInstance(w http.ResponseWriter, r *http.Request) error
 - func (a *API) GetAppManifest(w http.ResponseWriter, r *http.Request) error
 - func (a *API) GetInstance(w http.ResponseWriter, r *http.Request) error
 - func (a *API) HealthCheck(w http.ResponseWriter, r *http.Request) error
 - func (a *API) ListenAndServe(hostAndPort string)
 - func (a *API) Settings(w http.ResponseWriter, r *http.Request) error
 - func (a *API) UpdateInstance(w http.ResponseWriter, r *http.Request) error
 
- type BitBucketGateway
 - type BitBucketTransport
 - type GatewayClaims
 - type GitHubGateway
 - type GitHubTransport
 - type GitLabGateway
 - type GitLabTransport
 - type HTTPError
 - type InstanceRequestParams
 - type InstanceResponse
 - type NetlifyMicroserviceClaims
 - type OAuthError
 - type Role
 - type Settings
 
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithInstanceConfig ¶
Types ¶
type API ¶
type API struct {
	// contains filtered or unexported fields
}
    API is the main REST API
func NewAPI ¶
func NewAPI(globalConfig *conf.GlobalConfiguration, db storage.Connection) *API
NewAPI instantiates a new REST API
func NewAPIFromConfigFile ¶
NewAPIFromConfigFile creates a new REST API using the provided configuration file.
func NewAPIWithVersion ¶
func NewAPIWithVersion(ctx context.Context, globalConfig *conf.GlobalConfiguration, db storage.Connection, version string) *API
NewAPIWithVersion creates a new REST API using the specified version
func (*API) CreateInstance ¶
func (*API) DeleteInstance ¶
func (*API) GetAppManifest ¶
func (*API) GetInstance ¶
func (*API) HealthCheck ¶
func (*API) ListenAndServe ¶
ListenAndServe starts the REST API
func (*API) UpdateInstance ¶
type BitBucketGateway ¶ added in v0.6.0
type BitBucketGateway struct {
	// contains filtered or unexported fields
}
    func NewBitBucketGateway ¶ added in v0.6.0
func NewBitBucketGateway() *BitBucketGateway
func (*BitBucketGateway) ServeHTTP ¶ added in v0.6.0
func (bb *BitBucketGateway) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BitBucketTransport ¶ added in v0.6.0
type BitBucketTransport struct{}
    type GatewayClaims ¶
type GatewayClaims struct {
	jwt.StandardClaims
	Email        string                 `json:"email"`
	AppMetaData  map[string]interface{} `json:"app_metadata"`
	UserMetaData map[string]interface{} `json:"user_metadata"`
}
    type GitHubGateway ¶
type GitHubGateway struct {
	// contains filtered or unexported fields
}
    GitHubGateway acts as a proxy to GitHub
func NewGitHubGateway ¶
func NewGitHubGateway() *GitHubGateway
func (*GitHubGateway) ServeHTTP ¶
func (gh *GitHubGateway) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GitHubTransport ¶ added in v0.3.5
type GitHubTransport struct{}
    type GitLabGateway ¶ added in v0.4.0
type GitLabGateway struct {
	// contains filtered or unexported fields
}
    GitLabGateway acts as a proxy to Gitlab
func NewGitLabGateway ¶ added in v0.4.0
func NewGitLabGateway() *GitLabGateway
func (*GitLabGateway) ServeHTTP ¶ added in v0.4.0
func (gl *GitLabGateway) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GitLabTransport ¶ added in v0.4.0
type GitLabTransport struct{}
    type HTTPError ¶
type HTTPError struct {
	Code            int    `json:"code"`
	Message         string `json:"msg"`
	InternalError   error  `json:"-"`
	InternalMessage string `json:"-"`
	ErrorID         string `json:"error_id,omitempty"`
}
    HTTPError is an error with a message and an HTTP status code.
func (*HTTPError) WithInternalError ¶
WithInternalError adds internal error information to the error
func (*HTTPError) WithInternalMessage ¶
WithInternalMessage adds internal message information to the error
type InstanceRequestParams ¶
type InstanceRequestParams struct {
	UUID       string              `json:"uuid"`
	BaseConfig *conf.Configuration `json:"config"`
}
    type InstanceResponse ¶
type OAuthError ¶
type OAuthError struct {
	Err             string `json:"error"`
	Description     string `json:"description,omitempty"`
	InternalError   error  `json:"-"`
	InternalMessage string `json:"-"`
}
    OAuthError is the JSON handler for OAuth2 error responses
func (*OAuthError) Error ¶
func (e *OAuthError) Error() string
func (*OAuthError) WithInternalError ¶
func (e *OAuthError) WithInternalError(err error) *OAuthError
WithInternalError adds internal error information to the error
func (*OAuthError) WithInternalMessage ¶
func (e *OAuthError) WithInternalMessage(fmtString string, args ...interface{}) *OAuthError
WithInternalMessage adds internal message information to the error