Documentation ¶
Index ¶
- Constants
- func CheckIfFileExists(path string) (bool, error)
- func DelCookie(writer http.ResponseWriter, cookie_name string)
- func DownloadFile(rac *RestApiClient, url string, save_path string) error
- func FileMd5Hash(path string) (hash string, err error)
- func FormatByteSize(n int64) (string, string)
- func GetBingHomeWallpaper(rac *RestApiClient) (string, error)
- func Md5Check(hashedStr string, plain string) bool
- func Md5Hash(plain string) string
- func ReadAllFiles(path string, items *[]*FileInfoWrapper) error
- func ReadAsMap(r io.Reader) (map[string]interface{}, error)
- func StringLimitLen(str string, maxLen int) string
- type FileInfoWrapper
- type RestApiClient
- type RestApiRequest
Constants ¶
View Source
const (
MaxInt64 int64 = 100000000
)
Variables ¶
This section is empty.
Functions ¶
func CheckIfFileExists ¶
func DelCookie ¶
func DelCookie(writer http.ResponseWriter, cookie_name string)
func DownloadFile ¶
func DownloadFile(rac *RestApiClient, url string, save_path string) error
func FileMd5Hash ¶
func FormatByteSize ¶
func GetBingHomeWallpaper ¶
func GetBingHomeWallpaper(rac *RestApiClient) (string, error)
func ReadAllFiles ¶
func ReadAllFiles(path string, items *[]*FileInfoWrapper) error
func StringLimitLen ¶
Types ¶
type FileInfoWrapper ¶
type RestApiClient ¶
type RestApiClient struct {
// contains filtered or unexported fields
}
func NewRestApiClient ¶
func NewRestApiClient(skip_tls_verify bool) *RestApiClient
func (*RestApiClient) Do ¶
func (rac *RestApiClient) Do(rar *RestApiRequest) (*http.Response, error)
type RestApiRequest ¶
func NewRestApiRequest ¶
func NewRestApiRequest(method string, urlPath string, body []byte) *RestApiRequest
func (*RestApiRequest) SetAuthHeader ¶
func (rar *RestApiRequest) SetAuthHeader(token *oauth2.Token) *RestApiRequest
Click to show internal directories.
Click to hide internal directories.