method

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

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 NewGetActive added in v0.1.10

func NewGetActive(receiver, runtime string) New

NewGetActive returns a NewMethod that writes a GetActive 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 NewGetDeletionPolicy

func NewGetDeletionPolicy(receiver, runtime string) New

NewGetDeletionPolicy returns a NewMethod that writes a GetDeletionPolicy method for the supplied Object to the supplied file.

func NewGetExternalLeafRefs added in v0.1.13

func NewGetExternalLeafRefs(receiver, runtime string) New

NewGetExternalLeafRefs returns a NewMethod that writes a GetExternalLeafRefs method for the supplied Object to the supplied file.

func NewGetNetworkNodeReference added in v0.1.11

func NewGetNetworkNodeReference(receiver, runtime string) New

NewGetNetworkNodeReference returns a NewMethod that writes a GetNetworkNodeReference method for the supplied Object to the supplied file.

func NewGetResourceIndexes added in v0.1.14

func NewGetResourceIndexes(receiver, runtime string) New

NewGetResourceIndexes returns a NewMethod that writes a GetResourceIndexes method for the supplied Object to the supplied file.

func NewGetRootNetworkNodeReference added in v0.1.11

func NewGetRootNetworkNodeReference(receiver, runtime string) New

NewGetRootNetworkNodeReference returns a NewMethod that writes a GetNetworkNodeReference method for the supplied Object to the supplied file. file. Note that unlike NewGetNetworkNodeReference the generated method expects the NetworkNodeReference to be at the root of the struct, not under its Spec field.

func NewGetRootResourceReference added in v0.1.10

func NewGetRootResourceReference(receiver, runtime string) New

NewGetRootResourceReference returns a NewMethod that writes a GetRootResourceReference method for the supplied Object to the supplied file.

func NewGetTarget added in v0.1.12

func NewGetTarget(receiver, runtime string) New

NewGetTarget returns a NewMethod that writes a GetTarget method for the supplied Object to the supplied file.

func NewGetUsers added in v0.1.10

func NewGetUsers(receiver string) New

NewGetUsers returns a NewMethod that writes a GetUsers method for the supplied Object to the supplied file.

func NewManagedGetItems

func NewManagedGetItems(receiver, resource string) New

NewManagedGetItems returns a New that writes a GetItems method for the supplied object to the supplied file.

func NewNetworkNodeUsageGetItems added in v0.1.11

func NewNetworkNodeUsageGetItems(receiver, resource string) New

NewNetworkNodeUsageGetItems returns a New that writes a GetItems method for the supplied object to the supplied file.

func NewSetActive added in v0.1.10

func NewSetActive(receiver, runtime string) New

NewSetActive returns a NewMethod that writes a SetActive 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 NewSetDeletionPolicy

func NewSetDeletionPolicy(receiver, runtime string) New

NewSetDeletionPolicy returns a NewMethod that writes a SetDeletionPolicy method for the supplied Object to the supplied file.

func NewSetExternalLeafRefs added in v0.1.13

func NewSetExternalLeafRefs(receiver, runtime string) New

NewSetExternalLeafRefs returns a NewMethod that writes a SetExternalLeafRefs method for the supplied Object to the supplied file.

func NewSetNetworkNodeReference added in v0.1.11

func NewSetNetworkNodeReference(receiver, runtime string) New

NewSetNetworkNodeReference returns a NewMethod that writes a SetNetworkNodeReference method for the supplied Object to the supplied file.

func NewSetResourceIndexes added in v0.1.14

func NewSetResourceIndexes(receiver, runtime string) New

NewSetResourceIndexes returns a NewMethod that writes a SetResourceIndexes method for the supplied Object to the supplied file.

func NewSetRootNetworkNodeReference added in v0.1.11

func NewSetRootNetworkNodeReference(receiver, runtime string) New

NewSetRootNetworkNodeReference returns a NewMethod that writes a SetNetworkNodeReference method for the supplied Object to the supplied file. Note that unlike NewSetNetworkNodeReference the generated method expects the NetworkNodeReference to be at the root of the struct, not under its Spec field.

func NewSetRootResourceReference added in v0.1.10

func NewSetRootResourceReference(receiver, runtime string) New

NewSetRootResourceReference returns a NewMethod that writes a SetRootResourceReference method for the supplied Object to the supplied file.

func NewSetTarget added in v0.1.12

func NewSetTarget(receiver, runtime string) New

NewSetTarget returns a NewMethod that writes a SetTarget method for the supplied Object to the supplied file.

func NewSetUsers added in v0.1.10

func NewSetUsers(receiver string) New

NewSetUsers returns a NewMethod that writes a SetUsers 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