types

package module
v0.0.0-...-348a6a3 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: Apache-2.0 Imports: 5 Imported by: 3

README

types GoDoc

Request param types library for APIBox.

Documentation

Index

Constants

View Source
const (
	MaxUint = ^uint(0)
	MinUint = 0
	MaxInt  = int(MaxUint >> 1)
	MinInt  = -MaxInt - 1
)

REF: http://stackoverflow.com/questions/6878590/the-maximum-value-for-an-int-type-in-go

Variables

This section is empty.

Functions

This section is empty.

Types

type Int32Range

type Int32Range struct {
	Left        int32
	Right       int32
	LeftClosed  bool
	RightClosed bool
}

func ParseInt32Range

func ParseInt32Range(rangeStr string, defaultLeftVal int32, defaultRightVal int32) (*Int32Range, error)

ParseInt32Range parse string and return a *Int32Range.

type Int64Range

type Int64Range struct {
	Left        int64
	Right       int64
	LeftClosed  bool
	RightClosed bool
}

func ParseInt64Range

func ParseInt64Range(rangeStr string, defaultLeftVal int64, defaultRightVal int64) (*Int64Range, error)

ParseInt64Range parse string and return a *Int64Range.

type IntRange

type IntRange struct {
	Left        int
	Right       int
	LeftClosed  bool
	RightClosed bool
}

func ParseIntRange

func ParseIntRange(rangeStr string, defaultLeftVal int, defaultRightVal int) (*IntRange, error)

ParseIntRange parse string and return a *IntRange.

type TimeRange

type TimeRange struct {
	Left        *time.Time
	Right       *time.Time
	LeftClosed  bool
	RightClosed bool
}

func ParseTimeRange

func ParseTimeRange(rangeStr string, layout string, timeLoc *time.Location, defaultLeftVal string, defaultRightVal string) (*TimeRange, error)

ParseTimeRange parse string and return a *TimeRange.

type TimestampRange

type TimestampRange struct {
	Left        uint32
	Right       uint32
	LeftClosed  bool
	RightClosed bool
}

func ParseTimestampRange

func ParseTimestampRange(rangeStr string, defaultLeftVal uint32, defaultRightVal uint32) (*TimestampRange, error)

ParseTimestampRange parse string and return a *TimestampRange.

type Uint32Range

type Uint32Range struct {
	Left        uint32
	Right       uint32
	LeftClosed  bool
	RightClosed bool
}

func ParseUint32Range

func ParseUint32Range(rangeStr string, defaultLeftVal uint32, defaultRightVal uint32) (*Uint32Range, error)

ParseUint32Range parse string and return a *Uint32Range.

type Uint64Range

type Uint64Range struct {
	Left        uint64
	Right       uint64
	LeftClosed  bool
	RightClosed bool
}

func ParseUint64Range

func ParseUint64Range(rangeStr string, defaultLeftVal uint64, defaultRightVal uint64) (*Uint64Range, error)

ParseUint64Range parse string and return a *Uint64Range.

type UintRange

type UintRange struct {
	Left        uint
	Right       uint
	LeftClosed  bool
	RightClosed bool
}

func ParseUintRange

func ParseUintRange(rangeStr string, defaultLeftVal uint, defaultRightVal uint) (*UintRange, error)

ParseUintRange parse string and return a *UintRange.

Jump to

Keyboard shortcuts

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