Documentation ¶
Index ¶
- Constants
- Variables
- func GetLoc() *time.Location
- func GetLocation() *time.Location
- func IsDM(mode ...string) bool
- func IsDevelopmentMode(mode ...string) bool
- func IsPM(mode ...string) bool
- func IsProductionMode(mode ...string) bool
- func LocationJST() *time.Location
- func LocationKST() *time.Location
- func ParseDatetimeInTimeZone(layout string, value string, TZ *time.Location) (time.Time, error)
- func SetLoc(tz *time.Location)
- type HttpClient
- func (hc *HttpClient) Do(req *http.Request) (*http.Response, error)
- func (hc *HttpClient) GetMaxRetriesCount() int
- func (hc *HttpClient) GetRetryDelay() time.Duration
- func (hc *HttpClient) SetMaxRetries(maxRetries int) *HttpClient
- func (hc *HttpClient) SetRetryDelay(retryDelay time.Duration) *HttpClient
- func (hc *HttpClient) SetUserAgentAndroid(req *http.Request) *http.Request
- func (hc *HttpClient) SetUserAgentMacOS(req *http.Request) *http.Request
- func (hc *HttpClient) SetUserAgentiPhone(req *http.Request) *http.Request
Constants ¶
View Source
const ( ValueEnvModeProduction = "production" ValueEnvModeDevelopment = "development" KeyEnvMode = "MODE" )
MARK: For Program's running mode settings
View Source
const ( ValueEnvAsiaSeoul = "Asia/Seoul" ValueEnvAsiaTokyo = "Asia/Tokyo" KeyEnvLocation = "LOCATION" )
MARK: For Program's localization settings
View Source
const (
DateTimeFormatAddTimeZone = "2006-01-02 15:04:05 MST"
)
Variables ¶
View Source
var HttpErrors = []error{ errors.New("out of retries to try fetch HTTP(S) request"), }
HttpErrors : that could be happened during~end of the HTTP(S) Requests in Unexpected errors or Custom errors.
Functions ¶
func GetLocation ¶ added in v1.0.1
func IsDevelopmentMode ¶
func IsProductionMode ¶
func LocationJST ¶ added in v1.0.5
func LocationKST ¶ added in v1.0.5
func ParseDatetimeInTimeZone ¶ added in v1.0.5
Types ¶
type HttpClient ¶ added in v1.0.7
type HttpClient struct {
// contains filtered or unexported fields
}
HttpClient : The struct for using HTTP(S) Requests.
func GetHttpClient ¶ added in v1.0.7
func GetHttpClient() *HttpClient
func (*HttpClient) GetMaxRetriesCount ¶ added in v1.0.7
func (hc *HttpClient) GetMaxRetriesCount() int
func (*HttpClient) GetRetryDelay ¶ added in v1.0.7
func (hc *HttpClient) GetRetryDelay() time.Duration
func (*HttpClient) SetMaxRetries ¶ added in v1.0.7
func (hc *HttpClient) SetMaxRetries(maxRetries int) *HttpClient
func (*HttpClient) SetRetryDelay ¶ added in v1.0.7
func (hc *HttpClient) SetRetryDelay(retryDelay time.Duration) *HttpClient
func (*HttpClient) SetUserAgentAndroid ¶ added in v1.0.7
func (hc *HttpClient) SetUserAgentAndroid(req *http.Request) *http.Request
func (*HttpClient) SetUserAgentMacOS ¶ added in v1.0.7
func (hc *HttpClient) SetUserAgentMacOS(req *http.Request) *http.Request
SetUserAgentMacOS : Based on Macbook Pro Chrome
func (*HttpClient) SetUserAgentiPhone ¶ added in v1.0.7
func (hc *HttpClient) SetUserAgentiPhone(req *http.Request) *http.Request
Click to show internal directories.
Click to hide internal directories.