client

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetQuery

func GetQuery(client *fiber.Client, parsedUrl *url.URL, offset string, sortBy *SortBy) ([]byte, error)

func ListAll

func ListAll[T any](site string, sortBy *SortBy, lister func(site string, offset string, sortBy *SortBy) ([]T, string, error)) ([]T, error)

func ListAllOfId

func ListAllOfId[T any](site, id string, sortBy *SortBy, lister func(site string, id string, offset string, sortBy *SortBy) ([]T, string, error)) ([]T, error)

func ResultWithOffset

func ResultWithOffset[R any](result []R, offset, nextOffset string) ([]R, string, error)

func Site

func Site() string

func Token

func Token() string

func UseSite

func UseSite(site string)

func UseToken

func UseToken(token string)

Types

type SortBy

type SortBy struct {
	Asc  bool
	Name string

	AfterDate    *time.Time
	UpdatedAfter bool
}

func DefaultSortBy

func DefaultSortBy() *SortBy

Jump to

Keyboard shortcuts

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