types

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package types 常用类型的定义

Index

Constants

This section is empty.

Variables

Functions

func SexValidator

func SexValidator(v Sex) bool

Types

type Int64s

type Int64s = types.SliceOf[int64]

type Sex

type Sex int8

Sex 性别

const (
	SexUnknown Sex = iota
	SexMale
	SexFemale
)

func ParseSex

func ParseSex(v string) (Sex, error)

func (Sex) IsValid

func (s Sex) IsValid() bool

func (Sex) MarshalCBOR added in v0.8.14

func (s Sex) MarshalCBOR() ([]byte, error)

func (Sex) MarshalText

func (s Sex) MarshalText() ([]byte, error)

func (Sex) OpenAPISchema

func (Sex) OpenAPISchema(s *openapi.Schema)

func (Sex) PrimitiveType

func (Sex) PrimitiveType() core.PrimitiveType

func (*Sex) Scan

func (s *Sex) Scan(src any) error

Scan sql.Scanner

func (Sex) String

func (s Sex) String() string

String fmt.Stringer

func (*Sex) UnmarshalCBOR added in v0.8.14

func (s *Sex) UnmarshalCBOR(p []byte) error

func (*Sex) UnmarshalText

func (s *Sex) UnmarshalText(p []byte) error

func (Sex) Value

func (s Sex) Value() (driver.Value, error)

Value driver.Valuer

type Strings

type Strings = types.SliceOf[string]

Jump to

Keyboard shortcuts

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