Documentation ¶
Index ¶
- Constants
- func DefaultFileSystem(cwd string) afero.Fs
- type Access
- type AccessLevel
- type AccessType
- type AggregateError
- type Application
- type ApplicationBase
- type ApplicationBuilder
- type ApplicationCore
- type ApplicationMount
- type Build
- type Cache
- type CacheConfiguration
- type Caches
- type ClientCertificateAuthority
- type Commands
- type Cron
- type Crons
- type Duration
- type Environment
- type EnvironmentAPI
- type HTTPAccess
- type Hooks
- type JSONArray
- type JSONObject
- type LookupFunc
- type MissingEnvironment
- type Mount
- type Mounts
- type Passthru
- type Preflight
- type RasterLogo
- type RedirectPath
- type RedirectPaths
- type Redirects
- type Relationship
- type Relationships
- type RenderRasterLogo
- type Route
- type RouteIdentification
- type RouteRepresentation
- type Routes
- type SSI
- type SVGLogo
- type ServiceSize
- type SocketFamily
- type SocketProtocol
- type Source
- type SourceOperation
- type SourceOperations
- type StringMap
- type TLSSTS
- type TLSSettings
- type TLSVersion
- type Upstream
- type Variables
- type Web
- type WebLocation
- type WebLocations
- type WebRule
- type WebRules
- type Worker
- type Workers
Constants ¶
View Source
const ( FormatSVG = "image/svg+xml" FormatGIF = "image/gif" FormatICO = "image/vnd.microsoft.icon" FormatJPG = "image/jpeg" FormatPNG = "image/png" FormatTIFF = "image/tiff" )
Variables ¶
This section is empty.
Functions ¶
func DefaultFileSystem ¶
Types ¶
type Access ¶
type Access map[AccessType]AccessLevel
type AccessLevel ¶
type AccessLevel uint8
const ( AccessLevelViewer AccessLevel = iota AccessLevelContributor AccessLevelAdmin )
func NewAccessLevel ¶
func NewAccessLevel(name string) (AccessLevel, error)
func (AccessLevel) MarshalText ¶
func (v AccessLevel) MarshalText() ([]byte, error)
func (AccessLevel) String ¶
func (v AccessLevel) String() string
func (*AccessLevel) UnmarshalText ¶
func (v *AccessLevel) UnmarshalText(text []byte) (err error)
type AccessType ¶
type AccessType uint8
const (
AccessTypeSSH AccessType = iota
)
func NewAccessType ¶
func NewAccessType(name string) (AccessType, error)
func (AccessType) MarshalText ¶
func (v AccessType) MarshalText() ([]byte, error)
func (AccessType) String ¶
func (v AccessType) String() string
func (*AccessType) UnmarshalText ¶
func (v *AccessType) UnmarshalText(text []byte) (err error)
type AggregateError ¶
type AggregateError []error
func (AggregateError) Append ¶
func (e AggregateError) Append(errors ...error) AggregateError
noinspection GoAssignmentToReceiver
func (AggregateError) Error ¶
func (e AggregateError) Error() string
type Application ¶
type ApplicationBase ¶
type ApplicationBase struct { Size ServiceSize `json:"size"` Disk uint32 `json:"disk"` Access Access `json:"access"` Relationships StringMap `json:"relationships"` Mounts Mounts `json:"mounts"` Timezone string `json:"timezone"` // TODO: replace with serializable time.Location Variables Variables `json:"variables"` }
type ApplicationBuilder ¶
type ApplicationBuilder struct { ApplicationCore Dependencies JSONObject `json:"dependencies"` Build Build `json:"build"` Source Source `json:"source"` }
type ApplicationCore ¶
type ApplicationCore struct { ApplicationBase Name string `json:"name"` Type string `json:"type"` Runtime interface{} `json:"runtime"` Preflight Preflight `json:"preflight"` }
type ApplicationMount ¶
type ApplicationMount uint8
const ( ApplicationMountLocal ApplicationMount = iota ApplicationMountTemp ApplicationMountService )
func NewApplicationMount ¶
func NewApplicationMount(name string) (ApplicationMount, error)
func (ApplicationMount) MarshalText ¶
func (v ApplicationMount) MarshalText() ([]byte, error)
func (ApplicationMount) String ¶
func (v ApplicationMount) String() string
func (*ApplicationMount) UnmarshalText ¶
func (v *ApplicationMount) UnmarshalText(text []byte) (err error)
type CacheConfiguration ¶
type Caches ¶
type Caches map[string]CacheConfiguration
type ClientCertificateAuthority ¶
type ClientCertificateAuthority struct {
*x509.Certificate
}
func (ClientCertificateAuthority) MarshalText ¶
func (v ClientCertificateAuthority) MarshalText() ([]byte, error)
func (*ClientCertificateAuthority) UnmarshalText ¶
func (v *ClientCertificateAuthority) UnmarshalText(text []byte) error
type Environment ¶
type Environment interface { EnvironmentAPI Prefix() string FileSystem() afero.Fs SetFileSystem(afero.Fs) SetLookupFunc(LookupFunc) Lookup(string) (string, bool) ReadDotEnv() Listener() (net.Listener, error) Variable(key string) (interface{}, bool) }
func NewEnvironment ¶
func NewEnvironment(prefix string) Environment
type EnvironmentAPI ¶
type EnvironmentAPI interface { Application() (*Application, error) ApplicationName() (string, error) AppName() (string, error) AppCommand() (string, error) ApplicationCommand() (string, error) AppDir() (string, error) Branch() (string, error) Dir() (string, error) DocumentRoot() (string, error) Environment() (string, error) Port() (string, error) Project() (string, error) ProjectEntropy() (string, error) Relationships() (Relationships, error) Routes() (Routes, error) SMTPHost() (string, error) Socket() (string, error) TreeID() (string, error) Variables() (JSONObject, error) Vars() (JSONObject, error) XClientCert() (string, error) XClientDN() (string, error) XClientIP() (string, error) XClientSSL() (string, error) XClientVerify() (string, error) }
type HTTPAccess ¶
type JSONObject ¶
type JSONObject = map[string]interface{}
type LookupFunc ¶
type MissingEnvironment ¶
func (MissingEnvironment) Error ¶
func (e MissingEnvironment) Error() string
type Mount ¶
type Mount struct { Source ApplicationMount `json:"source"` SourcePath string `json:"path"` Service string `json:"service,omitempty"` }
type RasterLogo ¶
func NewRasterLogo ¶
func NewRasterLogo() RasterLogo
type RedirectPath ¶
type RedirectPaths ¶
type RedirectPaths map[string]RedirectPath
type Redirects ¶
type Redirects struct { Expires Duration `json:"expires"` Paths RedirectPaths `json:"paths"` }
type Relationship ¶
type Relationship struct { Cluster string `json:"cluster"` Fragment string `json:"fragment"` Host string `json:"host"` Hostname string `json:"hostname"` IP string `json:"ip"` Password string `json:"password"` Path string `json:"path"` Port int `json:"port"` Public bool `json:"public"` Query JSONObject `json:"query"` Rel string `json:"rel"` Scheme string `json:"scheme"` Service string `json:"service"` SSL JSONObject `json:"ssl"` Type string `json:"type"` Username string `json:"username"` }
func (Relationship) URL ¶
func (r Relationship) URL(user, query bool) string
type Relationships ¶
type Relationships map[string][]Relationship
func (Relationships) Postgresql ¶
func (r Relationships) Postgresql(name string) (string, error)
type RenderRasterLogo ¶
type RenderRasterLogo struct { RasterLogo ContentType string }
func (RenderRasterLogo) Render ¶
func (x RenderRasterLogo) Render(w http.ResponseWriter) error
func (RenderRasterLogo) WriteContentType ¶
func (x RenderRasterLogo) WriteContentType(w http.ResponseWriter)
type Route ¶
type Route struct { Primary bool `json:"primary"` ID *string `json:"id"` OriginalURL string `json:"original_url"` Attributes map[string]string `json:"attributes"` Type string `json:"type"` Redirects Redirects `json:"redirects"` TLS TLSSettings `json:"tls"` HTTPAccess HTTPAccess `json:"http_access"` RestrictRobots bool `json:"restrict_robots"` // Upstream Routes Cache Cache `json:"cache"` SSI SSI `json:"ssi"` Upstream string `json:"upstream"` // Redirect Routes To string `json:"to"` }
type RouteIdentification ¶
type RouteRepresentation ¶
type RouteRepresentation struct { Project string `json:"project"` Environment string `json:"environment"` Route RouteIdentification `json:"route"` }
type SVGLogo ¶
func NewLogoSVG ¶
func NewLogoSVG() SVGLogo
func (SVGLogo) WriteContentType ¶
func (x SVGLogo) WriteContentType(w http.ResponseWriter)
type ServiceSize ¶
type ServiceSize uint8
const ( ServiceSizeAuto ServiceSize = iota ServiceSizeSmall ServiceSizeMedium ServiceSizeLarge ServiceSizeExtraLarge ServiceSizeDoubleExtraLarge ServiceSizeQuadrupleExtraLarge )
func NewServiceSize ¶
func NewServiceSize(name string) (ServiceSize, error)
func (ServiceSize) MarshalText ¶
func (v ServiceSize) MarshalText() ([]byte, error)
func (ServiceSize) String ¶
func (v ServiceSize) String() string
func (*ServiceSize) UnmarshalText ¶
func (v *ServiceSize) UnmarshalText(text []byte) (err error)
type SocketFamily ¶
type SocketFamily uint8
const ( SocketFamilyTCP SocketFamily = iota SocketFamilyUnix )
func NewSocketFamily ¶
func NewSocketFamily(name string) (SocketFamily, error)
func (SocketFamily) MarshalText ¶
func (v SocketFamily) MarshalText() ([]byte, error)
func (SocketFamily) String ¶
func (v SocketFamily) String() string
func (*SocketFamily) UnmarshalText ¶
func (v *SocketFamily) UnmarshalText(text []byte) (err error)
type SocketProtocol ¶
type SocketProtocol uint8
const ( SocketProtocolHTTP SocketProtocol = iota SocketProtocolFastCGI SocketProtocolUWSGI )
func NewSocketProtocol ¶
func NewSocketProtocol(name string) (SocketProtocol, error)
func (SocketProtocol) MarshalText ¶
func (v SocketProtocol) MarshalText() ([]byte, error)
func (SocketProtocol) String ¶
func (v SocketProtocol) String() string
func (*SocketProtocol) UnmarshalText ¶
func (v *SocketProtocol) UnmarshalText(text []byte) (err error)
type Source ¶
type Source struct {
Operations SourceOperations `json:"operations"`
}
type SourceOperation ¶
type SourceOperation struct {
Command string `json:"command"`
}
type SourceOperations ¶
type SourceOperations map[string]SourceOperation
type TLSSettings ¶
type TLSSettings struct { StrictTransportSecurity TLSSTS `json:"strict_transport_security"` MinVersion *TLSVersion `json:"min_version"` ClientAuthentication string `json:"client_authentication"` ClientCertificateAuthorities []ClientCertificateAuthority `json:"client_certificate_authorities"` }
type TLSVersion ¶
type TLSVersion uint16
const ( TLSv10 TLSVersion = iota + 0x0301 TLSv11 TLSv12 TLSv13 TLSv14 )
func NewTLSVersion ¶
func NewTLSVersion(name string) (TLSVersion, error)
func (TLSVersion) MarshalText ¶
func (v TLSVersion) MarshalText() ([]byte, error)
func (TLSVersion) String ¶
func (v TLSVersion) String() string
func (*TLSVersion) UnmarshalText ¶
func (v *TLSVersion) UnmarshalText(text []byte) (err error)
type Upstream ¶
type Upstream struct { SocketFamily SocketFamily `json:"socket_family"` Protocol SocketProtocol `json:"socket_protocol"` }
type Variables ¶
type Variables map[string]JSONObject
type Web ¶
type Web struct { // ApplicationBase Locations WebLocations `json:"locations"` Commands Commands `json:"commands"` Upstream Upstream `json:"upstream"` DocumentRoot *string `json:"document_root,omitempty"` // deprecated Passthru *string `json:"passthru,omitempty"` // deprecated IndexFiles []string `json:"index_files,omitempty"` // deprecated Whitelist []string `json:"whitelist,omitempty"` // deprecated Blacklist []string `json:"blacklist,omitempty"` // deprecated Expires *Duration `json:"expires,omitempty"` // deprecated MoveToRoot *bool `json:"move_to_root,omitempty"` // deprecated }
type WebLocation ¶
type WebLocations ¶
type WebLocations map[string]WebLocation
Click to show internal directories.
Click to hide internal directories.