Documentation
¶
Index ¶
- Variables
- func Encode(n ID) string
- type Config
- type Generator
- type ID
- func (id ID) Encode() string
- func (ID) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (id ID) GormValue(ctx context.Context, db *gorm.DB) clause.Expr
- func (id ID) Int64() int64
- func (id *ID) IsValid() bool
- func (id *ID) IsZero() bool
- func (id ID) MarshalBinary() ([]byte, error)
- func (id ID) MarshalJSON() ([]byte, error)
- func (id *ID) Scan(value any) error
- func (id ID) String() string
- func (id *ID) UnmarshalBinary(data []byte) error
- func (id *ID) UnmarshalJSON(data []byte) error
- func (id ID) Value() (driver.Value, error)
- type JSONSyntaxError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidCharacter = errors.New("invalid character for encoding")
)
Functions ¶
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func (*Generator) MustGenerate ¶
type ID ¶
type ID int64
func (ID) GormDBDataType ¶
GormDBDataType gorm 方言映射
func (ID) MarshalBinary ¶
func (ID) MarshalJSON ¶
func (*ID) UnmarshalBinary ¶
func (*ID) UnmarshalJSON ¶
type JSONSyntaxError ¶
type JSONSyntaxError struct {
Original []byte
}
JSON序列化相关
func (JSONSyntaxError) Error ¶
func (e JSONSyntaxError) Error() string
Click to show internal directories.
Click to hide internal directories.