wgetservice

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module("WgetService", fx.Provide(
	func() (out Result, err error) {
		if svc, e := NewCurl(); e != nil {
			err = e
		} else {
			err = out.Execute(svc)
		}
		return
	},
),
)

Functions

func RobotCurlBase

func RobotCurlBase(method string, protocol string, host string, url string, header map[string]string, params interface{}) (interface{}, error)

func ToString

func ToString(value interface{}) string

Types

type NetService

type NetService struct {
}

func NewCurl

func NewCurl() (*NetService, error)

func NewNetService

func NewNetService() NetService

func (*NetService) Curl

func (s *NetService) Curl(method string, url string, header map[string]string, params interface{}) ([]byte, error)

func (*NetService) Get

func (s *NetService) Get(url string) []byte

func (*NetService) PostWithFormData

func (s *NetService) PostWithFormData(method, url string, header map[string]string, postData *map[string]string) ([]byte, error)

func (*NetService) RobotCurl

func (s *NetService) RobotCurl(method string, url string, header map[string]string, params map[string]interface{}) (interface{}, error)

RobotCurl 群机器人

type Param

type Param struct {
	fx.In
	NetService *NetService `name:"NetService"`
}

type Result

type Result struct {
	fx.Out
	NetService *NetService `name:"NetService"`
}

func (*Result) Execute

func (f *Result) Execute(service *NetService) error

Jump to

Keyboard shortcuts

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