types

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 211 modules, 228 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DateFormat = "2006-01-02"

Variables

View Source
var ErrValidationEmail = errors.New("email: failed to pass regex validation")

ErrValidationEmail is the sentinel error returned when an email fails validation

Functions

This section is empty.

Types

type Date

type Date struct {
	time.Time
}

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

func (Date) String added in v1.8.3

func (d Date) String() string

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(data []byte) error

func (*Date) UnmarshalText added in v1.12.0

func (d *Date) UnmarshalText(data []byte) error

type Email added in v1.3.9

type Email string

Email represents an email address. It is a string type that must pass regex validation before being marshalled to JSON or unmarshalled from JSON.

func (Email) MarshalJSON added in v1.3.9

func (e Email) MarshalJSON() ([]byte, error)

func (*Email) UnmarshalJSON added in v1.3.9

func (e *Email) UnmarshalJSON(data []byte) error

type File added in v1.12.0

type File struct {
	// contains filtered or unexported fields
}

func (File) Bytes added in v1.12.0

func (file File) Bytes() ([]byte, error)

func (File) FileSize added in v1.12.0

func (file File) FileSize() int64

func (File) Filename added in v1.12.0

func (file File) Filename() string

func (*File) InitFromBytes added in v1.12.0

func (file *File) InitFromBytes(data []byte, filename string)

func (*File) InitFromMultipart added in v1.12.0

func (file *File) InitFromMultipart(header *multipart.FileHeader)

func (File) MarshalJSON added in v1.12.0

func (file File) MarshalJSON() ([]byte, error)

func (File) Reader added in v1.12.0

func (file File) Reader() (io.ReadCloser, error)

func (*File) UnmarshalJSON added in v1.12.0

func (file *File) UnmarshalJSON(data []byte) error

type UUID added in v1.10.0

type UUID = uuid.UUID

Jump to

Keyboard shortcuts

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