api

package
v0.0.0-...-bbf7e2a Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Middleware

func Middleware(next http.Handler) http.Handler

Types

type CustomClaims

type CustomClaims struct {
	UserType int32  `json:"user_type"`
	Id       string `json:"id"`
	jwt.RegisteredClaims
}

type JwtInfo

type JwtInfo struct {
	Id       string
	Email    string
	UserType int32
}

func ParseJWT

func ParseJWT(tokenStr string) (*JwtInfo, error)

type Resolver

type Resolver struct {
	UserService    proto.UserServiceClient
	ProductService proto.ProductsServiceClient
	OrderService   proto.OrdersServiceClient
}

func (*Resolver) Mutation

func (r *Resolver) Mutation() gql.MutationResolver

Mutation returns gql.MutationResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() gql.QueryResolver

Query returns gql.QueryResolver implementation.

type TokenCtxKey

type TokenCtxKey string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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