forked from Philipp15b/go-steam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.go
67 lines (54 loc) · 1.01 KB
/
types.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
package trade
import (
"github.com/Philipp15b/go-steam/trade/tradeapi"
)
type TradeEndedEvent struct {
Reason TradeEndReason
}
type TradeEndReason uint
const (
TradeEndReason_Complete TradeEndReason = 1
TradeEndReason_Cancelled = 2
TradeEndReason_Timeout = 3
TradeEndReason_Failed = 4
)
func newItem(event *tradeapi.Event) *Item {
return &Item{
event.AppId,
event.ContextId,
event.AssetId,
}
}
type Item struct {
AppId uint32
ContextId uint64
AssetId uint64
}
type ItemAddedEvent struct {
Item *Item
}
type ItemRemovedEvent struct {
Item *Item
}
type ReadyEvent struct{}
type UnreadyEvent struct{}
func newCurrency(event *tradeapi.Event) *Currency {
return &Currency{
event.AppId,
event.ContextId,
event.CurrencyId,
}
}
type Currency struct {
AppId uint32
ContextId uint64
CurrencyId uint64
}
type SetCurrencyEvent struct {
Currency *Currency
OldAmount uint64
NewAmount uint64
}
type ChatEvent struct {
Message string
}