model

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

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

Go to latest
Published: Jul 10, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidEvents = [2]string{"CLICK", "VIEW"}

ValidEvents defines the events specification which will be considered valid for the application.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID          gocql.UUID `json:"id,omitempty"`
	Username    string     `json:"username,omitempty"`
	Target      string     `json:"target,omitempty"`
	Description string     `json:"description,omitempty"`
	Valid       bool       `json:"valid,omitempty"`
	Timestamp   time.Time  `json:"timestamp,omitempty"`
}

Event holds information about an event on the internet.

  • Identification is a field designed to capture the user identification
  • Target is a field designed to capture the target web page address
  • Event will define what type of event the Event captured
  • Valid is designed to validate Event instances based on the Event field
  • Timestamp will hold the time of the event's occurrence

func (*Event) Validate

func (e *Event) Validate()

Validate uses the ValidEvents array to check if the built Event has a valid Description field.

Jump to

Keyboard shortcuts

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