gonavet2

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: BSD-2-Clause Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

GoNavet2

Go Reference

Installation

go get github.com/masv3971/gonavet2

Version 2 - now with JSON!

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Fetch  *fetchService
	Search *searchService
	// contains filtered or unexported fields
}

Client holds navet object

func New

func New(config *Config) (*Client, error)

New creates a new instance of gonavet

type Config

type Config struct {
	Debug             bool
	BaseURL           string `validate:"required"`
	ProxyURL          string
	CertificatePEM    []byte      `validate:"required"`
	PrivateKeyPEM     []byte      `validate:"required"`
	OrgNumber         string      `validate:"required"`
	OrderID           string      `validate:"required"`
	Token             OauthConfig `validate:"required"`
	APIGWClientID     string      `validate:"required"`
	APIGWClientSecret string      `validate:"required"`
}

Config configs New

type OauthConfig added in v0.0.5

type OauthConfig struct {
	Scope        string `default:"fbfuppgoffakt"`
	BaseURL      string
	ClientID     string
	ClientSecret string
	GrantType    string `default:"client_credentials"`
}

type RequestFetchNIN added in v0.0.5

type RequestFetchNIN struct {
	// NINs can consists of personnummer and/or samordningsnummer
	NINs []string `json:"nin" validate:"request, min=1"`
}

type RequestSearchFodelsetid added in v0.0.5

type RequestSearchFodelsetid struct {
	From navettypes.SokvillkorFodelsetidDatum `json:"from" validate:"required"`
	To   navettypes.SokvillkorFodelsetidDatum `json:"to" validate:"required"`
}

RequestSearchFodelsetid input type for search date of birth

type RequestSearchName added in v0.0.5

type RequestSearchName struct {
	GivenName string `json:"given_name" validate:"required_without_all=Surename City"`
	Surname   string `json:"surename" validate:"required_without_all=GivenName City"`
	City      string `json:"city" validate:"required_without_all=GivenName Surename"`
}

type RequestSearchPostal added in v0.0.5

type RequestSearchPostal struct {
	StreetAddress string `json:"street_address"`
	PostalNumber  []int  `json:"postal_number" validate:"omitempty,eq=2"`
	City          string `json:"city"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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