g

package
v3.14.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2017 License: Apache-2.0 Imports: 6 Imported by: 39

Documentation

Index

Constants

View Source
const (
	VERSION = "0.0.5"
)

Variables

View Source
var (
	ConfigFile string
)

Functions

func ParseConfig

func ParseConfig(cfg string) error

Types

type ApiConfig

type ApiConfig struct {
	Key      string `json:"key"`
	Redirect string `json:"redirect"`
	Login    string `json:"login"`
	Access   string `json:"access"`
	Role     string `json:"role"`
	Logout   string `json:"logout"`
	Name     string `json:"name"`
	Token    string `json:"token"`
	Map      string `json:"map"`
	Contact  string `json:"contact"`
}

type BossConfig

type BossConfig struct {
	Addr    string `json:"addr"`
	Idle    int    `json:"idle"`
	Max     int    `json:"max"`
	ShowAll bool   `json:"show_all"`
}

type CacheConfig

type CacheConfig struct {
	Enabled bool           `json:"enabled"`
	Redis   string         `json:"redis"`
	Idle    int            `json:"idle"`
	Max     int            `json:"max"`
	Timeout *TimeoutConfig `json:"timeout"`
}

type FalconPortalConfig

type FalconPortalConfig struct {
	Addr  string `json:"addr"`
	Idle  int    `json:"idle"`
	Max   int    `json:"max"`
	Limit int    `json:"limit"`
}

type GlobalConfig

type GlobalConfig struct {
	Log          string              `json:"log"`
	Company      string              `json:"company"`
	Cache        *CacheConfig        `json:"cache"`
	Http         *HttpConfig         `json:"http"`
	Salt         string              `json:"salt"`
	CanRegister  bool                `json:"canRegister"`
	Ldap         *LdapConfig         `json:"ldap"`
	Uic          *UicConfig          `json:"uic"`
	GraphDB      *GraphDBConfig      `json:"graphdb"`
	BossDB       *BossConfig         `json:"boss"`
	FalconPortal *FalconPortalConfig `json:"falcon_portal"`
	Shortcut     *ShortcutConfig     `json:"shortcut"`
	Api          *ApiConfig          `json:"api"`
	Graph        *GraphConfig        `json:"graph"`
	Grpc         *GrpcConfig         `json:"grpc"`
	Mq           *MqConfig           `json:"mq"`
}

func Config

func Config() *GlobalConfig

type GraphConfig

type GraphConfig struct {
	ConnTimeout int32             `json:"connTimeout"`
	CallTimeout int32             `json:"callTimeout"`
	MaxConns    int32             `json:"maxConns"`
	MaxIdle     int32             `json:"maxIdle"`
	Replicas    int32             `json:"replicas"`
	Cluster     map[string]string `json:"cluster"`
}

type GraphDBConfig

type GraphDBConfig struct {
	Addr           string `json:"addr"`
	Idle           int    `json:"idle"`
	Max            int    `json:"max"`
	Limit          int    `json:"limit"`
	LimitHostGroup int    `json:"limitHostGroup"`
}

type GrpcConfig

type GrpcConfig struct {
	Enabled bool `json:"enabled"`
	Port    int  `json:"port"`
}

type HttpConfig

type HttpConfig struct {
	Enabled    bool   `json:"enabled"`
	Listen     string `json:"listen"`
	Cookie     string `json:"cookie"`
	ViewPath   string `json:"view_path"`
	StaticPath string `json:"static_path"`
}

type LdapConfig

type LdapConfig struct {
	Enabled    bool     `json:"enabled"`
	Addr       string   `json:"addr"`
	BindDN     string   `json:"bindDN"`
	BaseDN     string   `json:"baseDN"`
	BindPasswd string   `json:"bindPasswd"`
	UserField  string   `json:"userField"`
	Attributes []string `json:"attributes"`
}

type MqConfig

type MqConfig struct {
	Enabled  bool   `json:"enabled"`
	Queue    string `json:"queue"`
	Consumer string `json:"consumer"`
}

type ShortcutConfig

type ShortcutConfig struct {
	FalconPortal     string `json:"falconPortal"`
	FalconDashboard  string `json:"falconDashboard"`
	GrafanaDashboard string `json:"grafanaDashboard"`
	FalconAlarm      string `json:"falconAlarm"`
}

type TimeoutConfig

type TimeoutConfig struct {
	Conn  int64 `json:"conn"`
	Read  int64 `json:"read"`
	Write int64 `json:"write"`
}

type UicConfig

type UicConfig struct {
	Addr string `json:"addr"`
	Idle int    `json:"idle"`
	Max  int    `json:"max"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL