Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // PrefixURI is the root of the Section API PrefixURI = &url.URL{Scheme: "https", Host: "aperture.section.io"} // Token is the token for authenticating to the Section API Token string // Debug toggles whether extra information is emitted from requests/responses Debug bool )
Functions ¶
func ApplicationEnvironmentModuleUpdate ¶ added in v1.3.0
func ApplicationEnvironmentModuleUpdate(accountID int, applicationID int, env string, filePath string, up []EnvironmentUpdateCommand) (err error)
ApplicationEnvironmentModuleUpdate updates a module's configuration
Types ¶
type Account ¶
type Account struct { ID int `json:"id"` Href string `json:"href"` AccountName string `json:"account_name"` IsAdmin bool `json:"is_admin"` BillingUser int `json:"billing_user"` Requires2FA bool `json:"requires_2fa"` }
Account represents an account on Section
type App ¶
type App struct { ID int `json:"id"` Href string `json:"href"` ApplicationName string `json:"application_name"` Environments []Environment `json:"environments"` }
App represents an application deployed on Section
func Application ¶
Application returns detailed information about a given application.
func Applications ¶
Applications returns a list of applications on a given account.
type AppStatus ¶ added in v1.3.0
type AppStatus struct { InService bool `json:"inService"` State string `json:"state"` InstanceName string `json:"instanceName"` PayloadID string `json:"payloadID"` IsLatest bool `json:"isLatest"` }
AppStatus represents the status of an application deployed on Section
type Domain ¶
type Domain struct { Name string `json:"name"` ZoneName string `json:"zoneName"` CNAME string `json:"cname"` Mode string `json:"mode"` }
Domain represents an applications environments' domains
type Environment ¶
type Environment struct { ID int `json:"id"` Href string `json:"href"` EnvironmentName string `json:"environment_name"` Domains []Domain `json:"domains"` Stack []Module `json:"stack"` }
Environment represents an application's environments on Section
func ApplicationEnvironments ¶
func ApplicationEnvironments(accountID int, applicationID int) (es []Environment, err error)
ApplicationEnvironments returns environment information for a given application.
type EnvironmentUpdateCommand ¶ added in v1.3.0
type EnvironmentUpdateCommand struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value"` }
EnvironmentUpdateCommand is a blah
type Module ¶
type Module struct { Name string `json:"name"` Image string `json:"image"` Href string `json:"href"` }
Module represents a proxy in the traffic delivery stack
type RenewCertResponse ¶ added in v1.1.0
type RenewCertResponse struct { Issued bool `json:"issued"` Message string `json:"message"` Expiry time.Time `json:"expiry"` RenewFrom time.Time `json:"renewFrom"` }
RenewCertResponse represents an API response to POST /account/{accountId}/domain/{hostName}/renewCertificate
func DomainsRenewCert ¶ added in v1.1.0
func DomainsRenewCert(accountID int, hostname string) (r RenewCertResponse, err error)
DomainsRenewCert handles renewing a certificate for a given account and domain.
type User ¶
type User struct { ID int `json:"id"` Email string `json:"email"` FirstName string `json:"first_name"` LastName string `json:"last_name"` CompanyName string `json:"company_name"` PhoneNumber string `json:"phone_number"` Verified bool `json:"verified"` Requires2FA bool `json:"requires2fa"` Enforce2FA bool `json:"enforce2fa"` }
User represents a user account known to Section
func CurrentUser ¶
CurrentUser returns details for the currently authenticated user