common

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceTimeout

func ReplaceTimeout(t time.Duration)

Types

type Net

type Net string
const (
	Http Net = "http"
	Grpc Net = "grpc"
)

type Option

type Option func(req *Req)

func WithTimeout

func WithTimeout(t time.Duration) Option

type Req

type Req struct {
	Body    []byte
	Headers map[string]string
	Timeout time.Duration
}

func NewReq

func NewReq(body, headers []byte, opts ...Option) *Req

func (*Req) AddEasyCarHeaders

func (r *Req) AddEasyCarHeaders(gId, branchId string)

type Resp

type Resp struct {
	Body []byte // response Body
}

Jump to

Keyboard shortcuts

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