Documentation
¶
Index ¶
- Constants
- Variables
- type AuthConfiguration
- type ConfigProvider
- type Configuration
- type Credential
- type CredentialProvider
- type DatabaseConfiguration
- type FSNames
- type ForeignSystemConfiguration
- type ForeignSystemType
- type ForeignSystemTypes
- type Mode
- type Providers
- type SMTPConfiguration
- type SetupConfiguration
- type WebServerConfiguration
Constants ¶
View Source
const (
CredentialPrefix = "CREDENTIAL:"
)
Variables ¶
View Source
var ( WellKnownAuthProviderIDs = FSNames{"GOOGLE"} WellKnownSMTPProviderIDs = FSNames{"SENDGRID"} )
View Source
var ValidForeignSystemTypes = ForeignSystemTypes{ ForeignSystemTypeAuth, ForeignSystemTypeSMTP, }
Functions ¶
This section is empty.
Types ¶
type AuthConfiguration ¶
type ConfigProvider ¶
type ConfigProvider interface {
Get() Configuration
Set(config Configuration)
}
type Configuration ¶
type Configuration struct {
WebServer WebServerConfiguration `json:"webServer"`
Setup SetupConfiguration `json:"setup"`
Database DatabaseConfiguration `json:"database"`
FS ForeignSystemConfiguration `json:"fs"`
Prod bool `json:"prod"`
}
type Credential ¶
type Credential struct {
Name string `json:"name"`
Type ForeignSystemType `json:"type"`
ID string `json:"id"`
Secret string `json:"-"`
CreatedBy store.Identity `json:"createdBy"`
CreatedDate time.Time `json:"createdDate"`
}
func (Credential) Key ¶
func (c Credential) Key() []byte
func (Credential) Prefix ¶
func (c Credential) Prefix() []byte
type CredentialProvider ¶
type CredentialProvider interface {
Get(name string, fsType ForeignSystemType) (Credential, error)
Set(cred Credential) error
AllOf(fsType ForeignSystemType) ([]Credential, error)
Delete(name string, fsType ForeignSystemType) error
}
type DatabaseConfiguration ¶
type ForeignSystemConfiguration ¶
type ForeignSystemConfiguration struct {
Auth AuthConfiguration `json:"auth"`
SMTP SMTPConfiguration `json:"smtp"`
}
type ForeignSystemType ¶
type ForeignSystemType string
const ( ForeignSystemTypeAuth ForeignSystemType = "AUTH" ForeignSystemTypeSMTP ForeignSystemType = "SMTP" )
func (ForeignSystemType) Bytes ¶
func (t ForeignSystemType) Bytes() []byte
type ForeignSystemTypes ¶
type ForeignSystemTypes []ForeignSystemType
func (ForeignSystemTypes) Includes ¶
func (t ForeignSystemTypes) Includes(fsType ForeignSystemType) bool
type Providers ¶
type Providers struct {
ConfigProvider
Credential CredentialProvider
}
type SMTPConfiguration ¶
type SMTPConfiguration struct {
SendGrid *Credential `json:"sendGrid,omitempty"`
}
type SetupConfiguration ¶
type WebServerConfiguration ¶
type WebServerConfiguration struct {
Protocol string `json:"protocol"`
Host string `json:"host"`
Port string `json:"port"`
UIProxyPort string `json:"uiProxyPort"`
ContentRoot string `json:"contentRoot"`
Status404HandlerName string `json:"status404HandlerName"`
}
func (WebServerConfiguration) HomePage ¶
func (ws WebServerConfiguration) HomePage() string
Click to show internal directories.
Click to hide internal directories.