resolvers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveUser

func ResolveUser(r *restcli.RestClient, id string) (*types.User, error)

Resolves a user

This tries cache first, then fetches directly

The direct fetch also adds to cache meaning that fetching the same user multiple times will lead to at maximum one API call (assuming the same session)

Types

type Resolvable

type Resolvable[T any] struct {
	// contains filtered or unexported fields
}

func (*Resolvable[T]) Id

func (r *Resolvable[T]) Id() string

Returns the ID of the resolvable entity

func (*Resolvable[T]) Resolve

func (r *Resolvable[T]) Resolve(rc *restcli.RestClient) (*T, error)

Jump to

Keyboard shortcuts

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