diff --git a/clientbase/common.go b/clientbase/common.go index f3bb83df..bad9467e 100644 --- a/clientbase/common.go +++ b/clientbase/common.go @@ -34,6 +34,7 @@ type APIBaseClientInterface interface { GetLink(resource types.Resource, link string, respObject interface{}) error Create(schemaType string, createObj interface{}, respObject interface{}) error Update(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error + Replace(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error ByID(schemaType string, id string, respObject interface{}) error Delete(existing *types.Resource) error Reload(existing *types.Resource, output interface{}) error @@ -326,6 +327,10 @@ func (a *APIBaseClient) Update(schemaType string, existing *types.Resource, upda return a.Ops.DoUpdate(schemaType, existing, updates, respObject) } +func (a *APIBaseClient) Replace(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error { + return a.Ops.DoReplace(schemaType, existing, updates, respObject) +} + func (a *APIBaseClient) ByID(schemaType string, id string, respObject interface{}) error { return a.Ops.DoByID(schemaType, id, respObject) }