method

package
v0.0.0-...-c7c4365 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: Apache-2.0 Imports: 5 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 NewGetClassReference

func NewGetClassReference(receiver, core string) New

NewGetClassReference returns a NewMethod that writes a GetClassReference method for the supplied Object to the supplied file.

func NewGetClassSelector

func NewGetClassSelector(receiver, meta string) New

NewGetClassSelector returns a NewMethod that writes a GetClassSelector method for the supplied Object to the supplied file.

func NewGetCondition

func NewGetCondition(receiver, runtime string) New

NewGetCondition returns a NewMethod that writes a GetCondition method for the supplied Object to the supplied file.

func NewGetCredentialsSecretReference

func NewGetCredentialsSecretReference(receiver, runtime string) New

NewGetCredentialsSecretReference returns a NewMethod that writes a GetCredentialsSecretReference 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, runtime string) New

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

func NewLocalGetWriteConnectionSecretToReference

func NewLocalGetWriteConnectionSecretToReference(receiver, runtime string) New

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

func NewLocalSetWriteConnectionSecretToReference

func NewLocalSetWriteConnectionSecretToReference(receiver, runtime string) New

NewLocalSetWriteConnectionSecretToReference returns a NewMethod that writes a SetWriteConnectionSecretToReference 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 NewSetClassReference

func NewSetClassReference(receiver, core string) New

NewSetClassReference returns a NewMethod that writes a SetClassReference method for the supplied Object to the supplied file.

func NewSetClassSelector

func NewSetClassSelector(receiver, meta string) New

NewSetClassSelector returns a NewMethod that writes a SetClassSelector 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 NewSetCredentialsSecretReference

func NewSetCredentialsSecretReference(receiver, runtime string) New

NewSetCredentialsSecretReference returns a NewMethod that writes a SetCredentialsSecretReference 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, runtime 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