mirror of
https://github.com/simon987/task_tracker.git
synced 2025-12-14 07:19:02 +00:00
Add basic go client
This commit is contained in:
42
client/models.go
Normal file
42
client/models.go
Normal file
@@ -0,0 +1,42 @@
|
||||
package client
|
||||
|
||||
import "github.com/simon987/task_tracker/storage"
|
||||
|
||||
type Worker struct {
|
||||
Id int64 `json:"id"`
|
||||
Alias string `json:"alias,omitempty"`
|
||||
Secret []byte `json:"secret"`
|
||||
}
|
||||
|
||||
type CreateWorkerResponse struct {
|
||||
Ok bool `json:"ok"`
|
||||
Message string `json:"message"`
|
||||
Content struct {
|
||||
Worker *storage.Worker `json:"worker"`
|
||||
} `json:"content"`
|
||||
}
|
||||
|
||||
type AssignTaskResponse struct {
|
||||
Ok bool `json:"ok"`
|
||||
Message string `json:"message"`
|
||||
RateLimitDelay float64 `json:"rate_limit_delay,omitempty"`
|
||||
Content struct {
|
||||
Task *storage.Task `json:"task"`
|
||||
} `json:"content"`
|
||||
}
|
||||
|
||||
type ReleaseTaskResponse struct {
|
||||
Ok bool `json:"ok"`
|
||||
Message string `json:"message"`
|
||||
Content struct {
|
||||
Updated bool `json:"updated"`
|
||||
} `json:"content"`
|
||||
}
|
||||
|
||||
type ProjectSecretResponse struct {
|
||||
Ok bool `json:"ok"`
|
||||
Message string `json:"message"`
|
||||
Content struct {
|
||||
Secret string `json:"secret"`
|
||||
} `json:"content"`
|
||||
}
|
||||
Reference in New Issue
Block a user