give back deepcopy under ./

This commit is contained in:
Siliang Jiao 2021-01-03 16:37:24 +09:00
parent b5604443fd
commit 078fe7547c
5 changed files with 32 additions and 4 deletions

View File

@ -4,8 +4,8 @@ import (
"encoding/json"
"net/http"
"github.com/xinsnake/databricks-sdk-golang/azure/clusters/models"
"github.com/xinsnake/databricks-sdk-golang/azure/clusters/httpmodels"
"github.com/xinsnake/databricks-sdk-golang/azure/clusters/models"
)
// ClustersAPI exposes the Clusters API
@ -21,12 +21,12 @@ func (a ClustersAPI) init(client DBClient) ClustersAPI {
// Create creates a new Spark cluster
func (a ClustersAPI) Create(cluster httpmodels.CreateReq) (httpmodels.CreateResp, error) {
var createResp httpmodels.CreateResp
resp, err := a.Client.performQuery(http.MethodPost, "/clusters/create", cluster, nil)
if err != nil {
return createResp, err
}
err = json.Unmarshal(resp, &createResp)
return createResp, err
}
@ -186,7 +186,6 @@ func (a ClustersAPI) SparkVersions() ([]httpmodels.SparkVersionsRespItem, error)
return versionsList.Versions, err
}
// Events retrieves a list of events about the activity of a cluster
func (a ClustersAPI) Events(
clusterID string, startTime, endTime int64, order models.ListOrder,

29
deepcopy_generated.go Normal file
View File

@ -0,0 +1,29 @@
// +build !ignore_autogenerated
// Code generated by deepcopy-gen. DO NOT EDIT.
package databricks
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DBClientOption) DeepCopyInto(out *DBClientOption) {
*out = *in
if in.DefaultHeaders != nil {
in, out := &in.DefaultHeaders, &out.DefaultHeaders
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
//in.client.DeepCopyInto(&out.client)
return
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DBClientOption.
func (in *DBClientOption) DeepCopy() *DBClientOption {
if in == nil {
return nil
}
out := new(DBClientOption)
in.DeepCopyInto(out)
return out
}