request

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Method

type Method[R any] struct {
	APIVersion string
	Method     string
}

Method is a constructor for an RPC request for a specific RPC method and API version.

func (Method[R]) NewRequest

func (cfg Method[R]) NewRequest(h jsonrpc.Handler, params ...jsonrpc.Param) Request[R]

type Relational

type Relational[R any] struct {
	// contains filtered or unexported fields
}

Relational describe an initialized RPC request with access to a request handler and the option to include related resources.

func (Relational[R]) Do

func (req Relational[R]) Do(ctx context.Context) (*R, error)

Do performs the request against the server and returns the result.

func (Relational[R]) Include

func (req Relational[R]) Include(relationships ...string) Relational[R]

Include returns a request that appends the named relationships to the request include list.

type RelationalMethod

type RelationalMethod[R any] struct {
	APIVersion string
	Method     string
}

RelationalMethod is a constructor for an RPC request for a specific RPC method and API version where named relationships can be included.

func (RelationalMethod[R]) NewRequest

func (cfg RelationalMethod[R]) NewRequest(h jsonrpc.Handler, params ...jsonrpc.Param) Relational[R]

type Request

type Request[R any] struct {
	// contains filtered or unexported fields
}

Request describe an initialized RPC request with access to a request handler.

func (Request[R]) Do

func (req Request[R]) Do(ctx context.Context) (*R, error)

Do performs the request against the server and returns the result.

Jump to

Keyboard shortcuts

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