htx

package
v1.9.87 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: MIT Imports: 15 Imported by: 0

README

package htx

http-Funktionen

- func Post
- func Get
- func Put
- func Delete
- func Request
- func JSON2Str

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadFile

func DownloadFile(url string, toFile string) error

DownloadFile #

func JSON2Str

func JSON2Str(data interface{}) string

JSON2Str #

func ParalellDownloadFile

func ParalellDownloadFile(url string, toFile string) error

ParalellDownloadFile #

func URLfileSize

func URLfileSize(url string) (int, error)

URLfileSize #

func WriteResponse added in v1.9.7

func WriteResponse(w http.ResponseWriter, statusCode int, body interface{})

WriteResponse #

func WriteResponseMsg added in v1.9.7

func WriteResponseMsg(from string, w http.ResponseWriter, statusCode int, statusStr string)

WriteResponseMsg #

Types

type DownloadFileInfo

type DownloadFileInfo struct {
	FileName string
	Web      XFileInfo
	Loc      XFileInfo
	Changed  bool
	// contains filtered or unexported fields
}

DownloadFileInfo #

func (*DownloadFileInfo) Download

func (f *DownloadFileInfo) Download(toFile string) error

Download #

func (*DownloadFileInfo) ParalellDownload

func (f *DownloadFileInfo) ParalellDownload(toFile string) error

ParalellDownload #

func (*DownloadFileInfo) SetFileTime

func (f *DownloadFileInfo) SetFileTime(toFile string) error

SetFileTime #

type DownloadFilesInfo

type DownloadFilesInfo struct {
	List []DownloadFileInfo
	// contains filtered or unexported fields
}

DownloadFilesInfo #

func GetDownloadFilesInfo

func GetDownloadFilesInfo(url string) (*DownloadFilesInfo, error)

GetDownloadFilesInfo #

func (*DownloadFilesInfo) GetFileInfo

func (fl *DownloadFilesInfo) GetFileInfo(FileName string) (*DownloadFileInfo, error)

GetFileInfo #

type HtReq

type HtReq struct {
	StatusCode int
	Status     string
	Msg        string
	Body       []byte
	Err        error
}

HtReq #

func Delete

func Delete(url string, token string, jsData *[]byte) *HtReq

Delete #

func Get

func Get(url string, token string, jsData *[]byte) *HtReq

Get #

func Patch added in v1.9.8

func Patch(url string, token string, jsData *[]byte) *HtReq

Patch #

func Post

func Post(url string, token string, jsData *[]byte) *HtReq

Post #

func Put

func Put(url string, token string, jsData *[]byte) *HtReq

Put #

func Request

func Request(method string, url string, token string, jsData *[]byte) *HtReq

Request #

func TryRequest added in v1.9.35

func TryRequest(method string, url string, token string, jsData *[]byte) *HtReq

TryRequest #

func (*HtReq) ToMap

func (r *HtReq) ToMap() *HtReqMap

ToMap #

type HtReqMap

type HtReqMap struct {
	// contains filtered or unexported fields
}

HtReqMap #

func (*HtReqMap) AsString added in v1.9.8

func (x *HtReqMap) AsString(key string) string

AsString #

func (*HtReqMap) StringMap

func (x *HtReqMap) StringMap() map[string]string

StringMap #

type ReqParams added in v1.9.15

type ReqParams struct {
	// contains filtered or unexported fields
}

ReqParams #

func ReqQuery added in v1.9.15

func ReqQuery(r *http.Request) *ReqParams

ReqQuery #

func (*ReqParams) Exists added in v1.9.15

func (m *ReqParams) Exists(key string) bool

Exists #

func (*ReqParams) Items added in v1.9.15

func (m *ReqParams) Items() map[string]string

Items #

func (*ReqParams) Value added in v1.9.15

func (m *ReqParams) Value(key string) string

Value #

type WriteCounter

type WriteCounter struct {
	Total uint64
}

WriteCounter #

func (WriteCounter) PrintProgress

func (wc WriteCounter) PrintProgress()

PrintProgress #prints the progress of a file write

func (*WriteCounter) Write

func (wc *WriteCounter) Write(p []byte) (int, error)

Write #

type XFileInfo

type XFileInfo struct {
	Size uint64
	Time time.Time
}

XFileInfo #

Jump to

Keyboard shortcuts

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