Documentation ¶
Index ¶
- func GetSelfDefinedHeader(h http.Header, k string) string
- func GitVersion() string
- func JsonString(v interface{}) ([]byte, error)
- func LocalIP() (addr string, err error)
- func LocalIPs() (addresses []string, err error)
- func OasMatchBimgs(content string) string
- func OasMatchBvideos(content string) string
- func RedirectLog(logfile string, crashfile string, mode os.FileMode)
- func RemoteIP(r *http.Request) string
- func TraceStartup(msg ...string)
- type ImagePattern
- type LogWriter
- type OasBimg
- type OasBvideo
- type Price
- func (p *Price) Add(b float64) *Price
- func (p *Price) Div(b float64) *Price
- func (p *Price) Fixed() string
- func (p *Price) Mul(b float64) *Price
- func (p *Price) Percent(base float64) float64
- func (p *Price) Sub(b float64) *Price
- func (p *Price) Val() float64
- func (p *Price) XPercent(percent float64) *Price
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSelfDefinedHeader ¶
GetSelfDefinedHeader
func GitVersion ¶
func GitVersion() string
func JsonString ¶
统一json @TODO resp 里面的json,不能ignore json:"-" 和 omerti ; 解析 bool 为 字符串 json.Marshal 默认 escapeHtml 为true,会转义 <、>、&
func LocalIP ¶
LocalAddress 223.5.5.5 is aliyun public DNS. Google public DNS 8.8.8.8 is not connectable in China.
func LocalIPs ¶
LocalAddresses For multiple network cards (virtual network cards included, e.g. docker)
func OasMatchBimgs ¶
func OasMatchBvideos ¶
func TraceStartup ¶
func TraceStartup(msg ...string)
Types ¶
type ImagePattern ¶
type ImagePattern struct { Height int Width int Quality int MaxWidth int MaxHeight int WatermarkID int }
func NewImagePattern ¶
func NewImagePattern(tag ...string) *ImagePattern
func (*ImagePattern) EastChinaURL ¶
func (p *ImagePattern) EastChinaURL(url string) string
func (*ImagePattern) OasURL ¶
func (p *ImagePattern) OasURL(url string) string
func (*ImagePattern) Parse ¶
func (p *ImagePattern) Parse(tag string)
type LogWriter ¶
type LogWriter struct {
// contains filtered or unexported fields
}
func NewLogWriter ¶
Click to show internal directories.
Click to hide internal directories.