types

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package types provides a list of scalar and structure types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments []interface{}

Arguments holds a list of arguments.

func (Arguments) Bool

func (a Arguments) Bool(index int) bool

Bool retrieves an argument of type bool from the list stored under the specified the index.

If the index is present in the list and it is of type bool the value is returned.

Otherwise the type's zero value is returned. To distinguish between an empty value and an unset value, use LookupBool.

func (Arguments) Default

func (a Arguments) Default(index int, def interface{}) interface{}

Default retrieves an argument from the list stored under the specified the index.

If the index is present in the list the value is returned.

Otherwise the specified default value is returned.

func (Arguments) DefaultBool

func (a Arguments) DefaultBool(index int, def bool) bool

DefaultBool retrieves an argument of type bool from the list stored under the specified the index.

If the index is present in the list and it is of type bool the value is returned.

Otherwise the specified default value is returned.

func (Arguments) DefaultFloat32

func (a Arguments) DefaultFloat32(index int, def float32) float32

DefaultFloat32 retrieves an argument of type float32 from the list stored under the specified the index.

If the index is present in the list and it is of type float32 the value is returned.

Otherwise the specified default value is returned.

func (Arguments) DefaultFloat64

func (a Arguments) DefaultFloat64(index int, def float64) float64

DefaultFloat64 retrieves an argument of type float64 from the list stored under the specified the index.

If the index is present in the list and it is of type float64 the value is returned.

Otherwise the specified default value is returned.

func (Arguments) DefaultInt

func (a Arguments) DefaultInt(index int, def int) int

DefaultInt retrieves an argument of type int from the list stored under the specified the index.

If the index is present in the list and it is of type int the value is returned.

Otherwise the specified default value is returned.

func (Arguments) DefaultInt32

func (a Arguments) DefaultInt32(index int, def int32) int32

DefaultInt32 retrieves an argument of type int32 from the list stored under the specified the index.

If the index is present in the list and it is of type int32 the value is returned.

Otherwise the specified default value is returned.

func (Arguments) DefaultInt64

func (a Arguments) DefaultInt64(index int, def int64) int64

DefaultInt64 retrieves an argument of type int64 from the list stored under the specified the index.

If the index is present in the list and it is of type int64 the value is returned.

Otherwise the specified default value is returned.

func (Arguments) DefaultString

func (a Arguments) DefaultString(index int, def string) string

DefaultString retrieves an argument of type string from the list stored under the specified the index.

If the index is present in the list and it is of type string the value is returned.

Otherwise the specified default value is returned.

func (Arguments) Float32

func (a Arguments) Float32(index int) float32

Float32 retrieves an argument of type float32 from the list stored under the specified the index.

If the index is present in the list and it is of type float32 the value is returned.

Otherwise the type's zero value is returned. To distinguish between an empty value and an unset value, use LookupFloat32.

func (Arguments) Float64

func (a Arguments) Float64(index int) float64

Float64 retrieves an argument of type float64 from the list stored under the specified the index.

If the index is present in the list and it is of type float64 the value is returned.

Otherwise the type's zero value is returned. To distinguish between an empty value and an unset value, use LookupFloat64.

func (Arguments) Get

func (a Arguments) Get(index int) interface{}

Get retrieves an argument from the list stored under the specified the index.

If the index is present in the list the value is returned.

Otherwise nil is returned. To distinguish between an empty value and an unset value, use Lookup.

func (Arguments) Int

func (a Arguments) Int(index int) int

Int retrieves an argument of type int from the list stored under the specified the index.

If the index is present in the list and it is of type int the value is returned.

Otherwise the type's zero value is returned. To distinguish between an empty value and an unset value, use LookupInt.

func (Arguments) Int32

func (a Arguments) Int32(index int) int32

Int32 retrieves an argument of type int32 from the list stored under the specified the index.

If the index is present in the list and it is of type int32 the value is returned.

Otherwise the type's zero value is returned. To distinguish between an empty value and an unset value, use LookupInt32.

func (Arguments) Int64

func (a Arguments) Int64(index int) int64

Int64 retrieves an argument of type int64 from the list stored under the specified the index.

If the index is present in the list and it is of type int64 the value is returned.

Otherwise the type's zero value is returned. To distinguish between an empty value and an unset value, use LookupInt64.

func (Arguments) Lookup

func (a Arguments) Lookup(index int) (interface{}, bool)

Lookup retrieves an argument from the list stored under the specified the index.

If the index is present in the list the value is returned and the boolean is true.

Otherwise nil and false are returned.

func (Arguments) LookupBool

func (a Arguments) LookupBool(index int) (bool, bool)

LookupBool retrieves an argument of type bool from the list stored under the specified the index.

If the index is present in the list and it is of type bool the value is returned and the boolean is true.

Otherwise the type's zero value and false are returned.

func (Arguments) LookupFloat32

func (a Arguments) LookupFloat32(index int) (float32, bool)

LookupFloat32 retrieves an argument of type float32 from the list stored under the specified the index.

If the index is present in the list and it is of type float32 the value is returned and the boolean is true.

Otherwise the type's zero value and false are returned.

func (Arguments) LookupFloat64

func (a Arguments) LookupFloat64(index int) (float64, bool)

LookupFloat64 retrieves an argument of type float64 from the list stored under the specified the index.

If the index is present in the list and it is of type float64 the value is returned and the boolean is true.

Otherwise the type's zero value and false are returned.

func (Arguments) LookupInt

func (a Arguments) LookupInt(index int) (int, bool)

LookupInt retrieves an argument of type int from the list stored under the specified the index.

If the index is present in the list and it is of type int the value is returned and the boolean is true.

Otherwise the type's zero value and false are returned.

func (Arguments) LookupInt32

func (a Arguments) LookupInt32(index int) (int32, bool)

LookupInt32 retrieves an argument of type int32 from the list stored under the specified the index.

If the index is present in the list and it is of type int32 the value is returned and the boolean is true.

Otherwise the type's zero value and false are returned.

func (Arguments) LookupInt64

func (a Arguments) LookupInt64(index int) (int64, bool)

LookupInt64 retrieves an argument of type int64 from the list stored under the specified the index.

If the index is present in the list and it is of type int64 the value is returned and the boolean is true.

Otherwise the type's zero value and false are returned.

func (Arguments) LookupString

func (a Arguments) LookupString(index int) (string, bool)

LookupString retrieves an argument of type string from the list stored under the specified the index.

If the index is present in the list and it is of type string the value is returned and the boolean is true.

Otherwise the type's zero value and false are returned.

func (Arguments) String

func (a Arguments) String(index int) string

String retrieves an argument of type string from the list stored under the specified the index.

If the index is present in the list and it is of type string the value is returned.

Otherwise the type's zero value is returned. To distinguish between an empty value and an unset value, use LookupString.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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