Help us shape the future of Go! Take the 2026 Go Developer Survey

searchresult

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifySearchType

func VerifySearchType[DataType any](rType reflect.Type) error

Types

type Merger

type Merger struct {
	// contains filtered or unexported fields
}

see the main README.md for an explanation of this file.

func NewMerger

func NewMerger() *Merger

func (*Merger) Digest

func (g *Merger) Digest(reader io.Reader) (slice json.RawMessage, err error)

func (*Merger) Finalize

func (g *Merger) Finalize(sliceReader io.Reader) (mapReader io.Reader)

type ResponseDataType

type ResponseDataType string
const (
	ResponseDataTypeUnknown ResponseDataType = ""
	ResponseDataTypeSliced  ResponseDataType = "sliced"
	ResponseDataTypeSearch  ResponseDataType = "search"
)

func GetResponseDataType

func GetResponseDataType[DataType any](rType reflect.Type) ResponseDataType

type Typed

type Typed[DataType any] struct {
	TotalCount        int
	IncompleteResults bool
	Items             []*DataType
}

func FromSlice

func FromSlice[DataType any](slice []*DataType) *Typed[DataType]

func UntypedToTyped

func UntypedToTyped[DataType any](untyped *Untyped) (*Typed[DataType], error)

type Untyped

type Untyped struct {
	TotalCount        int              `json:"total_count"`
	IncompleteResults bool             `json:"incomplete_results"`
	Items             *json.RawMessage `json:"items"`
}

see the main README.md for an explanation of this file.

Jump to

Keyboard shortcuts

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