blob: 3c9e69f9866f5ba6c1b1b0cae526f5e73261439b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package events // import "github.com/SevereCloud/vksdk/v2/events"
import (
"context"
"github.com/SevereCloud/vksdk/v2/internal"
)
// GroupIDFromContext returns the GroupID from context.
func GroupIDFromContext(ctx context.Context) int {
return ctx.Value(internal.GroupIDKey).(int)
}
// EventIDFromContext returns the EventID from context.
func EventIDFromContext(ctx context.Context) string {
return ctx.Value(internal.EventIDKey).(string)
}
// VersionFromContext returns the version from context.
func VersionFromContext(ctx context.Context) string {
return ctx.Value(internal.EventVersionKey).(string)
}
|