client

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package client provides REST client functionality for the Results CLI.

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) (*Response, error)

DoRequest performs an HTTP request and handles the response

type Response added in v0.17.0

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

Response represents a generic API response containing the raw body bytes.

func NewResponse added in v0.17.0

func NewResponse(body []byte) *Response

NewResponse creates a new Response with the given body bytes.

func (*Response) Body added in v0.17.0

func (r *Response) Body() []byte

Body returns the raw response body as a byte slice.

func (*Response) ProtoUnmarshal added in v0.17.0

func (r *Response) ProtoUnmarshal(out proto.Message) error

ProtoUnmarshal unmarshals the response body into the provided proto.Message.

Directories

Path Synopsis
Package logs provides a client for interacting with Results logs.
Package logs provides a client for interacting with Results logs.
Package records provides a client for interacting with Results records.
Package records provides a client for interacting with Results records.

Jump to

Keyboard shortcuts

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