43 lines
803 B
Go
43 lines
803 B
Go
package sati
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
type TokenReissueEvent struct{}
|
|
|
|
type TaskUpdateEvent TaskEntity
|
|
|
|
type CallMessageOutgoing struct {
|
|
Method string `json:"method"`
|
|
Data any `json:"data"`
|
|
}
|
|
|
|
type CallMessageIncoming struct {
|
|
Success bool `json:"success"`
|
|
Data any `json:"data"`
|
|
}
|
|
|
|
type CallError struct {
|
|
Description string `json:"description"`
|
|
Code uint32 `json:"code"`
|
|
}
|
|
|
|
func (c *CallError) Error() string {
|
|
return fmt.Sprintf("sati: api: #%d %s", c.Code, c.Description)
|
|
}
|
|
|
|
type TaskEntity struct {
|
|
Id uint32 `json:"id"`
|
|
Type string `json:"type"`
|
|
State string `json:"state"`
|
|
Cost string `json:"cost"`
|
|
Result any `json:"result"`
|
|
}
|
|
|
|
type CreateTaskResult TaskEntity
|
|
type GetBalanceRequest struct{}
|
|
type GetBalanceResult struct {
|
|
Balance string `json:"balance"`
|
|
}
|