Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
HTTP struct {
Host string `json:"host"`
} `json:"http"`
App struct {
Name string `json:"name"`
APIKey string `json:"api_key"`
MasterKey string `json:"master_key"`
AccessControl string `json:"access_control"`
DevMode bool `json:"dev_mode"`
CORSHost string `json:"cors_host"`
Slave bool `json:"slave"`
} `json:"app"`
DB struct {
ImplName string `json:"implementation"`
Option string `json:"option"`
} `json:"database"`
TokenStore struct {
ImplName string `json:"implementation"`
Path string `json:"path"`
Prefix string `json:"prefix"`
Expiry int64 `json:"expiry"`
Secret string `json:"secret"`
} `json:"-"`
AssetStore struct {
ImplName string `json:"implementation"`
Public bool `json:"public"`
// followings only used when ImplName = fs
Path string `json:"-"`
// followings only used when ImplName = s3
AccessToken string `json:"access_key"`
SecretToken string `json:"secret_key"`
Region string `json:"region"`
Bucket string `json:"bucket"`
// followings only used when ImplName = cloud
CloudAssetHost string `json:"cloud_asset_host"`
CloudAssetToken string `json:"cloud_asset_token"`
CloudAssetPublicPrefix string `json:"cloud_asset_public_prefix"`
CloudAssetPrivatePrefix string `json:"cloud_asset_private_prefix"`
} `json:"asset_store"`
AssetURLSigner struct {
URLPrefix string `json:"url_prefix"`
Secret string `json:"secret"`
} `json:"asset_signer"`
APNS struct {
Enable bool `json:"enable"`
Env string `json:"env"`
Cert string `json:"cert"`
Key string `json:"key"`
CertPath string `json:"-"`
KeyPath string `json:"-"`
} `json:"apns"`
GCM struct {
Enable bool `json:"enable"`
APIKey string `json:"api_key"`
} `json:"gcm"`
LOG struct {
Level string `json:"-"`
LoggersLevel map[string]string `json:"-"`
} `json:"log"`
LogHook struct {
SentryDSN string
SentryLevel string
} `json:"-"`
Plugin map[string]*PluginConfig `json:"-"`
}
Configuration is Skygear's configuration The configuration will load in following order: 1. The ENV 2. The key/value in .env file 3. The config in *.ini (To-be depreacted)
func NewConfiguration ¶
func NewConfiguration() Configuration
func NewConfigurationWithKeys ¶
func NewConfigurationWithKeys() Configuration
func (*Configuration) ReadFromEnv ¶
func (config *Configuration) ReadFromEnv()
func (*Configuration) Validate ¶
func (config *Configuration) Validate() error
type PluginConfig ¶
Click to show internal directories.
Click to hide internal directories.