migrations

package
v0.0.0-...-c97221a Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateRegistrationState

func MigrateRegistrationState(db *storm.DB) error

MigrateRegistrationState run a migration which resets all registration states to "Unregistered".

func MigrateSessionToHistory

func MigrateSessionToHistory(db *storm.DB) error

MigrateSessionToHistory runs the session to session history migration

func SettlementValuesToRows

func SettlementValuesToRows(db *storm.DB) error

SettlementValuesToRows converts settlement history from key-value struct to bucket with rows.

Types

type Migration

type Migration struct {
	Name    string `storm:"id"`
	Date    time.Time
	Migrate func(*storm.DB) error `json:"-"`
}

Migration represents a migration we want to run on bolt db

type Session

type Session struct {
	SessionID       node_session.ID `storm:"id"`
	ProviderID      identity.Identity
	ServiceType     string
	ProviderCountry string
	Started         time.Time
	Status          Status
	Updated         time.Time
	DataStats       connectionstate.Statistics // is updated on disconnect event
}

Session holds structure for saving session history

func (Session) ToSessionHistory

func (s Session) ToSessionHistory() consumer_session.History

ToSessionHistory converts the session struct to a session history struct

type Status

type Status int

Status represents list of possible session statuses

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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