/
actions.go
81 lines (79 loc) 路 3.3 KB
/
actions.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package cointop
// ActionsMap returns a map of all the available actions
func ActionsMap() map[string]bool {
return map[string]bool{
"first_page": true,
"move_to_first_page_first_row": true,
"help": true,
"toggle_show_help": true,
"close_help": true,
"last_page": true,
"move_to_page_first_row": true,
"move_to_page_last_row": true,
"move_to_page_visible_first_row": true,
"move_to_page_visible_last_row": true,
"move_to_page_visible_middle_row": true,
"move_up": true,
"move_down": true,
"next_page": true,
"open_link": true,
"page_down": true,
"page_up": true,
"previous_page": true,
"quit": true,
"quit_view": true,
"refresh": true,
"sort_column_1h_change": true,
"sort_column_24h_change": true,
"sort_column_24h_volume": true,
"sort_column_7d_change": true,
"sort_column_30d_change": true,
"sort_column_1y_change": true,
"sort_column_asc": true,
"sort_column_available_supply": true,
"sort_column_desc": true,
"sort_column_last_updated": true,
"sort_column_market_cap": true,
"sort_column_name": true,
"sort_column_price": true,
"sort_column_rank": true,
"sort_column_symbol": true,
"sort_column_total_supply": true,
"sort_left_column": true,
"sort_right_column": true,
"toggle_row_chart": true,
"open_search": true,
"toggle_favorite": true,
"toggle_show_favorites": true,
"previous_chart_range": true,
"next_chart_range": true,
"first_chart_range": true,
"last_chart_range": true,
"toggle_show_currency_convert_menu": true,
"show_currency_convert_menu": true,
"hide_currency_convert_menu": true,
"toggle_portfolio": true,
"toggle_show_portfolio": true,
"enlarge_chart": true,
"shorten_chart": true,
"toggle_chart_fullscreen": true,
"scroll_right": true,
"show_portfolio_edit_menu": true,
"sort_column_percent_holdings": true,
"toggle_portfolio_balances": true,
"scroll_left": true,
"save": true,
"toggle_table_fullscreen": true,
"toggle_price_alerts": true,
"move_down_or_next_page": true,
"show_price_alert_add_menu": true,
"sort_column_balance": true,
"sort_column_cost": true,
"sort_column_pnl": true,
"sort_column_pnl_percent": true,
}
}
// ActionExists returns true if action exists
func (ct *Cointop) ActionExists(action string) bool {
return ct.ActionsMap[action]
}