store

package
v0.0.0-...-1ac26ec Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func Clean

func Clean()

remove old / duplicate data

func DefaultSettings

func DefaultSettings()

func ExtractAllLocations

func ExtractAllLocations()

func ExtractInsolvencyPublications

func ExtractInsolvencyPublications()

Fill / update json field for cases into seperate database table to possible create views.

func LoadDays

func LoadDays(days int)

Load publications from past x number of days.

func SetupDB

func SetupDB()

func Start

func Start()

func StatusLine

func StatusLine() string

create status line with database counts.

func Update

func Update()

Look for last publication date of reports lookupnew Reports on a day by day basis. lookup InsolvencyIDs with InsolvencyIDs lookup new/updated Cases.

Types

type InsolvencyLocation

type InsolvencyLocation struct {
	gorm.Model
	InsolvencyID string `gorm:"index"`

	Publication       time.Time
	ReportPublication time.Time
	CaseType          int
	Description       string

	Street       string
	StreetNumber int
	Addition1    string
	Addition2    string
	PostalCode   string `gorm:"index"`
	Town         string

	Name      string
	KvkNumber string

	Details datatypes.JSON
}

func (*InsolvencyLocation) LoadSoap

func (*InsolvencyLocation) TableName

func (r *InsolvencyLocation) TableName() string

type RawCase

type RawCase struct {
	gorm.Model
	InsolvencyID      string `gorm:"index"`
	Publication       time.Time
	ReportPublication time.Time
	CaseType          int
	Description       string
	XML               string
	JSON              datatypes.JSON
}

func (*RawCase) ParseXML

func (r *RawCase) ParseXML() soap.OperationGetCaseReport

func (*RawCase) SetJSON

func (r *RawCase) SetJSON()

convert xml to JSON and set data fields: CaseType, Publication date a json version of the xml Description of the case.

func (*RawCase) TableName

func (r *RawCase) TableName() string

type Report

type Report struct {
	gorm.Model
	Insolvencynumber  string
	Court             string
	Publication       time.Time
	PublicationReport time.Time
	InsolvencyCode    string
	Title             string
	EndReport         string
	InsolvencyID      string
}

func (*Report) LastPublication

func (r *Report) LastPublication()

func (*Report) OldestPublication

func (r *Report) OldestPublication()

func (*Report) TableName

func (r *Report) TableName() string

Jump to

Keyboard shortcuts

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