mrtype

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2024 License: Apache-2.0 Imports: 5 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolToInt64 added in v0.18.0

func BoolToInt64(value bool) int64

BoolToInt64 - преобразование bool к int64.

func BoolToPointer added in v0.15.3

func BoolToPointer(value bool, required ...bool) *bool

BoolToPointer - required = false by default.

func Int32ToPointer added in v0.15.3

func Int32ToPointer(value int32, required ...bool) *int32

Int32ToPointer - required = false by default.

func Int64ToPointer added in v0.15.3

func Int64ToPointer(value int64, required ...bool) *int64

Int64ToPointer - required = false by default.

func StringToPointer added in v0.15.3

func StringToPointer(value string, required ...bool) *string

StringToPointer - required = false by default.

func TimePointerCopy added in v0.12.0

func TimePointerCopy(value *time.Time) *time.Time

TimePointerCopy - comment func.

func TimeToPointer added in v0.15.3

func TimeToPointer(value time.Time, required ...bool) *time.Time

TimeToPointer - required = false by default.

Types

type File

type File struct {
	FileInfo
	Body io.ReadCloser
}

File - comment struct.

type FileContent added in v0.9.7

type FileContent struct {
	FileInfo
	Body []byte
}

FileContent - comment struct.

type FileHeader added in v0.14.0

type FileHeader struct {
	FileInfo
	Header *multipart.FileHeader
}

FileHeader - comment struct.

type FileInfo

type FileInfo struct {
	ContentType  string     `json:"contentType,omitempty"`
	OriginalName string     `json:"originalName,omitempty"`
	Name         string     `json:"name,omitempty"`
	Path         string     `json:"-"`
	URL          string     `json:"url,omitempty"`
	Size         int64      `json:"size,omitempty"`
	CreatedAt    *time.Time `json:"createdAt,omitempty"`
	UpdatedAt    *time.Time `json:"updatedAt,omitempty"`
}

FileInfo - comment struct.

func (*FileInfo) Original added in v0.14.0

func (f *FileInfo) Original() string

Original - comment method.

type Image added in v0.12.0

type Image struct {
	ImageInfo
	Body io.ReadCloser
}

Image - comment struct.

func (*Image) ToFile added in v0.12.0

func (i *Image) ToFile() File

ToFile - comment method.

type ImageContent added in v0.12.0

type ImageContent struct {
	ImageInfo
	Body []byte
}

ImageContent - comment struct.

func (*ImageContent) ToFile added in v0.12.0

func (i *ImageContent) ToFile() FileContent

ToFile - comment method.

type ImageHeader added in v0.14.0

type ImageHeader struct {
	ImageInfo
	Header *multipart.FileHeader
}

ImageHeader - comment struct.

func (*ImageHeader) ToFile added in v0.14.0

func (i *ImageHeader) ToFile() FileHeader

ToFile - comment method.

type ImageInfo added in v0.9.6

type ImageInfo struct {
	ContentType  string     `json:"contentType,omitempty"`
	OriginalName string     `json:"originalName,omitempty"`
	Name         string     `json:"name,omitempty"`
	Path         string     `json:"-"`
	URL          string     `json:"url,omitempty"`
	Width        int32      `json:"width,omitempty"`
	Height       int32      `json:"height,omitempty"`
	Size         int64      `json:"size,omitempty"`
	CreatedAt    *time.Time `json:"createdAt,omitempty"`
	UpdatedAt    *time.Time `json:"updatedAt,omitempty"`
}

ImageInfo - comment struct.

func (*ImageInfo) Original added in v0.14.0

func (i *ImageInfo) Original() string

Original - comment method.

func (*ImageInfo) ToFile added in v0.12.0

func (i *ImageInfo) ToFile() FileInfo

ToFile - comment method.

type KeyInt32

type KeyInt32 int32

KeyInt32 - целочисленный ID записи.

type KeyInt64

type KeyInt64 int64

KeyInt64 - целочисленный ID записи.

type KeyString

type KeyString string

KeyString - строковый ID записи.

type PageParams

type PageParams struct {
	Index uint64 // pageIndex
	Size  uint64 // pageSize
}

PageParams - параметры для выборки части списка элементов.

type RangeInt64

type RangeInt64 struct {
	Min int64
	Max int64
}

RangeInt64 - comment struct.

type SortParams

type SortParams struct {
	FieldName string               // sortField
	Direction mrenum.SortDirection // sortDirection
}

SortParams - параметры для сортировки списка элементов по указанному полю.

Jump to

Keyboard shortcuts

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