types

package
v1.13.4 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 215

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