Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError added in v0.15.0

func NewError(message string, code int) error

NewError creates a new Error

Types

type Config added in v0.15.0

type Config struct {
	URL       *url.URL
	Timeout   time.Duration
	Transport *transport.Config
}

Config for the HTTP client

type Error added in v0.15.0

type Error struct {
	Message string
	Code    int
}

Error represents an error that occurred during a client operation

func (*Error) Error added in v0.15.0

func (e *Error) Error() string

type RESTClient added in v0.15.0

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

RESTClient handles HTTP communication with the server

func NewRESTClient added in v0.15.0

func NewRESTClient(c *Config) (*RESTClient, error)

NewRESTClient creates a new REST client.

func (*RESTClient) BuildURL added in v0.15.0

func (c *RESTClient) BuildURL(p string, params url.Values) string

BuildURL constructs a URL with the given path and query parameters

func (*RESTClient) DoRequest added in v0.15.0

func (c *RESTClient) DoRequest(ctx context.Context, method, url string, in proto.Message) (*common.Response, error)

DoRequest performs an HTTP request and handles the response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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