restmapping

package
v0.118.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDInContext

type IDInContext[CtxKey, EntityIDType any] struct{}

func (IDInContext[CtxKey, EntityIDType]) ContextLookupID

func (cm IDInContext[CtxKey, EntityIDType]) ContextLookupID(ctx context.Context) (EntityIDType, bool)

func (IDInContext[CtxKey, EntityIDType]) ContextWithID

func (cm IDInContext[CtxKey, EntityIDType]) ContextWithID(ctx context.Context, id EntityIDType) context.Context

type IntID

type IntID struct{}

func (IntID) EncodeID

func (m IntID) EncodeID(id int) (string, error)

func (IntID) ParseID

func (m IntID) ParseID(id string) (int, error)

type SetIDByExtIDTag

type SetIDByExtIDTag[Entity, ID any] struct{}

func (SetIDByExtIDTag[Entity, ID]) LookupID

func (m SetIDByExtIDTag[Entity, ID]) LookupID(ent Entity) (ID, bool)

func (SetIDByExtIDTag[Entity, ID]) SetID

func (m SetIDByExtIDTag[Entity, ID]) SetID(ptr *Entity, id ID)

type StringID

type StringID struct{}

func (StringID) EncodeID

func (m StringID) EncodeID(id string) (string, error)

func (StringID) ParseID

func (m StringID) ParseID(id string) (string, error)

Jump to

Keyboard shortcuts

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