method

package
v0.0.0-...-e252b93 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package method contains methods that may be generated for a Go type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter func(o types.Object, methodName string) bool

A Filter is a function that determines whether a method should be written for the supplied object. It returns true if the method should be filtered.

func DefinedOutside

func DefinedOutside(fs *token.FileSet, filename string) Filter

DefinedOutside returns a MethodFilter that returns true if the supplied object has a method with the supplied name that is not defined in the supplied filename. The object's filename is determined using the supplied FileSet.

type New

type New func(f *jen.File, o types.Object)

New is a function that adds a method on the supplied object in the supplied file.

func NewGetBindingPhase

func NewGetBindingPhase(receiver, runtime string) New

NewGetBindingPhase returns a NewMethod that writes a GetBindingPhase method for the supplied Object to the supplied file.

func NewGetClaimReference

func NewGetClaimReference(receiver, core string) New

NewGetClaimReference returns a NewMethod that writes a GetClaimReference method for the supplied Object to the supplied file.

func NewGetNonPortableClassReference

func NewGetNonPortableClassReference(receiver, core string) New

NewGetNonPortableClassReference returns a NewMethod that writes a GetNonPortableClassReference method for the supplied Object to the supplied file.

func NewGetPortableClassItems

func NewGetPortableClassItems(receiver, resource string) New

NewGetPortableClassItems returns a NewMethod that writes a GetPortableClassItems method for the supplied Object to the supplied file.

func NewGetPortableClassReference

func NewGetPortableClassReference(receiver, core string) New

NewGetPortableClassReference returns a NewMethod that writes a GetPortableClassReference method for the supplied Object to the supplied file.

func NewGetReclaimPolicy

func NewGetReclaimPolicy(receiver, runtime, field string) New

NewGetReclaimPolicy returns a NewMethod that writes a GetReclaimPolicy method for the supplied Object to the supplied file. The ReclaimPolicy is returned from the supplied field - typically Spec or SpecTemplate.

func NewGetResourceReference

func NewGetResourceReference(receiver, core string) New

NewGetResourceReference returns a NewMethod that writes a GetResourceReference method for the supplied Object to the supplied file.

func NewGetWriteConnectionSecretToReference

func NewGetWriteConnectionSecretToReference(receiver, core string) New

NewGetWriteConnectionSecretToReference returns a NewMethod that writes a GetWriteConnectionSecretToReference method for the supplied Object to the supplied file.

func NewSetBindingPhase

func NewSetBindingPhase(receiver, runtime string) New

NewSetBindingPhase returns a NewMethod that writes a SetBindingPhase method for the supplied Object to the supplied file.

func NewSetClaimReference

func NewSetClaimReference(receiver, core string) New

NewSetClaimReference returns a NewMethod that writes a SetClaimReference method for the supplied Object to the supplied file.

func NewSetConditions

func NewSetConditions(receiver, runtime string) New

NewSetConditions returns a NewMethod that writes a SetConditions method for the supplied Object to the supplied file.

func NewSetNonPortableClassReference

func NewSetNonPortableClassReference(receiver, core string) New

NewSetNonPortableClassReference returns a NewMethod that writes a SetNonPortableClassReference method for the supplied Object to the supplied file.

func NewSetPortableClassItems

func NewSetPortableClassItems(receiver, resource string) New

NewSetPortableClassItems returns a NewMethod that writes a SetPortableClassItems method for the supplied Object to the supplied file.

func NewSetPortableClassReference

func NewSetPortableClassReference(receiver, core string) New

NewSetPortableClassReference returns a NewMethod that writes a SetPortableClassReference method for the supplied Object to the supplied file.

func NewSetReclaimPolicy

func NewSetReclaimPolicy(receiver, core, field string) New

NewSetReclaimPolicy returns a NewMethod that writes a SetReclaimPolicy method for the supplied Object to the supplied file. The ReclaimPolicy is set in the supplied field - typically Spec or SpecTemplate.

func NewSetResourceReference

func NewSetResourceReference(receiver, core string) New

NewSetResourceReference returns a NewMethod that writes a SetResourceReference method for the supplied Object to the supplied file.

func NewSetWriteConnectionSecretToReference

func NewSetWriteConnectionSecretToReference(receiver, core string) New

NewSetWriteConnectionSecretToReference returns a NewMethod that writes a SetWriteConnectionSecretToReference method for the supplied Object to the supplied file.

type Set

type Set map[string]New

A Set is a map of method names to the New functions that produce them.

func (Set) Write

func (s Set) Write(f *jen.File, o types.Object, mf Filter)

Write the method Set for the supplied Object to the supplied file. Methods are filtered by the supplied Filter.

Jump to

Keyboard shortcuts

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