Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = &Config{ Database: DatabaseConfig{ Type: "mysql", Host: "localhost", Port: 3306, User: "root", Password: "root", DatabaseName: "gravitee", MaxIdleConns: 5, MaxOpenConns: 5, }, Oauth: OauthConfig{ AccessTokenLifetime: 3600, RefreshTokenLifetime: 1209600, AuthCodeLifetime: 3600, }, Session: SessionConfig{ Secret: "test_secret", Path: "/", MaxAge: 86400 * 7, HttpOnly: true, }, IsDevelop: true, }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Database DatabaseConfig Oauth OauthConfig Session SessionConfig ServerPort int `default:"8080"` IsDevelop bool `default:"True"` }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
type DatabaseConfig ¶
type OauthConfig ¶
type SessionConfig ¶
type SessionConfig struct { Secret string `default:"test_secret"` Path string `default:"/"` // MaxAge=0 means no 'Max-Age' attribute specified. // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'. // MaxAge>0 means Max-Age attribute present and given in seconds. MaxAge int `default:"604800"` // When you tag a cookie with the HttpOnly flag, it tells the browser that // this particular cookie should only be accessed by the server. // Any attempt to access the cookie from client script is strictly forbidden. HttpOnly bool `default:"True"` }
Click to show internal directories.
Click to hide internal directories.