common

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64

func Float64(v float64) *float64

func Int

func Int(v int) *int

func Int64

func Int64(v int64) *int64

func ListResultFunc

func ListResultFunc[T any](dataItemMapping func(*gjson.Json) T) func(json *gjson.Json) *ListResult[T]

func String

func String(v string) *string

func VarFloat64

func VarFloat64(v *gvar.Var) *float64

func VarInt

func VarInt(v *gvar.Var) *int

func VarInt64

func VarInt64(v *gvar.Var) *int64

func VarString

func VarString(v *gvar.Var) *string

Types

type DeletionStatus

type DeletionStatus struct {
	Id      string `json:"id"`
	Deleted bool   `json:"deleted"`
	Object  string `json:"object"`
}

func NewDeletionStatusFromJson

func NewDeletionStatusFromJson(json *gjson.Json) *DeletionStatus

type ListParam

type ListParam struct {
	Limit *int    `json:"limit,omitempty"`
	Order *string `json:"order,omitempty"`
}

type ListResult

type ListResult[T any] struct {
	FirstId string `json:"first_id"`
	LastId  string `json:"last_id"`
	HasMore bool   `json:"has_more"`
	Data    []T    `json:"data"`
	Object  string `json:"object"`
}

func ListResultFromJson

func ListResultFromJson[T any](json *gjson.Json, dataItemMapping func(*gjson.Json) T) *ListResult[T]

type UpdateMetadataParam

type UpdateMetadataParam struct {
	Metadata map[string]string `json:"metadata,omitempty"`
}

Jump to

Keyboard shortcuts

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