discover

package
v0.0.0-...-ca6ad1a Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiscoveredMethod

type DiscoveredMethod struct {
	Method          reflect.Method
	OutputFieldName string // field name on the output struct
}

DiscoveredMethod is a method on the Client struct that was discovered to have the right output type. If the output type was found in a return struct field, that name is specified in OutputFieldName.

func FindDescribeMethod

func FindDescribeMethod(client, targetStruct interface{}) (DiscoveredMethod, error)

func FindListMethod

func FindListMethod(client, targetStruct interface{}) (DiscoveredMethod, error)

func FindListTagsMethod

func FindListTagsMethod(client interface{}) (DiscoveredMethod, error)

func FindMethod

func FindMethod(client, targetStruct interface{}, prefixes []string) (DiscoveredMethod, error)

FindMethod finds a single method and errors out if zero or more than one is discovered.

func FindMethods

func FindMethods(client, targetStruct interface{}, prefixes []string) []DiscoveredMethod

FindMethods returns a slice of methods that return the targetStruct (either directly or as a field of the returned struct) and start with one of the given prefixes.

func MethodByName

func MethodByName(client interface{}, targetStruct interface{}, name string) (DiscoveredMethod, error)

MethodByName returns a method on the client that matches a specific name.

Jump to

Keyboard shortcuts

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