utils

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugEnable bool

Functions

This section is empty.

Types

type RestClient

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

func NewRest

func NewRest(host string) *RestClient

func (*RestClient) Auth

func (rc *RestClient) Auth(token string) *RestClient

func (*RestClient) Form

func (rc *RestClient) Form(req map[string]string) (code int, err error)

func (*RestClient) FormUrl

func (rc *RestClient) FormUrl(req map[string]string) (code int, err error)

func (*RestClient) Get

func (rc *RestClient) Get(query map[string]string) (code int, err error)

func (*RestClient) Header

func (rc *RestClient) Header(name, value string) *RestClient

func (*RestClient) Path

func (rc *RestClient) Path(name ...string) *RestClient

func (*RestClient) Post

func (rc *RestClient) Post(payload any) (code int, err error)

func (*RestClient) ResponseJson

func (rc *RestClient) ResponseJson(respPtr any) *RestClient

Jump to

Keyboard shortcuts

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