utils

package module
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 13 Imported by: 38

README

Utils

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallerGetInfo added in v0.1.4

func CallerGetInfo(offset int) (string, string, int)

func Contains

func Contains(items interface{}, item interface{}) bool

Contains ...

func Content added in v0.1.5

func Content(contentOrPath string) ([]byte, error)

func DirExists added in v0.2.4

func DirExists(path string) bool

func EnvGet added in v0.1.3

func EnvGet(key string, defaultValue interface{}) interface{}

func FileExists added in v0.1.6

func FileExists(path string) bool

func GoRoutineID added in v0.2.2

func GoRoutineID() uint64

func HttpDeleteRaw added in v0.3.2

func HttpDeleteRaw(client *http.Client, URL, contentType string, authorization string, raw []byte) ([]byte, error)

func HttpDeleteRawWithHeaders added in v0.3.2

func HttpDeleteRawWithHeaders(client *http.Client, URL string, headers map[string]string, raw []byte) ([]byte, error)

func HttpGetRaw added in v0.3.0

func HttpGetRaw(client *http.Client, URL, contentType string, authorization string) ([]byte, error)

func HttpGetRawWithHeaders added in v0.3.0

func HttpGetRawWithHeaders(client *http.Client, URL string, headers map[string]string) ([]byte, error)

func HttpPostRaw added in v0.3.0

func HttpPostRaw(client *http.Client, URL, contentType string, authorization string, raw []byte) ([]byte, error)

func HttpPostRawOutCode added in v0.3.0

func HttpPostRawOutCode(client *http.Client, URL, contentType string, authorization string, raw []byte) (body []byte, code int, err error)

func HttpPostRawWithHeaders added in v0.3.0

func HttpPostRawWithHeaders(client *http.Client, URL string, headers map[string]string, raw []byte) ([]byte, error)

func HttpPostRawWithHeadersOutCode added in v0.3.0

func HttpPostRawWithHeadersOutCode(client *http.Client, URL string, headers map[string]string, raw []byte) (body []byte, code int, err error)

func HttpPutRaw added in v0.3.0

func HttpPutRaw(client *http.Client, URL, contentType string, authorization string, raw []byte) ([]byte, error)

func HttpPutRawWithHeaders added in v0.3.0

func HttpPutRawWithHeaders(client *http.Client, URL string, headers map[string]string, raw []byte) ([]byte, error)

func HttpRequestRawWithHeaders added in v0.3.0

func HttpRequestRawWithHeaders(client *http.Client, method, URL string, headers map[string]string, raw []byte) ([]byte, error)

func HttpRequestRawWithHeadersOutCode added in v0.3.0

func HttpRequestRawWithHeadersOutCode(client *http.Client, method, URL string, headers map[string]string, raw []byte) (body []byte, code int, err error)

func Index added in v0.2.0

func Index(items interface{}, item interface{}) int

func IsEmpty

func IsEmpty(v interface{}) bool

IsEmpty ...

func MapGetKeyValues

func MapGetKeyValues(s string) map[string]string

func MapToArray

func MapToArray(m map[string]string) []string

func MapToArrayWithSeparator

func MapToArrayWithSeparator(m map[string]string, s string) []string

func NewHttpClient

func NewHttpClient(timeout int, insecure bool) *http.Client

func NewHttpInsecureClient

func NewHttpInsecureClient(timeout int) *http.Client

func NewHttpSecureClient

func NewHttpSecureClient(timeout int) *http.Client

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL