gorush: github.com/appleboy/gorush/config Index | Files

package config

import "github.com/appleboy/gorush/config"

Index

Package Files

config.go

type ConfYaml Uses

type ConfYaml struct {
    Core    SectionCore    `yaml:"core"`
    API     SectionAPI     `yaml:"api"`
    Android SectionAndroid `yaml:"android"`
    Ios     SectionIos     `yaml:"ios"`
    Log     SectionLog     `yaml:"log"`
    Stat    SectionStat    `yaml:"stat"`
    GRPC    SectionGRPC    `yaml:"grpc"`
}

ConfYaml is config structure.

func LoadConf Uses

func LoadConf(confPath string) (ConfYaml, error)

LoadConf load config from file and read in environment variables that match

type SectionAPI Uses

type SectionAPI struct {
    PushURI    string `yaml:"push_uri"`
    StatGoURI  string `yaml:"stat_go_uri"`
    StatAppURI string `yaml:"stat_app_uri"`
    ConfigURI  string `yaml:"config_uri"`
    SysStatURI string `yaml:"sys_stat_uri"`
    MetricURI  string `yaml:"metric_uri"`
    HealthURI  string `yaml:"health_uri"`
}

SectionAPI is sub section of config.

type SectionAndroid Uses

type SectionAndroid struct {
    Enabled  bool   `yaml:"enabled"`
    APIKey   string `yaml:"apikey"`
    MaxRetry int    `yaml:"max_retry"`
}

SectionAndroid is sub section of config.

type SectionAutoTLS Uses

type SectionAutoTLS struct {
    Enabled bool   `yaml:"enabled"`
    Folder  string `yaml:"folder"`
    Host    string `yaml:"host"`
}

SectionAutoTLS support Let's Encrypt setting.

type SectionBoltDB Uses

type SectionBoltDB struct {
    Path   string `yaml:"path"`
    Bucket string `yaml:"bucket"`
}

SectionBoltDB is sub section of config.

type SectionBuntDB Uses

type SectionBuntDB struct {
    Path string `yaml:"path"`
}

SectionBuntDB is sub section of config.

type SectionCore Uses

type SectionCore struct {
    Enabled         bool           `yaml:"enabled"`
    Address         string         `yaml:"address"`
    Port            string         `yaml:"port"`
    MaxNotification int64          `yaml:"max_notification"`
    WorkerNum       int64          `yaml:"worker_num"`
    QueueNum        int64          `yaml:"queue_num"`
    Mode            string         `yaml:"mode"`
    Sync            bool           `yaml:"sync"`
    SSL             bool           `yaml:"ssl"`
    CertPath        string         `yaml:"cert_path"`
    KeyPath         string         `yaml:"key_path"`
    CertBase64      string         `yaml:"cert_base64"`
    KeyBase64       string         `yaml:"key_base64"`
    HTTPProxy       string         `yaml:"http_proxy"`
    PID             SectionPID     `yaml:"pid"`
    AutoTLS         SectionAutoTLS `yaml:"auto_tls"`
}

SectionCore is sub section of config.

type SectionGRPC Uses

type SectionGRPC struct {
    Enabled bool   `yaml:"enabled"`
    Port    string `yaml:"port"`
}

SectionGRPC is sub section of config.

type SectionIos Uses

type SectionIos struct {
    Enabled    bool   `yaml:"enabled"`
    KeyPath    string `yaml:"key_path"`
    KeyBase64  string `yaml:"key_base64"`
    KeyType    string `yaml:"key_type"`
    Password   string `yaml:"password"`
    Production bool   `yaml:"production"`
    MaxRetry   int    `yaml:"max_retry"`
    KeyID      string `yaml:"key_id"`
    TeamID     string `yaml:"team_id"`
}

SectionIos is sub section of config.

type SectionLevelDB Uses

type SectionLevelDB struct {
    Path string `yaml:"path"`
}

SectionLevelDB is sub section of config.

type SectionLog Uses

type SectionLog struct {
    Format      string `yaml:"format"`
    AccessLog   string `yaml:"access_log"`
    AccessLevel string `yaml:"access_level"`
    ErrorLog    string `yaml:"error_log"`
    ErrorLevel  string `yaml:"error_level"`
    HideToken   bool   `yaml:"hide_token"`
}

SectionLog is sub section of config.

type SectionPID Uses

type SectionPID struct {
    Enabled  bool   `yaml:"enabled"`
    Path     string `yaml:"path"`
    Override bool   `yaml:"override"`
}

SectionPID is sub section of config.

type SectionRedis Uses

type SectionRedis struct {
    Addr     string `yaml:"addr"`
    Password string `yaml:"password"`
    DB       int    `yaml:"db"`
}

SectionRedis is sub section of config.

type SectionStat Uses

type SectionStat struct {
    Engine  string         `yaml:"engine"`
    Redis   SectionRedis   `yaml:"redis"`
    BoltDB  SectionBoltDB  `yaml:"boltdb"`
    BuntDB  SectionBuntDB  `yaml:"buntdb"`
    LevelDB SectionLevelDB `yaml:"leveldb"`
}

SectionStat is sub section of config.

Package config imports 6 packages (graph) and is imported by 47 packages. Updated 2019-04-06. Refresh now. Tools for package owners.