option

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ContentTypeApplicationJson ContentType = "application/json"

	ContentTypeHeader   = "Content-Type"
	AuthorizationHeader = "Authorization"
	UserAgentHeader     = "User-Agent"
	XRequestIDHeader    = "X-Request-ID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BinderOption

type BinderOption func(*BinderOptions)

func WithContentType

func WithContentType(contentType ContentType) BinderOption

func WithHeader

func WithHeader(key string, val any) BinderOption

func WithHeaders

func WithHeaders(headers map[string]any) BinderOption

func WithOperation

func WithOperation(operation string) BinderOption

func WithRequestID

func WithRequestID(requestID string) BinderOption

type BinderOptions

type BinderOptions struct {
	Headers     map[string]any
	ContentType ContentType
	Operation   string
	RequestID   string
}

func NewBinderOptions

func NewBinderOptions(options ...BinderOption) *BinderOptions

type ClientOption

type ClientOption func(*ClientOptions)

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

func WithTimeout

func WithTimeout(timeout time.Duration) ClientOption

type ClientOptions

type ClientOptions struct {
	BaseURL string
	Timeout time.Duration
}

func NewClientOptions

func NewClientOptions(options ...ClientOption) *ClientOptions

type ContentType

type ContentType string

func (ContentType) String

func (c ContentType) String() string

Jump to

Keyboard shortcuts

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