tracking

package
v0.0.0-...-7c4a8a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventLoader

func NewEventLoader(pubsubEventTopic *pubsub.Topic) *eventLoader

Types

type Event

type Event struct {
	// passed from client
	ID        string    `json:"id"`
	Action    string    `json:"action"`
	CreatedAt time.Time `json:"created_at"`
	Params    string    `json:"params"`

	// fill on backend
	UserID    string `json:"user_id,omitempty"`
	UserAgent string `json:"user_agent"`
	Device    string `json:"devise"`
	IPAddress string `json:"ip"`
}

func NewEvent

func NewEvent(ctx context.Context, gqlEvent gqlmodel.Event) *Event

type EventLoader

type EventLoader interface {
	Load(ctx context.Context, event *Event)
}

type NoopEventLoader

type NoopEventLoader struct {
	LoadedEvents []*Event
}

NoopEventLoader can be used for local env / test

func (*NoopEventLoader) Load

func (l *NoopEventLoader) Load(ctx context.Context, event *Event)

type SearchIDManager

type SearchIDManager struct {
	// contains filtered or unexported fields
}

func NewSearchIDManager

func NewSearchIDManager(isDeployed bool) *SearchIDManager

func (*SearchIDManager) GetSearchID

func (s *SearchIDManager) GetSearchID(ctx context.Context) string

func (*SearchIDManager) Middleware

func (s *SearchIDManager) Middleware() func(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL