dataloader

package
v0.0.0-...-fa4d88c Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL          string
	Method       string
	HeaderConfig *HeaderConfig
	SearchParams *navigation.SearchParams
}

type DataLoader

type DataLoader struct {
	URL          string                   `json:"url"`
	SearchParams *navigation.SearchParams `json:"searchParams"`
	Method       string                   `json:"method"`
	Header       *Header                  `json:"header"`
}

func New

func New(c Config) *DataLoader
type Header struct {
	Key   string      `json:"key"`
	Value HeaderValue `json:"value"`
}

type HeaderConfig

type HeaderConfig struct {
	Key         string
	ValueConfig HeaderValueConfig
}

type HeaderValue

type HeaderValue struct {
	Prefix            string `json:"prefix"`
	AppStateFieldPath string `json:"appStateFieldPath"`
}

type HeaderValueConfig

type HeaderValueConfig struct {
	Prefix            string
	AppStateFieldPath string
}

type MediaCardComponent

type MediaCardComponent struct {
	PropsMapper PropsMapper `json:"propsMapper"`
}

type Meta

type Meta struct {
	Headers            []string           `json:"headers,omitempty"`
	Components         map[string]string  `json:"components,omitempty"`
	MediaCardComponent MediaCardComponent `json:"mediaCardComponent"`
	PageHeader         string             `json:"pageHeader,omitempty"`
	Message            string             `json:"message,omitempty"`
	Pagination         Pagination         `json:"pagination,omitempty"`
}

type Pagination

type Pagination struct {
	TotalCount  int   `json:"totalCount"`
	PerPage     int   `json:"perPage"`
	CurrentPage int   `json:"currentPage"`
	RowsPerPage []int `json:"rowsPerPage"`
}

type PropsMapper

type PropsMapper map[string]string

type Response

type Response struct {
	Data interface{} `json:"data"`
	Meta Meta        `json:"meta"`
}

Jump to

Keyboard shortcuts

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