daterange

package
v0.0.0-...-ddc4a23 Latest Latest
Warning

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

Go to latest
Published: May 30, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateRange

type DateRange struct {
	Type  RangeType
	From  *time.Time
	Until *time.Time
}

DateRange date range type

func (DateRange) ConfigureQorMeta

func (dateRange DateRange) ConfigureQorMeta(metaor resource.Metaor)

ConfigureQorMeta configure qor meta

func (DateRange) GetDateRange

func (dateRange DateRange) GetDateRange() *DateRange

GetDateRange get date range

func (*DateRange) Scan

func (dateRange *DateRange) Scan(value interface{}) error

Scan scan date range value

func (DateRange) Value

func (dateRange DateRange) Value() (driver.Value, error)

Value get value of dateRange

type DateRanger

type DateRanger interface {
	GetDateRange() *DateRange
}

DateRanger date ranger interface

type RangeType

type RangeType = string

RangeType range type

var (
	// Today today range type
	Today RangeType = "today"
	// Yesterday yesterday
	Yesterday RangeType = "yesterday"
	// LastWeek last week
	LastWeek RangeType = "last_week"
	// LastMonth last month
	LastMonth RangeType = "last_month"
	// Last7Days last 7 days
	Last7Days RangeType = "last_7_days"
	// Last30Days last 30 days
	Last30Days RangeType = "last_30_days"
)

Jump to

Keyboard shortcuts

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