method

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 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 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 NewGetProviderConfigReference

func NewGetProviderConfigReference(receiver, runtime string) New

NewGetProviderConfigReference returns a NewMethod that writes a GetProviderConfigReference 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 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 NewSetProviderConfigReference

func NewSetProviderConfigReference(receiver, runtime string) New

NewSetProviderConfigReference returns a NewMethod that writes a SetProviderConfigReference 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