Documentation
¶
Overview ¶
pshgo provides strongly typed models for the Platform.sh environment
Index ¶
- func GetAppCommand(p PlatformProvider) string
- func GetAppDir(p PlatformProvider) string
- func GetAppName(p PlatformProvider) string
- func GetApplicationCommand(p PlatformProvider) string
- func GetApplicationName(p PlatformProvider) string
- func GetBranch(p PlatformProvider) string
- func GetDir(p PlatformProvider) string
- func GetDocumentRoot(p PlatformProvider) string
- func GetEnvironment(p PlatformProvider) string
- func GetPort(p PlatformProvider) string
- func GetProject(p PlatformProvider) string
- func GetProjectEntropy(p PlatformProvider) string
- func GetSMTPHost(p PlatformProvider) string
- func GetSocket(p PlatformProvider) string
- func GetTreeID(p PlatformProvider) string
- func GetXClientCert(p PlatformProvider) string
- func GetXClientDN(p PlatformProvider) string
- func GetXClientIP(p PlatformProvider) string
- func GetXClientVerify(p PlatformProvider) string
- func LookupAppCommand(p PlatformProvider) (string, bool)
- func LookupAppDir(p PlatformProvider) (string, bool)
- func LookupAppName(p PlatformProvider) (string, bool)
- func LookupApplicationCommand(p PlatformProvider) (string, bool)
- func LookupApplicationName(p PlatformProvider) (string, bool)
- func LookupBranch(p PlatformProvider) (string, bool)
- func LookupDir(p PlatformProvider) (string, bool)
- func LookupDocumentRoot(p PlatformProvider) (string, bool)
- func LookupEnvironment(p PlatformProvider) (string, bool)
- func LookupPort(p PlatformProvider) (string, bool)
- func LookupProject(p PlatformProvider) (string, bool)
- func LookupProjectEntropy(p PlatformProvider) (string, bool)
- func LookupSMTPHost(p PlatformProvider) (string, bool)
- func LookupSocket(p PlatformProvider) (string, bool)
- func LookupTreeID(p PlatformProvider) (string, bool)
- func LookupXClientCert(p PlatformProvider) (string, bool)
- func LookupXClientDN(p PlatformProvider) (string, bool)
- func LookupXClientIP(p PlatformProvider) (string, bool)
- func LookupXClientVerify(p PlatformProvider) (string, bool)
- type Access
- type AccessLevel
- type AccessType
- type Application
- type ApplicationBase
- type ApplicationBuilder
- type ApplicationCore
- type ApplicationMount
- type Build
- type Cache
- type CacheConfiguration
- type Caches
- type Certificate
- type Commands
- type Cron
- type Crons
- type Duration
- type Environment
- func (e *Environment) Environ() []string
- func (e *Environment) GetAppCommand() string
- func (e *Environment) GetAppDir() string
- func (e *Environment) GetAppName() string
- func (e *Environment) GetApplication() *Application
- func (e *Environment) GetApplicationCommand() string
- func (e *Environment) GetApplicationName() string
- func (e *Environment) GetBranch() string
- func (e *Environment) GetDir() string
- func (e *Environment) GetDocumentRoot() string
- func (e *Environment) GetEnv(key string) string
- func (e *Environment) GetEnvironment() string
- func (e *Environment) GetPort() string
- func (e *Environment) GetProject() string
- func (e *Environment) GetProjectEntropy() string
- func (e *Environment) GetRelationships() Relationships
- func (e *Environment) GetRoutes() Routes
- func (e *Environment) GetSMTPHost() string
- func (e *Environment) GetSocket() string
- func (e *Environment) GetTreeID() string
- func (e *Environment) GetVariables() Variables
- func (e *Environment) GetVars() Variables
- func (e *Environment) GetXClientCert() string
- func (e *Environment) GetXClientDN() string
- func (e *Environment) GetXClientIP() string
- func (e *Environment) GetXClientVerify() string
- func (e *Environment) Listener() (net.Listener, error)
- func (e *Environment) Lookup(key string) (string, bool)
- func (e *Environment) LookupAppCommand() (string, bool)
- func (e *Environment) LookupAppDir() (string, bool)
- func (e *Environment) LookupAppName() (string, bool)
- func (e *Environment) LookupApplication() (*Application, bool)
- func (e *Environment) LookupApplicationCommand() (string, bool)
- func (e *Environment) LookupApplicationName() (string, bool)
- func (e *Environment) LookupBranch() (string, bool)
- func (e *Environment) LookupDir() (string, bool)
- func (e *Environment) LookupDocumentRoot() (string, bool)
- func (e *Environment) LookupEnvironment() (string, bool)
- func (e *Environment) LookupPort() (string, bool)
- func (e *Environment) LookupProject() (string, bool)
- func (e *Environment) LookupProjectEntropy() (string, bool)
- func (e *Environment) LookupRelationships() (Relationships, bool)
- func (e *Environment) LookupRoutes() (Routes, bool)
- func (e *Environment) LookupSMTPHost() (string, bool)
- func (e *Environment) LookupSocket() (string, bool)
- func (e *Environment) LookupTreeID() (string, bool)
- func (e *Environment) LookupVariables() (Variables, bool)
- func (e *Environment) LookupVars() (Variables, bool)
- func (e *Environment) LookupXClientCert() (string, bool)
- func (e *Environment) LookupXClientDN() (string, bool)
- func (e *Environment) LookupXClientIP() (string, bool)
- func (e *Environment) LookupXClientVerify() (string, bool)
- func (e *Environment) Prefix() string
- func (e *Environment) SetEnv(key, value string) error
- func (e *Environment) SetProvider(p Provider)
- func (e *Environment) UnsetEnv(key string) error
- func (e *Environment) Variable(key string) (interface{}, bool)
- type HTTPAccess
- type Hooks
- type JSONArray
- type JSONObject
- type LayeredProvider
- func (lp LayeredProvider) Environ() []string
- func (lp LayeredProvider) First(fn ProviderFunctor) error
- func (lp LayeredProvider) ForEach(fn ProviderFunctor) error
- func (lp LayeredProvider) GetEnv(key string) string
- func (lp LayeredProvider) Lookup(key string) (rv string, ok bool)
- func (lp *LayeredProvider) Pop() Provider
- func (lp *LayeredProvider) Push(p Provider)
- func (lp LayeredProvider) SetEnv(key, value string) error
- func (lp LayeredProvider) UnsetEnv(key string) error
- type MapProvider
- type Mount
- type Mounts
- type OSProvider
- type Passthru
- type PlatformProvider
- type Preflight
- type Provider
- type ProviderFunctor
- type RedirectPath
- type RedirectPaths
- type Redirects
- type Relationship
- type Relationships
- type Route
- type RouteIdentification
- type RouteRepresentation
- type Routes
- type SSI
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAppCommand ¶
func GetAppCommand(p PlatformProvider) string
func GetAppDir ¶
func GetAppDir(p PlatformProvider) string
func GetAppName ¶
func GetAppName(p PlatformProvider) string
func GetApplicationCommand ¶
func GetApplicationCommand(p PlatformProvider) string
func GetApplicationName ¶
func GetApplicationName(p PlatformProvider) string
func GetBranch ¶
func GetBranch(p PlatformProvider) string
func GetDir ¶
func GetDir(p PlatformProvider) string
func GetDocumentRoot ¶
func GetDocumentRoot(p PlatformProvider) string
func GetEnvironment ¶
func GetEnvironment(p PlatformProvider) string
func GetPort ¶
func GetPort(p PlatformProvider) string
func GetProject ¶
func GetProject(p PlatformProvider) string
func GetProjectEntropy ¶
func GetProjectEntropy(p PlatformProvider) string
func GetSMTPHost ¶
func GetSMTPHost(p PlatformProvider) string
func GetSocket ¶
func GetSocket(p PlatformProvider) string
func GetTreeID ¶
func GetTreeID(p PlatformProvider) string
func GetXClientCert ¶
func GetXClientCert(p PlatformProvider) string
func GetXClientDN ¶
func GetXClientDN(p PlatformProvider) string
func GetXClientIP ¶
func GetXClientIP(p PlatformProvider) string
func GetXClientVerify ¶
func GetXClientVerify(p PlatformProvider) string
func LookupAppCommand ¶
func LookupAppCommand(p PlatformProvider) (string, bool)
func LookupAppDir ¶
func LookupAppDir(p PlatformProvider) (string, bool)
func LookupAppName ¶
func LookupAppName(p PlatformProvider) (string, bool)
func LookupApplicationCommand ¶
func LookupApplicationCommand(p PlatformProvider) (string, bool)
func LookupApplicationName ¶
func LookupApplicationName(p PlatformProvider) (string, bool)
func LookupBranch ¶
func LookupBranch(p PlatformProvider) (string, bool)
func LookupDir ¶
func LookupDir(p PlatformProvider) (string, bool)
func LookupDocumentRoot ¶
func LookupDocumentRoot(p PlatformProvider) (string, bool)
func LookupEnvironment ¶
func LookupEnvironment(p PlatformProvider) (string, bool)
func LookupPort ¶
func LookupPort(p PlatformProvider) (string, bool)
func LookupProject ¶
func LookupProject(p PlatformProvider) (string, bool)
func LookupProjectEntropy ¶
func LookupProjectEntropy(p PlatformProvider) (string, bool)
func LookupSMTPHost ¶
func LookupSMTPHost(p PlatformProvider) (string, bool)
func LookupSocket ¶
func LookupSocket(p PlatformProvider) (string, bool)
func LookupTreeID ¶
func LookupTreeID(p PlatformProvider) (string, bool)
func LookupXClientCert ¶
func LookupXClientCert(p PlatformProvider) (string, bool)
func LookupXClientDN ¶
func LookupXClientDN(p PlatformProvider) (string, bool)
func LookupXClientIP ¶
func LookupXClientIP(p PlatformProvider) (string, bool)
func LookupXClientVerify ¶
func LookupXClientVerify(p PlatformProvider) (string, bool)
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 Application ¶
type Application struct { ApplicationCore Web Web `json:"web"` Hooks Hooks `json:"hooks"` Crons Crons `json:"crons"` Workers Workers `json:"workers"` TreeID string `json:"tree_id"` SlugID string `json:"slug_id"` AppDir string `json:"app_dir"` }
func GetApplication ¶
func GetApplication(p PlatformProvider) *Application
func LookupApplication ¶
func LookupApplication(p PlatformProvider) (*Application, bool)
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 Certificate ¶
type Certificate struct {
*x509.Certificate
}
func (Certificate) MarshalText ¶
func (v Certificate) MarshalText() ([]byte, error)
func (*Certificate) UnmarshalText ¶
func (v *Certificate) UnmarshalText(text []byte) error
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment(prefix string) *Environment
func NewEnvironmentWithProvider ¶
func NewEnvironmentWithProvider(prefix string, p Provider) *Environment
func (*Environment) Environ ¶
func (e *Environment) Environ() []string
func (*Environment) GetAppCommand ¶
func (e *Environment) GetAppCommand() string
func (*Environment) GetAppDir ¶
func (e *Environment) GetAppDir() string
func (*Environment) GetAppName ¶
func (e *Environment) GetAppName() string
func (*Environment) GetApplication ¶
func (e *Environment) GetApplication() *Application
func (*Environment) GetApplicationCommand ¶
func (e *Environment) GetApplicationCommand() string
func (*Environment) GetApplicationName ¶
func (e *Environment) GetApplicationName() string
func (*Environment) GetBranch ¶
func (e *Environment) GetBranch() string
func (*Environment) GetDir ¶
func (e *Environment) GetDir() string
func (*Environment) GetDocumentRoot ¶
func (e *Environment) GetDocumentRoot() string
func (*Environment) GetEnv ¶
func (e *Environment) GetEnv(key string) string
func (*Environment) GetEnvironment ¶
func (e *Environment) GetEnvironment() string
func (*Environment) GetPort ¶
func (e *Environment) GetPort() string
func (*Environment) GetProject ¶
func (e *Environment) GetProject() string
func (*Environment) GetProjectEntropy ¶
func (e *Environment) GetProjectEntropy() string
func (*Environment) GetRelationships ¶
func (e *Environment) GetRelationships() Relationships
func (*Environment) GetRoutes ¶
func (e *Environment) GetRoutes() Routes
func (*Environment) GetSMTPHost ¶
func (e *Environment) GetSMTPHost() string
func (*Environment) GetSocket ¶
func (e *Environment) GetSocket() string
func (*Environment) GetTreeID ¶
func (e *Environment) GetTreeID() string
func (*Environment) GetVariables ¶
func (e *Environment) GetVariables() Variables
func (*Environment) GetVars ¶
func (e *Environment) GetVars() Variables
func (*Environment) GetXClientCert ¶
func (e *Environment) GetXClientCert() string
func (*Environment) GetXClientDN ¶
func (e *Environment) GetXClientDN() string
func (*Environment) GetXClientIP ¶
func (e *Environment) GetXClientIP() string
func (*Environment) GetXClientVerify ¶
func (e *Environment) GetXClientVerify() string
func (*Environment) LookupAppCommand ¶
func (e *Environment) LookupAppCommand() (string, bool)
func (*Environment) LookupAppDir ¶
func (e *Environment) LookupAppDir() (string, bool)
func (*Environment) LookupAppName ¶
func (e *Environment) LookupAppName() (string, bool)
func (*Environment) LookupApplication ¶
func (e *Environment) LookupApplication() (*Application, bool)
func (*Environment) LookupApplicationCommand ¶
func (e *Environment) LookupApplicationCommand() (string, bool)
func (*Environment) LookupApplicationName ¶
func (e *Environment) LookupApplicationName() (string, bool)
func (*Environment) LookupBranch ¶
func (e *Environment) LookupBranch() (string, bool)
func (*Environment) LookupDir ¶
func (e *Environment) LookupDir() (string, bool)
func (*Environment) LookupDocumentRoot ¶
func (e *Environment) LookupDocumentRoot() (string, bool)
func (*Environment) LookupEnvironment ¶
func (e *Environment) LookupEnvironment() (string, bool)
func (*Environment) LookupPort ¶
func (e *Environment) LookupPort() (string, bool)
func (*Environment) LookupProject ¶
func (e *Environment) LookupProject() (string, bool)
func (*Environment) LookupProjectEntropy ¶
func (e *Environment) LookupProjectEntropy() (string, bool)
func (*Environment) LookupRelationships ¶
func (e *Environment) LookupRelationships() (Relationships, bool)
func (*Environment) LookupRoutes ¶
func (e *Environment) LookupRoutes() (Routes, bool)
func (*Environment) LookupSMTPHost ¶
func (e *Environment) LookupSMTPHost() (string, bool)
func (*Environment) LookupSocket ¶
func (e *Environment) LookupSocket() (string, bool)
func (*Environment) LookupTreeID ¶
func (e *Environment) LookupTreeID() (string, bool)
func (*Environment) LookupVariables ¶
func (e *Environment) LookupVariables() (Variables, bool)
func (*Environment) LookupVars ¶
func (e *Environment) LookupVars() (Variables, bool)
func (*Environment) LookupXClientCert ¶
func (e *Environment) LookupXClientCert() (string, bool)
func (*Environment) LookupXClientDN ¶
func (e *Environment) LookupXClientDN() (string, bool)
func (*Environment) LookupXClientIP ¶
func (e *Environment) LookupXClientIP() (string, bool)
func (*Environment) LookupXClientVerify ¶
func (e *Environment) LookupXClientVerify() (string, bool)
func (*Environment) Prefix ¶
func (e *Environment) Prefix() string
func (*Environment) SetEnv ¶
func (e *Environment) SetEnv(key, value string) error
func (*Environment) SetProvider ¶
func (e *Environment) SetProvider(p Provider)
func (*Environment) UnsetEnv ¶
func (e *Environment) UnsetEnv(key string) error
func (*Environment) Variable ¶
func (e *Environment) Variable(key string) (interface{}, bool)
type HTTPAccess ¶
type JSONObject ¶
type JSONObject = map[string]interface{}
type LayeredProvider ¶
type LayeredProvider []Provider
func (LayeredProvider) Environ ¶
func (lp LayeredProvider) Environ() []string
func (LayeredProvider) First ¶
func (lp LayeredProvider) First(fn ProviderFunctor) error
func (LayeredProvider) ForEach ¶
func (lp LayeredProvider) ForEach(fn ProviderFunctor) error
func (LayeredProvider) GetEnv ¶
func (lp LayeredProvider) GetEnv(key string) string
func (*LayeredProvider) Pop ¶
func (lp *LayeredProvider) Pop() Provider
func (*LayeredProvider) Push ¶
func (lp *LayeredProvider) Push(p Provider)
func (LayeredProvider) SetEnv ¶
func (lp LayeredProvider) SetEnv(key, value string) error
func (LayeredProvider) UnsetEnv ¶
func (lp LayeredProvider) UnsetEnv(key string) error
type MapProvider ¶
func ParseEnviron ¶
func ParseEnviron(s []string) (MapProvider, error)
func ReadEnviron ¶
func ReadEnviron(r io.Reader) (MapProvider, error)
func (MapProvider) Environ ¶
func (p MapProvider) Environ() []string
func (MapProvider) GetEnv ¶
func (p MapProvider) GetEnv(key string) string
func (MapProvider) SetEnv ¶
func (p MapProvider) SetEnv(key, value string) error
func (MapProvider) UnsetEnv ¶
func (p MapProvider) UnsetEnv(key string) error
type Mount ¶
type Mount struct { Source ApplicationMount `json:"source"` SourcePath string `json:"path"` Service string `json:"service,omitempty"` }
type OSProvider ¶
type OSProvider struct{}
func (OSProvider) Environ ¶
func (OSProvider) Environ() []string
func (OSProvider) GetEnv ¶
func (OSProvider) GetEnv(key string) string
func (OSProvider) SetEnv ¶
func (OSProvider) SetEnv(key, value string) error
func (OSProvider) UnsetEnv ¶
func (OSProvider) UnsetEnv(key string) error
type PlatformProvider ¶
type Provider ¶
type Provider interface { Lookup(key string) (string, bool) Environ() []string SetEnv(key, value string) error UnsetEnv(key string) error GetEnv(key string) string }
var (
DefaultProvider Provider = OSProvider{}
)
func CloneProvider ¶
type ProviderFunctor ¶
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 GetRelationships ¶
func GetRelationships(p PlatformProvider) Relationships
func LookupRelationships ¶
func LookupRelationships(p PlatformProvider) (Relationships, bool)
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 Routes ¶
func GetRoutes ¶
func GetRoutes(p PlatformProvider) Routes
func LookupRoutes ¶
func LookupRoutes(p PlatformProvider) (Routes, bool)
func (Routes) MarshalJSON ¶
func (*Routes) UnmarshalJSON ¶
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 []Certificate `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 JSONObject
func GetVariables ¶
func GetVariables(p PlatformProvider) Variables
func GetVars ¶
func GetVars(p PlatformProvider) Variables
func LookupVariables ¶
func LookupVariables(p PlatformProvider) (Variables, bool)
func LookupVars ¶
func LookupVars(p PlatformProvider) (Variables, bool)
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.