Documentation ¶
Index ¶
- func Debug(prefix string, obj interface{}, stdout *Stdout)
- func HttpGetRaw(client *http.Client, URL, contentType string, authorization string) ([]byte, error)
- func HttpGetRawWithHeaders(client *http.Client, URL string, headers map[string]string) ([]byte, error)
- func HttpPostRaw(client *http.Client, URL, contentType string, authorization string, raw []byte) ([]byte, error)
- func HttpPostRawOutCode(client *http.Client, URL, contentType string, authorization string, raw []byte) (body []byte, code int, err error)
- func HttpPostRawWithHeaders(client *http.Client, URL string, headers map[string]string, raw []byte) ([]byte, error)
- func HttpPostRawWithHeadersOutCode(client *http.Client, URL string, headers map[string]string, raw []byte) (body []byte, code int, err error)
- func HttpPutRaw(client *http.Client, URL, contentType string, authorization string, raw []byte) ([]byte, error)
- func HttpPutRawWithHeaders(client *http.Client, URL string, headers map[string]string, raw []byte) ([]byte, error)
- func HttpRequestRawWithHeaders(client *http.Client, method, URL string, headers map[string]string, raw []byte) ([]byte, error)
- func HttpRequestRawWithHeadersOutCode(client *http.Client, method, URL string, headers map[string]string, raw []byte) (body []byte, code int, err error)
- func InterfaceToMap(prefix string, i interface{}) (map[string]interface{}, error)
- func JsonMarshal(t interface{}) ([]byte, error)
- func Output(query, to string, prefix string, opts []interface{}, bytes []byte, ...)
- func OutputJson(outputOpts OutputOptions, prefix string, opts []interface{}, bytes []byte, ...)
- func OutputRaw(output string, bytes []byte, stdout *Stdout)
- func ReadAndMarshal(path string) (map[string]interface{}, error)
- func TruncateString(str string, length int) string
- type Logger
- type OutputOptions
- type Stdout
- func (so *Stdout) Debug(obj interface{}, args ...interface{})
- func (so *Stdout) Error(obj interface{}, args ...interface{})
- func (so *Stdout) Info(obj interface{}, args ...interface{})
- func (so *Stdout) Panic(obj interface{}, args ...interface{})
- func (so *Stdout) SetCallerOffset(offset int)
- func (so *Stdout) Warn(obj interface{}, args ...interface{})
- type StdoutOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpGetRaw ¶ added in v0.2.0
func HttpGetRawWithHeaders ¶ added in v0.2.0
func HttpPostRaw ¶ added in v0.2.0
func HttpPostRawOutCode ¶ added in v0.7.2
func HttpPostRawWithHeaders ¶ added in v0.2.0
func HttpPostRawWithHeadersOutCode ¶ added in v0.7.2
func HttpPutRaw ¶ added in v0.4.2
func HttpPutRawWithHeaders ¶ added in v0.4.2
func HttpRequestRawWithHeaders ¶ added in v0.4.2
func HttpRequestRawWithHeadersOutCode ¶ added in v0.7.2
func InterfaceToMap ¶ added in v0.6.6
func JsonMarshal ¶ added in v0.4.3
we need custom json marshal due to no html escaption
func OutputJson ¶ added in v0.2.0
func OutputJson(outputOpts OutputOptions, prefix string, opts []interface{}, bytes []byte, stdout *Stdout)
func ReadAndMarshal ¶ added in v0.6.6
func TruncateString ¶ added in v0.2.4
Types ¶
type Logger ¶ added in v0.5.0
type Logger interface { Info(obj interface{}, args ...interface{}) Warn(obj interface{}, args ...interface{}) Debug(obj interface{}, args ...interface{}) Error(obj interface{}, args ...interface{}) }
type OutputOptions ¶ added in v0.2.0
type Stdout ¶
type Stdout struct {
// contains filtered or unexported fields
}
func NewStdout ¶
func NewStdout(options StdoutOptions) *Stdout
func (*Stdout) SetCallerOffset ¶
Click to show internal directories.
Click to hide internal directories.