converters

package
v0.0.0-...-f45a054 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter interface {

	// Converts from our internal object to what the client wants.
	// It is up to the client to decide what to do with the data.
	// Instead of just passing the specific change we pass the updated internal object.
	// This might be a waste since the client callback will need to determine what has changed.
	// Possible revisit this.  TODO(kpfaulkner)
	ConvertFromObject(object client.ClientObject) error

	// ConvertToObject converts a clients object TO the internal object.
	// It takes in an existing internal object (if one exists) and updates it with the new data.
	// It returns a pointer to the internal object.
	// If the existingObject is nil, then it creates a new one.
	ConvertToObject(objectID string, exitingObject *client.ClientObject, clientObject any) (*client.ClientObject, error)
}

Converter is the general interface clients will need to use to convert from whatever their structure is to our internal ClientObject struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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