poster

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetByUrl

func GetByUrl[T any](url string, cfg conf.CenterApi) (T, error)

func GetByUrls

func GetByUrls[T any](ctx *ctx.Context, path string) (T, error)

func PostByUrl

func PostByUrl(url string, cfg conf.CenterApi, v interface{}) (err error)

func PostByUrls

func PostByUrls(ctx *ctx.Context, path string, v interface{}) (err error)

func PostJSON

func PostJSON(url string, timeout time.Duration, v interface{}, retries ...int) (response []byte, code int, err error)

Types

type DataResponse

type DataResponse[T any] struct {
	Dat T      `json:"dat"`
	Err string `json:"err"`
}

type PostResponse

type PostResponse struct {
	Err string `json:"err"`
}

Jump to

Keyboard shortcuts

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