option

package
v0.0.2 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: 0

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 ContentType

type ContentType string

func (ContentType) String

func (c ContentType) String() string

type Option

type Option func(*Options)

func WithContentType

func WithContentType(contentType ContentType) Option

func WithHeader

func WithHeader(key string, val any) Option

func WithHeaders

func WithHeaders(headers map[string]any) Option

func WithOperation

func WithOperation(operation string) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

type Options

type Options struct {
	Headers     map[string]any
	ContentType ContentType
	Timeout     time.Duration
	Operation   string
}

func New

func New(options ...Option) *Options

Jump to

Keyboard shortcuts

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