types

package
v0.0.0-...-d7e0ad7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2014 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package types provides various common types.

Index

Constants

This section is empty.

Variables

NopCloser is an io.Closer that does nothing.

Functions

This section is empty.

Types

type AtomicBool

type AtomicBool struct {
	// contains filtered or unexported fields
}

AtomicBool is an atomic boolean. It can be accessed from concurrent goroutines.

func (*AtomicBool) Get

func (b *AtomicBool) Get() bool

func (*AtomicBool) Set

func (b *AtomicBool) Set(v bool)

type AtomicInt64

type AtomicInt64 struct {
	// contains filtered or unexported fields
}

func (*AtomicInt64) Add

func (a *AtomicInt64) Add(delta int64) int64

func (*AtomicInt64) Get

func (a *AtomicInt64) Get() int64

func (*AtomicInt64) Set

func (a *AtomicInt64) Set(v int64)

type ByTime

type ByTime []time.Time

ByTime sorts times.

func (ByTime) Len

func (s ByTime) Len() int

func (ByTime) Less

func (s ByTime) Less(i, j int) bool

func (ByTime) Swap

func (s ByTime) Swap(i, j int)

type ReadSeekCloser

type ReadSeekCloser interface {
	io.Reader
	io.Seeker
	io.Closer
}

A ReadSeekCloser can Read, Seek, and Close.

type ReaderAtCloser

type ReaderAtCloser interface {
	io.ReaderAt
	io.Closer
}

type Time3339

type Time3339 time.Time

Time3339 is a time.Time which encodes to and from JSON as an RFC 3339 time in UTC.

func ParseTime3339OrNil

func ParseTime3339OrNil(v string) *Time3339

func ParseTime3339OrZero

func ParseTime3339OrZero(v string) Time3339

ParseTime3339OrZero parses a string in RFC3339 format. If it's invalid, the zero time value is returned instead.

func (*Time3339) IsZero

func (t *Time3339) IsZero() bool

IsZero returns whether the time is Go zero or Unix zero.

func (Time3339) MarshalJSON

func (t Time3339) MarshalJSON() ([]byte, error)

func (Time3339) String

func (t Time3339) String() string

func (Time3339) Time

func (t Time3339) Time() time.Time

Time returns the time as a time.Time with slightly less stutter than a manual conversion.

func (*Time3339) UnmarshalJSON

func (t *Time3339) UnmarshalJSON(b []byte) error

Directories

Path Synopsis
Package camtypes is like the types package, but higher-level and contains Camlistore-specific types.
Package camtypes is like the types package, but higher-level and contains Camlistore-specific types.
Package clientconfig provides types related to the client configuration file.
Package clientconfig provides types related to the client configuration file.

Jump to

Keyboard shortcuts

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