paramobject

package
v0.0.0-...-ca61c3d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client sends requests to a server.

func New

func New(p Params) (*Client, error)

New builds a new Client. --8<-- [start:start-3] --8<-- [start:consume]

func NewClient

func NewClient(p ClientParams) (*Client, error)

NewClient builds a new client. --8<-- [start:takeparam] --8<-- [start:consume]

type ClientConfig

type ClientConfig struct {
	URL string
}

ClientConfig defines the configuration for the client.

type ClientParams

type ClientParams struct {
	// --8<-- [end:empty-1]
	fx.In

	Config     ClientConfig
	HTTPClient *http.Client
}

ClientParams defines the parameters necessary to build a client. --8<-- [start:empty-1] --8<-- [start:fxin] --8<-- [start:fields]

type Params

type Params struct {
	fx.In

	Config     ClientConfig
	HTTPClient *http.Client
	// --8<-- [end:start-1]
	Logger *zap.Logger `optional:"true"`
}

Params defines the parameters of new. --8<-- [start:start-1] --8<-- [start:full]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳