directives

package
v0.0.0-...-3534724 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(ctx context.Context, obj interface{}, next graphql.Resolver, requires []gqlapi.RoleEnum) (res interface{}, err error)

Auth 权限验证的directive

func Date

func Date(ctx context.Context, obj interface{}, next graphql.Resolver, format string) (res interface{}, err error)

Date 日期格式化的directive

func EnumInt

func EnumInt(ctx context.Context, obj interface{}, next graphql.Resolver, value int) (res interface{}, err error)

EnumInt 枚举转数字的directive

func Length

func Length(ctx context.Context, obj interface{}, next graphql.Resolver, max int) (res interface{}, err error)

Length 字符串长度限制的directive

func Lower

func Lower(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

Lower 字符串转小写的directive

func Matches

func Matches(ctx context.Context, obj interface{}, next graphql.Resolver, pattern string) (res interface{}, err error)

Matches 字符串正则匹配的directive

func Range

func Range(ctx context.Context, obj interface{}, next graphql.Resolver, begin int, end int) (res interface{}, err error)

Range 数字范围限制的directive

func Rename

func Rename(ctx context.Context, obj interface{}, next graphql.Resolver, to string) (res interface{}, err error)

Rename 改名的directive

func Timestamp

func Timestamp(ctx context.Context, obj interface{}, next graphql.Resolver, format string) (res interface{}, err error)

Timestamp 事件戳的directive

func Trim

func Trim(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

Trim 字符串去首尾空白字符的directive

func Upper

func Upper(ctx context.Context, obj interface{}, next graphql.Resolver) (res interface{}, err error)

Upper 字符串转大写的directive

func Uuid

func Uuid(ctx context.Context, obj interface{}, next graphql.Resolver, name *string, from []*string) (res interface{}, err error)

Uuid UUID的directive

Types

This section is empty.

Jump to

Keyboard shortcuts

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