types

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpHandler

type HttpHandler interface {
	Handle(*gin.Context)
}

type ID

type ID int64

func (ID) Equal

func (h ID) Equal(o ID) bool

func (ID) Valid

func (h ID) Valid() bool

type Jsonb

type Jsonb struct {
	json.RawMessage
}

func (*Jsonb) Scan

func (j *Jsonb) Scan(value interface{}) error

func (Jsonb) Valid

func (j Jsonb) Valid() bool

func (Jsonb) Value

func (j Jsonb) Value() (driver.Value, error)

type Quantity

type Quantity struct {
	big.Int
}

func NewQuantity

func NewQuantity(i *big.Int) Quantity

NewQuantity creates a new Quantity from a big.Int

func NewQuantityFromBytes

func NewQuantityFromBytes(bytes []byte) Quantity

NewQuantityFromBytes creates a new Quantity from bytes

func NewQuantityFromInt64

func NewQuantityFromInt64(i int64) Quantity

NewQuantityFromInt64 creates a new Quantity from an int64

func (*Quantity) Add added in v0.6.0

func (b *Quantity) Add(o Quantity) error

Add adds n to q, returning an error if n < 0 or n == nil.

func (*Quantity) Clone added in v0.6.0

func (b *Quantity) Clone() Quantity

Clone copies a Quantity.

func (*Quantity) Cmp added in v0.5.2

func (b *Quantity) Cmp(o Quantity) int

Cmp returns -1 if b < o, 0 if b == o, and 1 if b > o

func (*Quantity) Equals

func (b *Quantity) Equals(o Quantity) bool

Equals returns true iff b equals o

func (*Quantity) GetBigInt added in v0.8.6

func (b *Quantity) GetBigInt() *big.Int

GetBigInt returns big int

func (*Quantity) IsZero added in v0.6.0

func (b *Quantity) IsZero() bool

IsZero returns true iff b equals zero

func (*Quantity) Mul added in v0.6.0

func (b *Quantity) Mul(o Quantity) error

Mul multiplies n with q, returning an error if o < 0

func (*Quantity) Quo added in v0.6.0

func (b *Quantity) Quo(o Quantity) error

Quo divides b with o, returning an error if o <= 0

func (*Quantity) Scan

func (b *Quantity) Scan(value interface{}) error

func (*Quantity) Sub added in v0.6.0

func (b *Quantity) Sub(o Quantity) error

Sub subtracts exactly o from b, returning an error if b < o or o < 0

func (*Quantity) Valid

func (b *Quantity) Valid() bool

Valid returns true iff b >= 0

func (*Quantity) Value

func (b *Quantity) Value() (driver.Value, error)

Value implement sql.Scanner

type SummaryInterval added in v0.4.0

type SummaryInterval string

SummaryInterval type represents summary interval

const (
	IntervalHourly SummaryInterval = "hour"
	IntervalDaily  SummaryInterval = "day"
)

func (SummaryInterval) Equal added in v0.4.0

func (SummaryInterval) ToDuration added in v0.6.0

func (s SummaryInterval) ToDuration() (time.Duration, error)

func (SummaryInterval) Valid added in v0.4.0

func (s SummaryInterval) Valid() bool

type Time

type Time struct {
	time.Time
}

func NewTimeFromTime

func NewTimeFromTime(t time.Time) *Time

func NewTimeFromTimestamp

func NewTimeFromTimestamp(timestamp timestamp.Timestamp) *Time

func (*Time) Duration

func (t *Time) Duration(m Time) int64

func (*Time) Equal

func (t *Time) Equal(m Time) bool

func (*Time) Format added in v0.8.8

func (t *Time) Format(format string) string

func (*Time) IsZero added in v0.7.0

func (t *Time) IsZero() bool

func (*Time) Scan

func (t *Time) Scan(value interface{}) error

func (Time) Value

func (t Time) Value() (driver.Value, error)

type WorkerHandler

type WorkerHandler interface {
	Handle()
}

Jump to

Keyboard shortcuts

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