poit

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: MIT Imports: 13 Imported by: 0

README

POIT

Package poit implements a search query to the POIT website, poit.bolagsverket.se.

Documentation

Overview

Package poit implements a search query to the POIT website, poit.bolagsverket.se.

Index

Constants

View Source
const (
	PubliceringsIntervallLastWeek     = "1"
	PubliceringsIntervallLastMonth    = "2"
	PubliceringsIntervallLastQuarter  = "3"
	PubliceringsIntervallLastHalfYear = "5"
	PubliceringsIntervallLastYear     = "6"
)

PubliceringsIntervall

View Source
const (
	AmnesomradeSamtliga        = "-1"
	AmnesomradeKallelser       = "1"
	AmnesomradeBolagsverket    = "2"
	AmnesomradeKonkurser       = "3"
	AmnesomradeFamiljeratt     = "4"
	AmnesomradeSkuldsaneringar = "5"
	AmnesomradeRealEstate      = "8"
)

Amnesomrade

View Source
const (
	KundTypSamtliga = "-1" //Alla
	KundTypKommun   = "33" //Kommun
)

KundTyp

View Source
const BaseURL = "https://poit.bolagsverket.se"

BaseURL is the where POIT is located

View Source
const MaxNumberOfSessions = 20

MaxNumberOfSessions is the max number of parallell sessions

View Source
const PoitURL = "https://poit.bolagsverket.se/poit/PublikPoitIn.do"

PoitURL is where search starts

View Source
const SearchURL = "https://poit.bolagsverket.se/poit/PublikSokKungorelse.do"

SearchURL is Search App

Variables

This section is empty.

Functions

func Search(q Query) chan Announcement

Search returns a channel with announcements

func SearchPermits

func SearchPermits(municipiality string) chan Permit

SearchPermits published by a specific municipiality (kommun)

func SearchWithDetails

func SearchWithDetails(q Query) chan Announcement

SearchWithDetails is same as Search but is also loading separarete document texts

func TrimInnerText

func TrimInnerText(el *html.Node) string

TrimInnerText returns inner text trimmed of space

Types

type Announcement

type Announcement map[string]string

Announcement is a search result item

func (Announcement) ID

func (a Announcement) ID() string

ID returns the announcement ID or empty string

func (Announcement) Name

func (a Announcement) Name() string

Name returns the announcement name or empty string

func (Announcement) Published

func (a Announcement) Published() time.Time

Published returns the published date

func (Announcement) Text

func (a Announcement) Text() []string

Text returns the full text

func (Announcement) URL

func (a Announcement) URL() string

URL returns the URL to announcement text

type Permit

type Permit struct {
	URL            string
	AnnouncementID string
	Name           string
	Address        string
	Status         string
	Record         string
	Description    string
	Published      time.Time

	Estate string
	// contains filtered or unexported fields
}

Permit is a real estate Permit, a special kinf of announcements

type Query

type Query struct {
	// contains filtered or unexported fields
}

Query is a POIT search query

func (Query) AsValues

func (q Query) AsValues() url.Values

AsValues returns query as url.Values

Jump to

Keyboard shortcuts

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