typex

package
v0.0.0-...-9fdf600 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalDecimal

func MarshalDecimal(t decimal.Decimal) graphql.Marshaler

func MarshalDuration

func MarshalDuration(t time.Duration) graphql.Marshaler

func MarshalMapString

func MarshalMapString(val map[string]string) graphql.Marshaler

func SimpleStatusValidator

func SimpleStatusValidator(st SimpleStatus) error

SimpleStatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func UnmarshalDecimal

func UnmarshalDecimal(v interface{}) (decimal.Decimal, error)

func UnmarshalDuration

func UnmarshalDuration(v interface{}) (time.Duration, error)

func UnmarshalMapString

func UnmarshalMapString(v interface{}) (map[string]string, error)

Types

type SimpleStatus

type SimpleStatus string

SimpleStatus 用于简单型状态字段枚举型

const (
	SimpleStatusActive     SimpleStatus = "active"
	SimpleStatusInactive   SimpleStatus = "inactive"
	SimpleStatusProcessing SimpleStatus = "processing"
	SimpleStatusDisabled   SimpleStatus = "disabled"
)

UserType values.

func (SimpleStatus) MarshalGQL

func (st SimpleStatus) MarshalGQL(w io.Writer)

MarshalGQL implements graphql.Marshaler interface.

func (SimpleStatus) ProtoAnnotation

func (st SimpleStatus) ProtoAnnotation() schema.Annotation

func (SimpleStatus) String

func (st SimpleStatus) String() string

func (*SimpleStatus) UnmarshalGQL

func (st *SimpleStatus) UnmarshalGQL(val interface{}) error

UnmarshalGQL implements graphql.Unmarshaler interface.

func (SimpleStatus) Values

func (SimpleStatus) Values() []string

Values implements field.EnumValues interface

Jump to

Keyboard shortcuts

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