oki

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 5 Imported by: 0

README

oki

Go pkg oki is a oapi-codegen ClientWithResponses helper

Documentation

Overview

Provides generic function oki.DOKI wrapping WithResponses receiver functions by an oapi-codegen generated ClientWithResponses.

(C) 2025 SA6MWA Michel https://pkt.systems License: MIT

Index

Constants

This section is empty.

Variables

Functions

func DEREF added in v1.0.0

func DEREF[T any](p *T) T

Deref returns the value pointed to by p, or empty if p is nil.

func DEREFWithDefault added in v1.0.0

func DEREFWithDefault[T any](p *T, def T) T

DEREFWithDefault returns the value pointed to by p, or def if p is nil.

func DOKI

func DOKI[R any](resp R, err error) (R, error)

DOKI: ensure 2xx AND that the corresponding JSON2xx field exists & is non-zero. Returns the original response so you can still access headers, etc. If there is only one JSON2xx field in resp and error is nil, it is guaranteed to be valid/non-nil.

func PTR added in v1.0.0

func PTR[T any](v T) *T

PTR returns a pointer to the given value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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