tracker

package
v0.0.0-...-932f842 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package tracker is used to save a tracking cookie to web sessions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAuthTracker

func CreateAuthTracker(w http.ResponseWriter, name string, permissions []string) error

CreateAuthTracker returns a tracking cookie using the users authenticated account name.

Types

type Info

type Info struct {
	ID    int64    `json:"id"`
	Name  string   `json:"name"`
	Auth  bool     `json:"auth"`
	Scope []string `json:"scope,omitempty"`
}

Info is used to uniquely identify repeat visitors for clients that use cookies.

func GetTrackingInfo

func GetTrackingInfo(w http.ResponseWriter, r *http.Request) *Info

GetTrackingInfo will return a valid tracking cookie whether it creates its own or returns a previously stored tracking cookie

Jump to

Keyboard shortcuts

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