odataClient

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ODataClient

type ODataClient interface {
	AddHeader(key string, value string)
}

ODataClient represents a connection to the OData REST API

func New

func New(baseUrl string) ODataClient

type ODataDataSet

type ODataDataSet[ModelT any, Def ODataModelDefinition[ModelT]] interface {
	Single(id int) (ModelT, error)
	List(filter ODataFilter) (<-chan ModelT, <-chan error)
	// contains filtered or unexported methods
}

func NewDataSet

func NewDataSet[ModelT any, Def ODataModelDefinition[ModelT]](client ODataClient, modelDefinition Def) ODataDataSet[ModelT, Def]

type ODataFilter

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

type ODataModelCollection

type ODataModelCollection[T any] interface {
	ODataModelDefinition[T]
	DataSet(ODataClient) ODataDataSet[T, ODataModelDefinition[T]]
}

type ODataModelDefinition

type ODataModelDefinition[T any] interface {
	Name() string
	Url() string
}

Jump to

Keyboard shortcuts

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