Versions in this module Expand all Collapse all v3 v3.67.2 Feb 2, 2026 v3.67.1 Feb 2, 2026 v3.67.0 Feb 2, 2026 v3.66.2 Feb 2, 2026 Changes in this version + const DateFormat + var ErrFailedToUnmarshalAsAOrB = errors.New("failed to unmarshal as either A or B") + var ErrMustBeMap = errors.New("value must be map[string]any") + var ErrValidationEmail = errors.New("email: failed to pass regex validation") + func AsMap[V any](v any) (map[string]V, error) + func CoalesceOrMerge(parts ...json.RawMessage) (json.RawMessage, error) + func ConvertFormFields(resp []byte) ([]byte, error) + func ConvertValidatorError(err error) error + func EncodeFormFields(data any, encoding map[string]FieldEncoding) (string, error) + func EncodeQueryFields(data any, encoding map[string]QueryEncoding) (string, error) + func JSONMerge(data, patch json.RawMessage) (json.RawMessage, error) + func MarshalEitherWithDiscriminator(data []byte, field, value string) ([]byte, error) + func MarshalJSON(v any) (json.RawMessage, error) + func MaskSensitivePointer[T any](value *T, config SensitiveDataConfig) any + func MaskSensitiveString(value string, config SensitiveDataConfig) string + func MaskSensitiveValue(value any, config SensitiveDataConfig) any + func NewClientAPIError(err error, opts ...ClientAPIErrorOption) error + func NewValidationErrorFromError(field string, err error) error + func Ptr[T any](v T) *T + func RegisterCustomTypeFunc(v *validator.Validate) + func UnmarshalAs[T any](v json.RawMessage) (T, error) + func UnmarshalJSON(data []byte, v any) error + type APIClient interface + CreateRequest func(ctx context.Context, params RequestOptionsParameters, ...) (*http.Request, error) + ExecuteRequest func(ctx context.Context, req *http.Request, operationPath string) (*Response, error) + GetBaseURL func() string + type APIClientOption func(*Client) error + func WithHTTPClient(doer HttpRequestDoer) APIClientOption + func WithRequestEditorFn(fn RequestEditorFn) APIClientOption + type Client struct + func NewAPIClient(baseURL string, opts ...APIClientOption) (*Client, error) + func (c *Client) CreateRequest(ctx context.Context, params RequestOptionsParameters, ...) (*http.Request, error) + func (c *Client) ExecuteRequest(ctx context.Context, req *http.Request, operationPath string) (*Response, error) + func (c *Client) GetBaseURL() string + type ClientAPIError struct + func (e *ClientAPIError) Error() string + func (e *ClientAPIError) StatusCode() int + func (e *ClientAPIError) Unwrap() error + type ClientAPIErrorOption func(*ClientAPIError) + func WithStatusCode(code int) ClientAPIErrorOption + type Date struct + func (d *Date) UnmarshalJSON(data []byte) error + func (d *Date) UnmarshalText(data []byte) error + func (d Date) MarshalJSON() ([]byte, error) + func (d Date) String() string + type Either struct + A A + B B + N int + func NewEitherFromA[A any, B any](a A) Either[A, B] + func NewEitherFromB[A any, B any](b B) Either[A, B] + func (t *Either[A, B]) IsA() bool + func (t *Either[A, B]) IsB() bool + func (t *Either[A, B]) UnmarshalJSON(data []byte) error + func (t *Either[A, B]) Validate() error + func (t *Either[A, B]) Value() any + func (t Either[A, B]) MarshalJSON() ([]byte, error) + type Email string + func (e *Email) UnmarshalJSON(data []byte) error + func (e Email) MarshalJSON() ([]byte, error) + type FieldEncoding struct + ContentType string + Explode *bool + Style string + type File struct + func (file *File) Bytes() ([]byte, error) + func (file *File) InitFromBytes(data []byte, filename string) + func (file *File) InitFromMultipart(header *multipart.FileHeader) + func (file *File) UnmarshalJSON(data []byte) error + func (file File) FileSize() int64 + func (file File) Filename() string + func (file File) MarshalJSON() ([]byte, error) + func (file File) Reader() (io.ReadCloser, error) + type HttpRequestDoer interface + Do func(context context.Context, req *http.Request) (*http.Response, error) + type JSONNonZero interface + JSONNonZero func() bool + type Marshaler interface + MarshalJSON func() ([]byte, error) + type MaskType string + const MaskTypeFull + const MaskTypeHash + const MaskTypePartial + const MaskTypeRegex + type Merger struct + CopyNonexistent bool + Errors []error + Replaced map[string]any + func (m *Merger) Merge(data, patch any) any + func (m *Merger) MergeBytes(dataBuff, patchBuff []byte) ([]byte, error) + func (m *Merger) MergeBytesIndent(dataBuff, patchBuff []byte, prefix, indent string) ([]byte, error) + type QueryEncoding struct + Explode *bool + Style string + type RequestEditorFn func(ctx context.Context, req *http.Request) error + type RequestOptions interface + GetBody func() any + GetHeader func() (map[string]string, error) + GetPathParams func() (map[string]any, error) + GetQuery func() (map[string]any, error) + type RequestOptionsParameters struct + BodyEncoding map[string]FieldEncoding + ContentType string + Method string + Options RequestOptions + QueryEncoding map[string]QueryEncoding + RequestURL string + type Response struct + Content []byte + Headers http.Header + Raw *http.Response + StatusCode int + type SensitiveDataConfig struct + Algorithm string + KeepPrefix int + KeepSuffix int + Pattern string + Replacement string + Type MaskType + func NewDefaultSensitiveDataConfig() *SensitiveDataConfig + func (s *SensitiveDataConfig) EscapedPattern() string + func (s *SensitiveDataConfig) Mask() string + func (s *SensitiveDataConfig) Unmarshal(value any) error + type Unmarshaler interface + UnmarshalJSON func([]byte) error + type ValidationError struct + Err error + Field string + Message string + func NewValidationError(field, message string) ValidationError + func (e ValidationError) Error() string + func (e ValidationError) Unwrap() error + type ValidationErrors []ValidationError + func NewValidationErrorsFromError(err error) ValidationErrors + func NewValidationErrorsFromErrors(prefix string, errs []error) ValidationErrors + func NewValidationErrorsFromString(field, message string) ValidationErrors + func (ve ValidationErrors) Add(field, message string) ValidationErrors + func (ve ValidationErrors) Append(field string, err error) ValidationErrors + func (ve ValidationErrors) Error() string + func (ve ValidationErrors) Unwrap() []error + type Validator interface + Validate func() error