Version: v0.0.0-...-dc6f9f8 Latest Latest

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

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




View Source
const Monadic = "monadic"


This section is empty.


func IsStructFieldMonadic

func IsStructFieldMonadic(sf reflect.StructField) bool

func MonadicStructField

func MonadicStructField(s reflect.Type) (reflect.StructField, bool)

func StructFieldIsOptional

func StructFieldIsOptional(toField reflect.StructField) bool

func StructFieldIsProtoOpt

func StructFieldIsProtoOpt(sf reflect.StructField) bool

func StructFieldIsProtoOptOrRep

func StructFieldIsProtoOptOrRep(sf reflect.StructField) bool

func StructFieldKoProtoGoName

func StructFieldKoProtoGoName(sf reflect.StructField) (string, bool)

func StructFieldWithNoKoOrProtoName

func StructFieldWithNoKoOrProtoName(sf reflect.StructField) bool


type Gate

type Gate struct {
	Receiver reflect.Type `ko:"name=receiver"`
	Struct   GateStruct   `ko:"name=arg"`

Gate represents a Go struct type with a Play method and Ko function bindings.

func BindGate

func BindGate(receiver reflect.Type) (Gate, error)

BindGate verifies the Go implementation before building and returning a harness object.

func (Gate) Arg

func (f Gate) Arg() GateFields

func (Gate) GoName

func (f Gate) GoName() string

func (Gate) GoPkgPath

func (f Gate) GoPkgPath() string

func (Gate) Returns

func (f Gate) Returns() reflect.Type

type GateField

type GateField struct{ reflect.StructField }

GateField represents a Go struct field with Ko bindings.

func (GateField) GoName

func (f GateField) GoName() string

func (GateField) IsGoExported

func (f GateField) IsGoExported() bool

func (GateField) IsMonadic

func (f GateField) IsMonadic() bool

func (GateField) IsOptional

func (f GateField) IsOptional() bool

func (GateField) IsVisibleInKo

func (f GateField) IsVisibleInKo() bool

func (GateField) KoName

func (f GateField) KoName() string

func (GateField) Name

func (f GateField) Name() KoGoName

func (GateField) String

func (f GateField) String() string

type GateFields

type GateFields []GateField

func StripFields

func StripFields(s reflect.Type) GateFields

func (GateFields) FieldByKoName

func (fields GateFields) FieldByKoName(name string) (int, bool)

func (GateFields) Monadic

func (fields GateFields) Monadic() (int, bool)

type GateStruct

type GateStruct struct{ reflect.Type }

GateStruct represents a Go struct type with Ko bindings.

func BindStruct

func BindStruct(t reflect.Type) (GateStruct, error)

BindStruct verifies that the given Go struct has a correctly-implemented Ko interface (i.e. bindings).

func (GateStruct) Field

func (s GateStruct) Field() GateFields

func (GateStruct) FieldByKoName

func (s GateStruct) FieldByKoName(name string) (GateField, bool)

func (GateStruct) GoName

func (s GateStruct) GoName() string

func (GateStruct) GoPkgPath

func (s GateStruct) GoPkgPath() string

func (GateStruct) String

func (s GateStruct) String() string

type KoGoName

type KoGoName struct {
	Ko string `ko:"name=ko"`
	Go string `ko:"name=go"`

Jump to

Keyboard shortcuts

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