cvr

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

Go API for cvr.dev

Tests

The official cvr.dev Go client library.

cvr.dev is a web service that maintains an updated cache of the Danish CVR registry.

We aim to provide a much simpler and more modern API compared to CVR's own Elastic Search solution. Our focus is on high availability and robustness, making it as easy and reliable as possible to retrieve data about Danish companies from the CVR database.

Installation

Make sure that you have go installed, and then run the following in your project folder:

go get -u github.com/cvr-dev/cvr.dev-go

Also: make sure that your project uses go modules.

Docs

The Go API is available at pkg.go.dev. The HTTP API is available at docs.cvr.dev.

Usage

In the cmd/example dir there's a simple example program that verifies that your API key works and fetches different data from the server.

package main

import (
	"fmt"
	"log"
	"os"

	"github.com/cvr-dev/cvr.dev-go"
)

func main() {
	c := cvr.NewClient(os.Getenv("CVR_DEV_TEST_API_KEY"))

	err := c.TestAPIKey()
	if err != nil {
		log.Printf("Failed to authorize: %s", err)
		return
	}
	log.Printf("Your API key is a-ok!")

	virksomheder, err := c.CVRVirksomhederByCVRNumre(10103940)
	if err != nil {
		log.Fatal(err)
	}
	for _, v := range virksomheder {
		fmt.Printf("Virksomhed: %s (%d)\n", v.VirksomhedMetadata.NyesteNavn.Navn, v.CVRNummer)
	}

	produktionsenheder, err := c.CVRProduktionsenhederByPNumre(1003388394)
	if err != nil {
		log.Fatal(err)
	}
	for _, p := range produktionsenheder {
		fmt.Printf("Produktionsenhed: %s (%d)\n", p.Metadata.NyesteNavn.Navn, p.PNummer)
	}

}

Test

This project has two types of tests: live tests and local tests. The live tests are run against our live servers and require that you set a valid API key in the environment variable CVR_DEV_TEST_API_KEY. When at some point we start charging money for using the service, these tests will count towards your usage.

If you do not wish to run the live tests, you must add the -short flag:

$ go test ./... -short

If you wish to all of the tests, you should use:

$ go test ./...

Alternatives

Alternatives to cvr.dev include:

Documentation

Index

Constants

View Source
const (
	APIBaseAddress          = "https://api.cvr.dev"
	HTTPAuthorizationHeader = "Authorization"
)
View Source
const (
	CVRDateFormat1 = time.RFC3339
	CVRDateFormat2 = "2006-01-02T15:04:05+00:04:05"
)

Variables

View Source
var (
	ErrUnauthorized = errors.New("unauthorized")
	ErrNotFound     = errors.New("not found")
)

Functions

This section is empty.

Types

type CVRDato

type CVRDato time.Time

func (*CVRDato) UnmarshalJSON

func (d *CVRDato) UnmarshalJSON(data []byte) error

type Client

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

Client provides functionality to request data from cvr.dev.

func NewClient

func NewClient(apiKey string) *Client

NewClient returns a client sending requests to the cvr.dev servers.

func NewClientBaseAddress

func NewClientBaseAddress(apiKey string, apiBaseAddress string) *Client

NewClientBaseAddress returns a Client sending requests to the given apiBaseAddress.

func (*Client) CVRProduktionsenhederByAdresse

func (c *Client) CVRProduktionsenhederByAdresse(adresse string) ([]Produktionsenhed, error)

func (*Client) CVRProduktionsenhederByPNumre

func (c *Client) CVRProduktionsenhederByPNumre(pNumre ...int) ([]Produktionsenhed, error)

CVRProduktionsenhederByPNumre returns a list of Produktionsenheder with the given CVR numre. At most 10 produktionsenheder can be requested at once. NOTE: this data originates directly from CVR and is not validated in any way.

func (*Client) CVRVirksomhederByCVRNumre

func (c *Client) CVRVirksomhederByCVRNumre(cvrNumre ...int) ([]Virksomhed, error)

CVRVirksomhederByCVRNumre returns a list of Virksomheder with the given CVR numre. At most 10 virksomheder can be requested at once. NOTE: this data originates directly from CVR and is not validated in any way.

func (*Client) CVRVirksomhederByNavn

func (c *Client) CVRVirksomhederByNavn(navn string) ([]Virksomhed, error)

CVRVirksomhederByNavn returns a list of Virksomheder with names similar to the given navn. At most 25 virksomheder are returned. NOTE: this data originates directly from CVR and is not validated in any way.

func (*Client) TestAPIKey

func (c *Client) TestAPIKey() error

TestAPIKey returns nil if Client successfully authenticated with the server.

type Deltager

type Deltager struct {
	Navne        []VirksomhedNavn `json:"navne"`
	Enhedsnummer int              `json:"enhedsNummer"`
	Enhedstype   string           `json:"enhedstype"`
	SidstIndlaest
	SidstOpdateret
	Organisationstype *string `json:"organisationstype"`
	AdresseHemmelig   bool    `json:"adresseHemmelig"`
}

type ErrServerError

type ErrServerError struct {
	Message string
}

func (ErrServerError) Error

func (e ErrServerError) Error() string

type GyldigDato

type GyldigDato time.Time

func (*GyldigDato) MarshalJSON

func (d *GyldigDato) MarshalJSON() ([]byte, error)

func (*GyldigDato) UnmarshalJSON

func (d *GyldigDato) UnmarshalJSON(data []byte) error

type Periode

type Periode struct {
	GyldigFra *GyldigDato `json:"gyldigFra"`
	GyldigTil *GyldigDato `json:"gyldigTil"`
}

func (Periode) Less

func (me Periode) Less(you Periode) bool

type Produktionsenhed

type Produktionsenhed struct {
	Aarsbeskaeftigelse      []ProduktionsenhedAarsbeskaeftigelse     `json:"aarsbeskaeftigelse"`
	Attributter             []ProduktionsenhedAttribut               `json:"attributter"`
	Beliggenhedsadresse     []ProduktionsenhedAdresse                `json:"beliggenhedsadresse"`
	Bibranche1              []ProduktionsenhedBranche                `json:"bibranche1"`
	Bibranche2              []ProduktionsenhedBranche                `json:"bibranche2"`
	Bibranche3              []ProduktionsenhedBranche                `json:"bibranche3"`
	BrancheAnsvarskode      *int                                     `json:"brancheAnsvarskode"`
	DataAdgang              int                                      `json:"dataAdgang"`
	DeltagerRelation        []ProduktionsenhedDeltagerRelation       `json:"deltagerRelation"`
	ElektroniskPost         []ProduktionsenhedKontaktoplysning       `json:"elektroniskPost"`
	Enhedsnummer            int                                      `json:"enhedsNummer"`
	Enhedstype              string                                   `json:"enhedstype"`
	FejlBeskrivelse         *string                                  `json:"fejlBeskrivelse"`
	FejlRegistreret         bool                                     `json:"fejlRegistreret"`
	FejlVedIndlaesning      bool                                     `json:"fejlVedIndlaesning"`
	Hovedbranche            []ProduktionsenhedBranche                `json:"hovedbranche"`
	Kvartalsbeskaeftigelse  []ProduktionsenhedKvartalsbeskaeftigelse `json:"kvartalsbeskaeftigelse"`
	Livsforloeb             []ProduktionsenhedLivsforloeb            `json:"livsforloeb"`
	NaermesteFremtidigeDato *string                                  `json:"naermesteFremtidigeDato"`
	Navne                   []ProduktionsenhedNavn                   `json:"navne"`
	PNummer                 int                                      `json:"pNummer"`
	Postadresse             []ProduktionsenhedAdresse                `json:"postadresse"`
	Metadata                ProduktionsenhedMetadata                 `json:"produktionsEnhedMetadata"`
	Reklamebeskyttet        bool                                     `json:"reklamebeskyttet"`
	SamtID                  int                                      `json:"samtId"`
	SidstIndlaest
	SidstOpdateret
	TelefaxNummer       []VirksomhedKontaktoplysning          `json:"telefaxNummer"`
	TelefonNummer       []VirksomhedKontaktoplysning          `json:"telefonNummer"`
	Virksomhedsrelation []ProduktionsenhedVirksomhedsrelation `json:"virksomhedsrelation"`

	RawJSON []byte
}

type ProduktionsenhedAarsbeskaeftigelse

type ProduktionsenhedAarsbeskaeftigelse struct {
	Aar                             int      `json:"aar"`
	AntalAarsvaerk                  *float32 `json:"antalAarsvaerk"`
	AntalAnsatte                    *int     `json:"antalAnsatte"`
	AntalInklusivEjere              *int     `json:"antalInklusivEjere"`
	IntervalKodeAntalAarsvaerk      string   `json:"intervalKodeAntalAarsvaerk"`
	IntervalKodeAntalAnsatte        string   `json:"intervalKodeAntalAnsatte"`
	IntervalKodeAntalInklusiveEjere string   `json:"intervalKodeAntalInklusivEjere"`
	SidstOpdateret
}

type ProduktionsenhedAdresse

type ProduktionsenhedAdresse struct {
	BogstavFra   *string                 `json:"bogstavFra"`
	BogstavTil   *string                 `json:"bogstavTil"`
	Bynavn       *string                 `json:"bynavn"`
	COnavn       *string                 `json:"conavn"`
	Etage        *string                 `json:"etage"`
	Fritekst     *string                 `json:"fritekst"`
	HusnummerFra *int                    `json:"husnummerFra"`
	AdresseID    *string                 `json:"adresseId"`
	HusnummerTil *int                    `json:"husnummerTil"`
	Kommune      ProduktionsenhedKommune `json:"kommune"`
	Landekode    *string                 `json:"landekode"`
	Periode      `json:"periode"`
	Postboks     *string `json:"postboks"`
	Postdistrikt *string `json:"postdistrikt"`
	Postnummer   int     `json:"postnummer"`
	Sidedoer     *string `json:"sidedoer"`
	SidstOpdateret
	SidstValideret *string `json:"sidstValideret"`
	Vejkode        *int    `json:"vejkode"`
	Vejnavn        *string `json:"vejnavn"`
}

type ProduktionsenhedAttribut

type ProduktionsenhedAttribut struct {
	Sekvensnummer int                              `json:"sekvensnr"`
	Type          string                           `json:"type"`
	Vaerditype    string                           `json:"vaerditype"`
	Vaerdier      []ProduktionsenhedAttributVaerdi `json:"vaerdier"`
}

type ProduktionsenhedAttributVaerdi

type ProduktionsenhedAttributVaerdi struct {
	Vaerdi  string `json:"vaerdi"`
	Periode `json:"periode"`
	SidstOpdateret
}

type ProduktionsenhedBranche

type ProduktionsenhedBranche struct {
	Branchekode  string `json:"branchekode"`
	Branchetekst string `json:"branchetekst"`
	Periode      `json:"periode"`
	SidstOpdateret
}

type ProduktionsenhedDeltagerRelation

type ProduktionsenhedDeltagerRelation struct {
}

type ProduktionsenhedKommune

type ProduktionsenhedKommune struct {
	Kommunekode int    `json:"kommuneKode"`
	KommuneNavn string `json:"kommuneNavn"`
	Periode     `json:"periode"`
	SidstOpdateret
}

type ProduktionsenhedKontaktoplysning

type ProduktionsenhedKontaktoplysning struct {
	Hemmelig         bool   `json:"hemmelig"`
	Kontaktoplysning string `json:"kontaktoplysning"`
	Periode          `json:"periode"`
	SidstOpdateret
}

type ProduktionsenhedKvartalsbeskaeftigelse

type ProduktionsenhedKvartalsbeskaeftigelse struct {
	Aar                             int      `json:"aar"`
	Kvartal                         int      `json:"kvartal"`
	AntalAarsvaerk                  *float32 `json:"antalAarsvaerk"`
	AntalAnsatte                    *int     `json:"antalAnsatte"`
	AntalInklusivEjere              *int     `json:"antalInklusivEjere"`
	IntervalKodeAntalAarsvaerk      *string  `json:"intervalKodeAntalAarsvaerk"`
	IntervalKodeAntalAnsatte        *string  `json:"intervalKodeAntalAnsatte"`
	IntervalKodeAntalInklusiveEjere *string  `json:"intervalKodeAntalInklusivEjere"`
	SidstOpdateret
}

type ProduktionsenhedLivsforloeb

type ProduktionsenhedLivsforloeb struct {
	Periode `json:"periode"`
	SidstOpdateret
}

type ProduktionsenhedMaanedsbeskaeftigelse

type ProduktionsenhedMaanedsbeskaeftigelse struct {
	Aar                        int      `json:"aar"`
	Maaned                     int      `json:"maaned"`
	AntalAarsvaerk             *float32 `json:"antalAarsvaerk"`
	AntalAnsatte               *int     `json:"antalAnsatte"`
	IntervalKodeAntalAarsvaerk *string  `json:"intervalKodeAntalAarsvaerk"`
	IntervalKodeAntalAnsatte   *string  `json:"intervalKodeAntalAnsatte"`
	SidstOpdateret
}

type ProduktionsenhedMetadata

type ProduktionsenhedMetadata struct {
	NyesteAarsbeskaeftigelse        *ProduktionsenhedAarsbeskaeftigelse     `json:"nyesteAarsbeskaeftigelse"`
	NyesteBeliggenhedsadresse       *ProduktionsenhedAdresse                `json:"nyesteBeliggenhedsadresse"`
	NyesteErstMaanedsbeskaeftigelse *ProduktionsenhedMaanedsbeskaeftigelse  `json:"nyesteErstMaanedsbeskaeftigelse"`
	NyesteBibranche1                *ProduktionsenhedBranche                `json:"nyesteBibranche1"`
	NyesteBibranche2                *ProduktionsenhedBranche                `json:"nyesteBibranche2"`
	NyesteBibranche3                *ProduktionsenhedBranche                `json:"nyesteBibranche3"`
	NyesteCVRNummerRelation         *int                                    `json:"nyesteCvrNummerRelation"`
	NyesteHovedbranche              *ProduktionsenhedBranche                `json:"nyesteHovedbranche"`
	NyesteKontaktoplysninger        []string                                `json:"nyesteKontaktoplysninger"`
	NyesteKvartalsbeskaeftigelse    *ProduktionsenhedKvartalsbeskaeftigelse `json:"nyesteKvartalsbeskaeftigelse"`
	NyesteNavn                      ProduktionsenhedNavn                    `json:"nyesteNavn"`
	SammensatStatus                 string                                  `json:"sammensatStatus"`
}

type ProduktionsenhedNavn

type ProduktionsenhedNavn struct {
	Navn    string `json:"navn"`
	Periode `json:"periode"`
	SidstOpdateret
}

type ProduktionsenhedVirksomhedsrelation

type ProduktionsenhedVirksomhedsrelation struct {
	CVRNummer int `json:"cvrNummer"`
	Periode   `json:"periode"`
	SidstOpdateret
}

type SidstIndlaest

type SidstIndlaest struct {
	SidstIndlaest CVRDato `json:"sidstIndlaest"`
}

type SidstOpdateret

type SidstOpdateret struct {
	SidstOpdateret *CVRDato `json:"sidstOpdateret"`
}

type Virksomhed

type Virksomhed struct {
	Aarsbeskaeftigelse   []VirksomhedAarsbeskaeftigelse `json:"aarsbeskaeftigelse"`
	Attributter          []VirksomhedAttribut           `json:"attributter"`
	Beliggenhedsadresser []VirksomhedAdresse            `json:"beliggenhedsadresse"`

	Bibranche1         []VirksomhedBranche `json:"bibranche1"`
	Bibranche2         []VirksomhedBranche `json:"bibranche2"`
	Bibranche3         []VirksomhedBranche `json:"bibranche3"`
	Binavne            []VirksomhedNavn    `json:"binavne"`
	BrancheAnsvarskode *int                `json:"brancheAnsvarskode"`

	CVRNummer int `json:"cvrNummer"`

	DataAdgang       int                          `json:"dataAdgang"`
	DeltagerRelation []VirksomhedDeltagerRelation `json:"deltagerRelation"`
	ElektroniskPost  []VirksomhedKontaktoplysning `json:"elektroniskPost"`
	Enhedsnummer     int                          `json:"enhedsNummer"`
	Enhedstype       string                       `json:"enhedstype"`

	FejlBeskrivelse         *string                            `json:"fejlBeskrivelse"`
	FejlRegistreret         bool                               `json:"fejlRegistreret"`
	FejlVedIndlaesning      bool                               `json:"fejlVedIndlaesning"`
	Fusioner                []VirksomhedFusion                 `json:"fusioner"`
	Hjemmeside              []VirksomhedKontaktoplysning       `json:"hjemmeside"`
	Hovedbranche            []VirksomhedBranche                `json:"hovedbranche"`
	Kvartalsbeskaeftigelse  []VirksomhedKvartalsbeskaeftigelse `json:"kvartalsbeskaeftigelse"`
	Livsforloeb             []VirksomhedLivsforloeb            `json:"livsforloeb"`
	Maanedsbeskaeftigelse   []VirksomhedMaanedsbeskaeftigelse  `json:"maanedsbeskaeftigelse"`
	NaermesteFremtidigeDato *string                            `json:"naermesteFremtidigeDato"`
	Navne                   []VirksomhedNavn                   `json:"navne"`
	ObligatoriskEmail       []VirksomhedObligatoriskEmail      `json:"obligatoriskEmail"`
	PEnheder                []interface{}                      `json:"penheder"`
	Postadresse             []VirksomhedAdresse                `json:"postadresse"`
	RegNummer               []VirksomhedRegNummer              `json:"regNummer"`
	Reklamebeskyttet        bool                               `json:"reklamebeskyttet"`
	SamtID                  int                                `json:"samtId"`

	SekundaertTelefaxNummer []VirksomhedKontaktoplysning `json:"sekundaertTelefaxNummer"`
	SekundaertTelefonNummer []VirksomhedKontaktoplysning `json:"sekundaertTelefonNummer"`
	SidstIndlaest
	SidstOpdateret
	Spaltninger        []VirksomhedSpaltning        `json:"spaltninger"`
	Status             []VirksomhedStatus           `json:"status"`
	TelefaxNummer      []VirksomhedKontaktoplysning `json:"telefaxNummer"`
	TelefonNummer      []VirksomhedKontaktoplysning `json:"telefonNummer"`
	VirkningsAktoer    string                       `json:"virkningsAktoer"`
	VirksomhedMetadata VirksomhedMetadata           `json:"virksomhedMetadata"`
	Virksomhedsstatus  []Virksomhedsstatus          `json:"virksomhedsstatus"`
}

type VirksomhedAarsbeskaeftigelse

type VirksomhedAarsbeskaeftigelse struct {
	Aar                             int      `json:"aar"`
	AntalAarsvaerk                  *float32 `json:"antalAarsvaerk"`
	AntalAnsatte                    *int     `json:"antalAnsatte"`
	AntalInklusivEjere              *int     `json:"antalInklusivEjere"`
	IntervalKodeAntalAarsvaerk      string   `json:"intervalKodeAntalAarsvaerk"`
	IntervalKodeAntalAnsatte        string   `json:"intervalKodeAntalAnsatte"`
	IntervalKodeAntalInklusiveEjere string   `json:"intervalKodeAntalInklusivEjere"`
	SidstOpdateret
}

type VirksomhedAdresse

type VirksomhedAdresse struct {
	AdresseID      *string           `json:"adresseId"`
	BogstavFra     *string           `json:"bogstavFra"`
	BogstavTil     *string           `json:"bogstavTil"`
	Bynavn         *string           `json:"bynavn"`
	COnavn         *string           `json:"conavn"`
	Etage          *string           `json:"etage"`
	Fritekst       *string           `json:"fritekst"`
	HusnummerFra   *int              `json:"husnummerFra"`
	HusnummerTil   *int              `json:"husnummerTil"`
	Kommune        VirksomhedKommune `json:"kommune"`
	Landekode      *string           `json:"landekode"`
	Periode        `json:"periode"`
	Postboks       *string `json:"postboks"`
	Postdistrikt   *string `json:"postdistrikt"`
	Postnummer     int     `json:"postnummer"`
	Sidedoer       *string `json:"sidedoer"`
	SidstOpdateret string  `json:"sidstOpdateret"`
	SidstValideret *string `json:"sidstValideret"`
	Vejkode        *int    `json:"vejkode"`
	Vejnavn        *string `json:"vejnavn"`
}

type VirksomhedAttribut

type VirksomhedAttribut struct {
	Sekvensnummer int                `json:"sekvensnr"`
	Type          string             `json:"type"`
	Vaerdier      []VirksomhedVaerdi `json:"vaerdier"`
	Vaerditype    string             `json:"string"`
}

type VirksomhedBranche

type VirksomhedBranche struct {
	Branchekode  string `json:"branchekode"`
	Branchetekst string `json:"branchetekst"`
	Periode      `json:"periode"`
	SidstOpdateret
}

type VirksomhedDeltagerRelation

type VirksomhedDeltagerRelation struct {
	Deltager       `json:"deltager"`
	Organisationer []VirksomhedOrganisation `json:"organisationer"`
	Kontorsteder   []VirksomhedKontorsted   `json:"kontorsteder"`
}

type VirksomhedFusion

type VirksomhedFusion struct {
	EnhedsNummerOrganisation int                  `json:"enhedsNummerOrganisation"`
	OrganisationsNavn        []VirksomhedNavn     `json:"organisationsNavn"`
	Indgaaende               []VirksomhedAttribut `json:"indgaaende"`
	Udgaaende                []VirksomhedAttribut `json:"udgaaende"`
}

type VirksomhedKommune

type VirksomhedKommune struct {
	Kommunekode int    `json:"kommuneKode"`
	KommuneNavn string `json:"kommuneNavn"`
	Periode     `json:"periode"`
	SidstOpdateret
}

type VirksomhedKontaktoplysning

type VirksomhedKontaktoplysning struct {
	Hemmelig         bool   `json:"hemmelig"`
	Kontaktoplysning string `json:"kontaktoplysning"`
	Periode          `json:"periode"`
	SidstOpdateret
}

type VirksomhedKontorsted

type VirksomhedKontorsted struct{}

type VirksomhedKvartalsbeskaeftigelse

type VirksomhedKvartalsbeskaeftigelse struct {
	Aar                        int     `json:"aar"`
	AntalAarsvaerk             *int    `json:"antalAarsvaerk"`
	AntalAnsatte               *int    `json:"antalAnsatte"`
	IntervalKodeAntalAarsvaerk *string `json:"intervalKodeAntalAarsvaerk"`
	IntervalKodeAntalAnsatte   *string `json:"intervalKodeAntalAnsatte"`
	Kvartal                    int     `json:"kvartal"`
	SidstOpdateret             string  `json:"sidstOpdateret"`
}

type VirksomhedLivsforloeb

type VirksomhedLivsforloeb struct {
	Periode `json:"periode"`
	SidstOpdateret
}

type VirksomhedMaanedsbeskaeftigelse

type VirksomhedMaanedsbeskaeftigelse struct {
	Aar                        int     `json:"aar"`
	AntalAarsvaerk             *int    `json:"antalAarsvaerk"`
	AntalAnsatte               *int    `json:"antalAnsatte"`
	IntervalKodeAntalAarsvaerk *string `json:"intervalKodeAntalAarsvaerk"`
	IntervalKodeAntalAnsatte   *string `json:"intervalKodeAntalAnsatte"`
	Maaned                     int     `json:"maaned"`
	SidstOpdateret             string  `json:"sidstOpdateret"`
}

type VirksomhedMetadata

type VirksomhedMetadata struct {
	NyesteNavn                   VirksomhedNavn                    `json:"nyesteNavn"`
	NyesteBinavne                []string                          `json:"nyesteBinavne"`
	NyesteVirksomhedsform        VirksomhedVirksomhedsform         `json:"nyesteVirksomhedsform"`
	NyesteBeliggenhedsadresse    VirksomhedAdresse                 `json:"nyesteBeliggenhedsadresse"`
	NyesteHovedbranche           VirksomhedBranche                 `json:"nyesteHovedbranche"`
	NyesteBibranche1             VirksomhedBranche                 `json:"nyesteBibranche1"`
	NyesteBibranche2             VirksomhedBranche                 `json:"nyesteBibranche2"`
	NyesteBibranche3             VirksomhedBranche                 `json:"nyesteBibranche3"`
	NyesteStatus                 VirksomhedStatus                  `json:"nyesteStatus"`
	NyesteKontaktoplysninger     []string                          `json:"nyesteKontaktoplysninger"`
	AntalPenheder                int                               `json:"antalPenheder"`
	NyesteAarsbeskaeftigelse     *VirksomhedAarsbeskaeftigelse     `json:"nyesteAarsbeskaeftigelse"`
	NyesteKvartalsbeskaeftigelse *VirksomhedKvartalsbeskaeftigelse `json:"nyesteKvartalsbeskaeftigelse"`
	NyesteMaanedsbeskaeftigelse  *VirksomhedMaanedsbeskaeftigelse  `json:"nyesteMaanedsbeskaeftigelse"`
	SammensatStatus              string                            `json:"sammensatStatus"`
	StiftelsesDato               *GyldigDato                       `json:"stiftelsesDato"`
	VirkningsDato                *GyldigDato                       `json:"virkningsDato"`
}

type VirksomhedMinimal

type VirksomhedMinimal struct {
	CVRNummer        int    `json:"cvrNummer"`
	Reklamebeskyttet bool   `json:"reklamebeskyttet"`
	DataAdgang       int    `json:"dataAdgang"`
	Enhedsnummer     int    `json:"enhedsNummer"`
	Enhedstype       string `json:"enhedstype"`
	SidstIndlaest
	SidstOpdateret
	Navne       []VirksomhedNavn        `json:"navne"`
	Livsforloeb []VirksomhedLivsforloeb `json:"livsforloeb"`
}

type VirksomhedNavn

type VirksomhedNavn struct {
	Navn    string `json:"navn"`
	Periode `json:"periode"`
	SidstOpdateret
}

func (VirksomhedNavn) GetPeriode

func (vn VirksomhedNavn) GetPeriode() Periode

type VirksomhedObligatoriskEmail

type VirksomhedObligatoriskEmail struct {
	Hemmelig         bool   `json:"hemmelig"`
	Kontaktoplysning string `json:"kontaktoplysning"`
	Periode          `json:"periode"`
	SidstOpdateret
}

type VirksomhedOrganisation

type VirksomhedOrganisation struct {
	Enhedsnummer int              `json:"enhedsNummerOrganisation"`
	Hovedtype    string           `json:"hovedtype"`
	Navne        []VirksomhedNavn `json:"organisationsNavn"`
}

type VirksomhedPenhed

type VirksomhedPenhed struct {
	PNummer int `json:"pNummer"`
	Periode `json:"periode"`
	SidstOpdateret
}

type VirksomhedRegNummer

type VirksomhedRegNummer struct {
	RegNummer string `json:"regNummer"`
	Periode   `json:"periode"`
	SidstOpdateret
}

type VirksomhedSpaltning

type VirksomhedSpaltning struct {
	EnhedsNummerOrganisation int                  `json:"enhedsNummerOrganisation"`
	OrganisationsNavn        []VirksomhedNavn     `json:"organisationsNavn"`
	Indgaaende               []VirksomhedAttribut `json:"indgaaende"`
	Udgaaende                []VirksomhedAttribut `json:"udgaaende"`
}

type VirksomhedStatus

type VirksomhedStatus struct {
	Kreditoplysningskode  int     `json:"kreditoplysningskode"`
	Kreditoplysningstekst *string `json:"kreditoplysningstekst"`
	Statuskode            int     `json:"statuskode"`
	Statustekst           *string `json:"statustekst"`
	Periode               `json:"periode"`
	SidstOpdateret
}

type VirksomhedVaerdi

type VirksomhedVaerdi struct {
	Vaerdi  string `json:"vaerdi"`
	Periode `json:"periode"`
	SidstOpdateret
}

type VirksomhedVirksomhedsform

type VirksomhedVirksomhedsform struct {
	AnsvarligDataleverandoer string `json:"ansvarligDataleverandoer"`
	KortBeskrivelse          string `json:"kortBeskrivelse"`
	LangBeskrivelse          string `json:"langBeskrivelse"`
	Virksomhedsformkode      int    `json:"virksomhedsformkode"`
	Periode                  `json:"periode"`
	SidstOpdateret
}

type Virksomhedsstatus

type Virksomhedsstatus struct {
	Status  string `json:"status"`
	Periode `json:"periode"`
	SidstOpdateret
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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