Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config appConfig
Functions ¶
func LoadConfig ¶
Deprecated read from env variables instead of files LoadConfig loads configuration from the given list of paths and populates it into the Config variable. The configuration file(s) should be named as app.yaml. Environment variables with the prefix "RESTFUL_" in their names are also read automatically.
func LoadMessages ¶
Deprecated read from env variables instead of files
Types ¶
type APIError ¶
type APIError struct { // Status represents the HTTP status code Status int `json:"-"` // ErrorCode is the code uniquely identifying an error ErrorCode string `json:"error_code"` // Message is the error message that may be displayed to end users Message string `json:"message"` // DeveloperMessage is the error message that is mainly meant for developers DeveloperMessage string `json:"developer_message,omitempty"` // Details specifies the additional error information Details interface{} `json:"details,omitempty"` }
Deprecated read from env variables instead of files
func NewAPIError ¶
NewAPIError creates a new APIError with the given HTTP status code, error code, and parameters for replacing placeholders in the error template. The param can be nil, indicating there is no need for placeholder replacement.
Click to show internal directories.
Click to hide internal directories.