client

package
v0.0.0-...-65e545e Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetInstance

func SetInstance(typeClient string)

SetInstance set instance singleton the HttpClient

Types

type Client

type Client interface {
	Get(endpoint string) (*resty.Response, error)
	Post(endpoint string, body map[string]interface{}) (*resty.Response, error)
	Put(endpoint string) (*resty.Response, error)
}

func GetInstance

func GetInstance() Client

GetInstance get env instance

type ClientWebPaySuccess

type ClientWebPaySuccess struct {
	Environment *environment.Environment
}

func (ClientWebPaySuccess) Get

func (client ClientWebPaySuccess) Get(endpoint string) (*resty.Response, error)

Get http het method for client

func (ClientWebPaySuccess) Post

func (client ClientWebPaySuccess) Post(endpoint string, body map[string]interface{}) (*resty.Response, error)

Post http post for client

func (ClientWebPaySuccess) Put

func (client ClientWebPaySuccess) Put(endpoint string) (*resty.Response, error)

Put http put method for client

type HttpClient

type HttpClient struct {
	Environment *environment.Environment
}

HttpClient client

func (HttpClient) Get

func (client HttpClient) Get(endpoint string) (*resty.Response, error)

Get http het method for client

func (HttpClient) Post

func (client HttpClient) Post(endpoint string, body map[string]interface{}) (*resty.Response, error)

Post http post for client

func (HttpClient) Put

func (client HttpClient) Put(endpoint string) (*resty.Response, error)

Put http put method for client

Jump to

Keyboard shortcuts

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