# Functions
ContextWithOperation returns a new context based on the given one with the operation added to it.
ContextWithOptions returns a new context based on the given one with the options added to it.
ContextWithURL returns a new context based on the given one with the URL added to it.
GetObjectIdentifier extracts the identifier of the given object, returning an error if objects GetIdentifier call fails or singleObjectOperation is true and an identifier field is found, but empty.
OperationFromContext returns the current generic client operation from a given context.
OptionsFromContext returns the Options for the current generic client operation.
URLFromContext returns the url originally returned from the Objects EndpointURL method for the current generic client operation.
# Constants
OperationCreate is used to create the given object on the engine.
OperationDestroy is used to destroy the identified object from the engine.
OperationGet is used to retrieve the given identified object from the engine.
OperationList is used to retrieve objects with attributes matching the ones in the given object from the engine.
OperationUpdate is used to update the given identified object on the engine with the newly given data.
# Variables
ErrContextKeyNotSet is returned when trying to retrieve an unset value from a context.
ErrInvalidFilter is returned when the configured filters cannot be applied to a List operation.
ErrInvalidFilterCombination is returned when the configured filters cannot be combined in a single List operation.
ErrKeyAlreadySet is returned when trying to options.Set(key, v, false) and the key that is already set.
ErrKeyNotSet is returned when trying to options.Get(key) a key that is not set.
ErrObjectIdentifierTypeNotSupported is a specialized ErrTypeNotSupport for Objects having a field tagged with `anxcloud:"identifier"` with an unsupported type.
ErrObjectWithMultipleIdentifier is a specialized ErrTypeNotSupport for Objects having multiple fields tagged with `anxcloud:"identifier"`.
ErrObjectWithoutIdentifier is a specialized ErrTypeNotSupport for Objects not having a fields tagged with `anxcloud:"identifier"`.
ErrTypeNotSupported is returned when an argument is of type interface{}, manual type checking via reflection is done and the given arguments type cannot be used.
ErrUnidentifiedObject is returned when an IdentifiedObject was required, but the passed object didn't have the identifying attribute set.
# Structs
CreateOptions contains options valid for Create operations.
DestroyOptions contains options valid for Destroy operations.
GetOptions contains options valid for Get operations.
ListOptions contains options valid for List operations.
UpdateOptions contains options valid for Update operations.
# Interfaces
API is the interface to perform operations on the engine.
CreateOption is the interface options have to implement to be usable with Create operation.
DestroyOption is the interface options have to implement to be usable with Destroy operation.
FilterRequestURLHook is an interface Objects can optionally implement to modify the request URL.
GetOption is the interface options have to implement to be usable with Get operation.
ListOption is the interface options have to implement to be usable with List operation.
Object is the interface all objects to be retrieved by the generic API client are required to implement.
Option is a dummy interface used for any type of request Options.
Options is the interface all operation-specific options implement, making it possible to pass all the specific options to the same functions.
PageInfo contains information about the currently retrieved page and also a way to iterate over this and following pages.
PaginationSupportHook is an interface Objects can optionally implement to enable or disable pagination support for List operations.
RequestBodyHook is an interface Objects can optionally implement to customize request bodies based on the object given by the user of this library.
RequestFilterHook is an interface Objects can optionally implement to modify requests before they are sent to the engine.
ResponseDecodeHook is an interface Objects can optionally implement to change the API response decode behavior.
ResponseFilterHook is an interface Objects can optionally implement to modify response given by the engine before they are decoded.
UpdateOption is the interface options have to implement to be usable with Update operation.
# Type aliases
AnyOption is the interface options have to implement to be usable with any operation.
FilterObject is the same as Object and is intended as a doc-helper, telling the user only it's type and it implementing an interface is important for the generic API client.
IdentifiedObject is the same as Object and is intended as a doc-helper.
ObjectRetriever retrieves an object, parsing it to the correct go type.
Operation to do on the engine with an object.