-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package utopiago | ||
|
||
// UtopiaClientInterface contains an enumeration of methods | ||
type UtopiaClientInterface interface { | ||
apiQuery(methodName string) map[string]interface{} | ||
// profile | ||
GetProfileStatus() map[string]interface{} | ||
GetSystemInfo() map[string]interface{} | ||
GetOwnContact() map[string]interface{} | ||
// crypton | ||
GetBalance() (float64, error) | ||
UseVoucher(voucherCode string) error | ||
GetFinanceHistory() map[string]interface{} | ||
CheckClientConnection() bool | ||
CreateVoucher(amount float64) error | ||
// channels | ||
SendChannelMessage(channelID, message string) (string, error) | ||
SendChannelPicture(channelID, base64Image, comment, filenameForImage string) (string, error) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package utopiago | ||
|
||
// Query is a filter for API requests | ||
type Query struct { | ||
Method string `json:"method"` | ||
Token string `json:"token"` | ||
Params map[string]interface{} `json:"params"` | ||
} | ||
|
||
// UtopiaClient lets you connect to Utopia Client | ||
type UtopiaClient struct { | ||
Protocol string `json:"protocol"` | ||
Host string `json:"host"` | ||
Token string `json:"token"` | ||
Port int `json:"port"` | ||
} |