types

package
v0.0.0-...-bc6c5c1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZeroID = ID(0)
)
View Source
const (
	ZeroKey = Key("")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID int64

func NewID

func NewID(in string) (ID, error)

func (ID) AttributeValue

func (id ID) AttributeValue() *dynamodb.AttributeValue

func (ID) Int64

func (id ID) Int64() int64

func (ID) IsPresent

func (id ID) IsPresent() bool

func (ID) IsZero

func (id ID) IsZero() bool

func (ID) Key

func (id ID) Key() Key

func (*ID) Scan

func (id *ID) Scan(src interface{}) error

func (ID) String

func (id ID) String() string

func (ID) String36

func (id ID) String36() string

func (ID) Value

func (id ID) Value() (driver.Value, error)

type IDFactory

type IDFactory func() ID

func (IDFactory) NewID

func (fn IDFactory) NewID() ID

func (IDFactory) NewKey

func (fn IDFactory) NewKey() Key

type Key

type Key string

func (Key) AttributeValue

func (k Key) AttributeValue() *dynamodb.AttributeValue

func (Key) IsEmpty

func (k Key) IsEmpty() bool

func (Key) IsPresent

func (k Key) IsPresent() bool

func (*Key) Scan

func (k *Key) Scan(src interface{}) error

func (Key) String

func (k Key) String() string

func (Key) Value

func (k Key) Value() (driver.Value, error)

type StringArray

type StringArray []string

func (StringArray) Append

func (arr StringArray) Append(items ...string) StringArray

func (StringArray) Map

func (arr StringArray) Map(fn func(string) string) StringArray

func (*StringArray) Scan

func (arr *StringArray) Scan(in interface{}) error

func (StringArray) Take

func (arr StringArray) Take(n int) StringArray

func (StringArray) Unique

func (arr StringArray) Unique() StringArray

Unique returns a new []string with all the empty duplicate removed

func (StringArray) Value

func (arr StringArray) Value() (driver.Value, error)

type StringSet

type StringSet map[string]struct{}

func (StringSet) Add

func (i StringSet) Add(ids ...string)

func (StringSet) Array

func (i StringSet) Array() StringArray

func (StringSet) Contains

func (i StringSet) Contains(v string) bool

func (StringSet) IsPresent

func (i StringSet) IsPresent() bool

func (StringSet) IsZero

func (i StringSet) IsZero() bool

func (StringSet) Len

func (i StringSet) Len() int

func (StringSet) Overlaps

func (i StringSet) Overlaps(that StringSet) bool

Jump to

Keyboard shortcuts

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