ctx

package
v0.0.0-...-815ad63 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctx

type Ctx struct {
	Context context.Context
	// contains filtered or unexported fields
}

func NewCtx

func NewCtx(c context.Context, log *logCtx.Log) (*Ctx, *resPkg.Status)

return *Ctx HTTP. if create failed return *status.Status error

error status code: 500

func (*Ctx) GetMerchantID

func (c *Ctx) GetMerchantID(resolver identity.IdentityResolver, merchantPublicID string) (merchantID uint64, err *resPkg.Status)

GetMerchantID gets the merchant ID by merchant public ID, and check if user has access to it

func (*Ctx) GetOutletID

func (c *Ctx) GetOutletID(resolver identity.IdentityResolver, outletPublicID string) (outletID uint64, err *resPkg.Status)

GetOutletID gets the outlet ID by outlet public ID, and check if user has access to it

func (*Ctx) Lang

func (c *Ctx) Lang() *lang.Lang

func (*Ctx) Log

func (c *Ctx) Log() *logCtx.Log

func (*Ctx) UserClaims

func (c *Ctx) UserClaims() *jwt.AuthClaims

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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