eventrepo

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPreviouslyUsedIPs added in v0.10.0

func GetPreviouslyUsedIPs(rlog log.Ext1FieldLogger, tx *sqlx.Tx, mtID mtid.MTID) (ips []string, err error)

GetPreviouslyUsedIPs returns a list of the ips that were previously used with a mytoken

Types

type EventDBObject

type EventDBObject struct {
	api.Event
	Comment string
	MTID    mtid.MTID
	api.ClientMetaData
}

EventDBObject holds information needed for storing an event in the database

func (*EventDBObject) Store

func (e *EventDBObject) Store(rlog log.Ext1FieldLogger, tx *sqlx.Tx) error

Store stores the EventDBObject in the database

type EventEntry added in v0.2.0

type EventEntry struct {
	api.EventEntry `json:",inline"`
	MOMID          mtid.MOMID        `db:"MT_id" json:"mom_id"`
	Time           unixtime.UnixTime `db:"time" json:"time"`
}

EventEntry represents a mytoken event

type EventHistory added in v0.2.0

type EventHistory struct {
	api.EventHistory
	Events []EventEntry `json:"events"`
}

EventHistory is a slice of EventEntry

func GetEventHistory added in v0.2.0

func GetEventHistory(
	rlog log.Ext1FieldLogger, tx *sqlx.Tx, incomingEvents EventHistory, ids ...any,
) (history EventHistory, err error)

GetEventHistory returns the stored EventHistory for a mytoken

func GetEventHistoryChildren added in v0.10.0

func GetEventHistoryChildren(
	rlog log.Ext1FieldLogger, tx *sqlx.Tx, incomingEvents EventHistory, id any,
) (history EventHistory, err error)

GetEventHistoryChildren returns the stored EventHistory for all children of a mytoken ( not including the mytoken's own events)

Jump to

Keyboard shortcuts

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