tscore

package module
v0.0.0-...-d0bcfed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNullValue

func IsNullValue[T any](v T) bool

IsNullValue returns true if the field contains a null sentinel value. This is used by custom marshallers to properly encode a null value.

func NullValue

func NullValue[T any]() T

NullValue is used to send an explicit 'null' within a request. This is typically used in JSON-MERGE-PATCH operations to delete a value.

Types

type ETag

type ETag string

ETag is a property used for optimistic concurrency during updates ETag is a validator based on https://tools.ietf.org/html/rfc7232#section-2.3.2 An ETag can be empty ("").

const ETagAny ETag = "*"

ETagAny is an ETag that represents everything, the value is "*"

func (ETag) Equals

func (e ETag) Equals(other ETag) bool

Equals does a strong comparison of two ETags. Equals returns true when both ETags are not weak and the values of the underlying strings are equal.

func (ETag) IsWeak

func (e ETag) IsWeak() bool

IsWeak specifies whether the ETag is strong or weak.

func (ETag) WeakEquals

func (e ETag) WeakEquals(other ETag) bool

WeakEquals does a weak comparison of two ETags. Two ETags are equivalent if their opaque-tags match character-by-character, regardless of either or both being tagged as "weak".

type MatchConditions

type MatchConditions struct {
	// Optionally limit requests to resources that have a matching ETag.
	IfMatch *ETag

	// Optionally limit requests to resources that do not match the ETag.
	IfNoneMatch *ETag
}

MatchConditions specifies HTTP options for conditional requests.

type ResponseError

type ResponseError = exported.ResponseError

ResponseError is returned when a request is made to a service and the service returns a non-success HTTP status code. Use errors.As() to access this type in the error chain.

Directories

Path Synopsis
internal
log
This is an internal helper package to combine the complete logging APIs.
This is an internal helper package to combine the complete logging APIs.
Package log provides functionality for configuring logging facilities.
Package log provides functionality for configuring logging facilities.
Package policy contains the definitions needed for configuring in-box pipeline policies and creating custom policies.
Package policy contains the definitions needed for configuring in-box pipeline policies and creating custom policies.
sdk
runtime
Package runtime contains various facilities for creating requests and handling responses.
Package runtime contains various facilities for creating requests and handling responses.
Package streaming contains helpers for streaming IO operations and progress reporting.
Package streaming contains helpers for streaming IO operations and progress reporting.
Package to contains various type-conversion helper functions.
Package to contains various type-conversion helper functions.

Jump to

Keyboard shortcuts

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