Documentation ¶
Index ¶
- Constants
- Variables
- func NewError(message string) func() *Error
- type Configuration
- type ContextKey
- type Error
- func (self *Error) As(err error) *Error
- func (self *Error) AsWithDepth(depth int, err error) *Error
- func (self Error) Error() string
- func (self Error) Is(err error) bool
- func (self Error) Unwrap() error
- func (self *Error) With(message string) *Error
- func (self *Error) Wrap(err error) *Error
- func (self *Error) WrapWithDepth(depth int, err error) *Error
- type Exception
Constants ¶
View Source
const ( ASSETS_PATH = "./assets" FILES_PATH = ASSETS_PATH + "/files" IMAGES_PATH = ASSETS_PATH + "/images" SCRIPTS_PATH = ASSETS_PATH + "/scripts" STYLES_PATH = ASSETS_PATH + "/styles" MIGRATIONS_PATH = "./migrations" TEMPLATES_PATH = "./templates" )
Variables ¶
View Source
var ( // ExcServerGeneric generic server exception. ExcServerGeneric = NewException(http.StatusInternalServerError, "ERR_SERVER_GENERIC") ExcServerUnavailable = NewException(http.StatusServiceUnavailable, "ERR_SERVER_UNAVAILABLE") // ExcRequestTimeout request timeout exception. ExcRequestTimeout = NewException(http.StatusRequestTimeout, "ERR_REQUEST_TIMEOUT") // ExcClientGeneric generic client exception. ExcClientGeneric = NewException(http.StatusBadRequest, "ERR_CLIENT_GENERIC") // ExcInvalidRequest invalid request exception. ExcInvalidRequest = NewException(http.StatusBadRequest, "ERR_INVALID_REQUEST") // ExcInvalidRequest not found exception. ExcNotFound = NewException(http.StatusNotFound, "ERR_NOT_FOUND") ExcUnauthorized = NewException(http.StatusUnauthorized, "ERR_UNAUTHORIZED") )
View Source
var Environment = struct { PRODUCTION string DEVELOPMENT string TESTING string }{"prod", "dev", "test"}
Functions ¶
Types ¶
type Configuration ¶
type Configuration struct { Environment string DatabaseHost string DatabasePort int DatabaseSSLMode string DatabaseUser string DatabasePassword string DatabaseName string DatabaseMinConns int DatabaseMaxConns int CacheHost string CachePort int CachePassword string CacheMinConns int CacheMaxConns int AppHost string AppPort int AppRelease string AppOrigins []string AppName string ServiceSMSEnabled bool ServiceEmailEnabled bool ServicePushEnabled bool TwilioBaseURL string TwilioAccountSID string TwilioApiKey string TwilioApiSecret string TwilioFromPhone string TwilioOriginator string TwilioRegion string TwilioEdge string SendGridApiKey string SendGridFromName string SendGridFromEmail string GracefulTimeout int RequestHeaderMaxSize int RequestBodyMaxSize int RequestFileMaxSize int SessionKey string }
func NewConfiguration ¶
func NewConfiguration(override *Configuration) *Configuration
type ContextKey ¶
type ContextKey string
Click to show internal directories.
Click to hide internal directories.