eventry

package module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: MIT Imports: 5 Imported by: 0

README

Eventry

Go Reference

Eventry is a Go library for logging end users' actions into BigQuery.

Installation

Use the go get command to install Eventry properly.

$ go get gitlab.com/_MyNameIsJakub_/GoEventry

Usage

First of all, you need to create initialize Eventry with your GCP credentials.

eventry.Init(projectID, serviceAccountKey, datasetID)

projectID is your GCP project ID.

serviceAccountKey is a path to your GCP service account key file.

datasetID is your BigQuery dataset ID.

You can log any end user's action to BigQuery via Eventry after that.

eventry.LogEvent(userID, eventName)

Notice

Eventry is an experimental Go library. Don't use it in production, please.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(projectID, serviceAccountKey, datasetID string)

Initialize a new Eventry instance with your GCP credentials.

func LogEvent

func LogEvent(userID, eventName string) error

Log a new end user's action into BigQuery.

Types

type Event

type Event struct {
	UserID,
	EventName string
}

UserID is an internal user identifier (IP address, username, e-mail address, ...). EventName is an internal event identifier. Use camelCase for names of your events, please.

Jump to

Keyboard shortcuts

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