@@ -58,36 +58,36 @@ type taskResponse struct {
5858func newTask (client * client , resp * taskResponse ) Task {
5959 return & task {
6060 client : client ,
61- id : resp .ID ,
62- name : resp .Name ,
63- command : resp .Command ,
61+ id : & resp .ID ,
62+ name : & resp .Name ,
63+ command : & resp .Command ,
6464 params : resp .Params ,
65- period : resp .Period ,
66- offset : resp .Offset ,
65+ period : & resp .Period ,
66+ offset : & resp .Offset ,
6767 }
6868}
6969
7070type task struct {
7171 client * client
72- id string
73- name string
74- command string
72+ id * string
73+ name * string
74+ command * string
7575 params json.RawMessage
76- period int64
77- offset float64
76+ period * int64
77+ offset * float64
7878}
7979
8080// Task interface implementation for the task struct.
8181func (t * task ) ID () * string {
82- return & t .id
82+ return t .id
8383}
8484
8585func (t * task ) Name () * string {
86- return & t .name
86+ return t .name
8787}
8888
8989func (t * task ) Command () * string {
90- return & t .command
90+ return t .command
9191}
9292
9393func (t * task ) Params (result interface {}) error {
@@ -98,11 +98,11 @@ func (t *task) Params(result interface{}) error {
9898}
9999
100100func (t * task ) Period () * int64 {
101- return & t .period
101+ return t .period
102102}
103103
104104func (t * task ) Offset () * float64 {
105- return & t .offset
105+ return t .offset
106106}
107107
108108// Tasks retrieves all tasks from the specified database.
@@ -178,28 +178,28 @@ func (c *clientTask) CreateTask(ctx context.Context, databaseName string, option
178178 }
179179 // Prepare the request body
180180 createRequest := struct {
181- ID string `json:"id,omitempty"`
182- Name string `json:"name,omitempty"`
183- Command string `json:"command,omitempty"`
181+ ID * string `json:"id,omitempty"`
182+ Name * string `json:"name,omitempty"`
183+ Command * string `json:"command,omitempty"`
184184 Params json.RawMessage `json:"params,omitempty"`
185- Period int64 `json:"period,omitempty"`
186- Offset float64 `json:"offset,omitempty"`
185+ Period * int64 `json:"period,omitempty"`
186+ Offset * float64 `json:"offset,omitempty"`
187187 }{}
188188
189189 if options .ID != nil {
190- createRequest .ID = * options .ID
190+ createRequest .ID = options .ID
191191 }
192192 if options .Name != nil {
193- createRequest .Name = * options .Name
193+ createRequest .Name = options .Name
194194 }
195195 if options .Command != nil {
196- createRequest .Command = * options .Command
196+ createRequest .Command = options .Command
197197 }
198198 if options .Period != nil {
199- createRequest .Period = * options .Period
199+ createRequest .Period = options .Period
200200 }
201201 if options .Offset != nil {
202- createRequest .Offset = * options .Offset
202+ createRequest .Offset = options .Offset
203203 }
204204
205205 if options .Params != nil {
0 commit comments