tppdb

package
v0.0.0-...-d123447 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const RegisterJsonName = "eba_register.json"

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, connStr string) error

Types

type MongoDb

type MongoDb struct {
	Client   *mongo.Client
	Database *mongo.Database
}

func (*MongoDb) Disconnect

func (db *MongoDb) Disconnect(ctx context.Context) error

func (*MongoDb) SaveTPPs

func (db *MongoDb) SaveTPPs(ctx context.Context, collectionName string, tpps []models.TPP) error

type RawTPP

type RawTPP struct {
	CA_OwnerID            string
	Code                  string
	Type                  string
	AuthorizedAt          *time.Time
	WithdrawnAt           *time.Time
	NationalReferenceCode string
	Names                 []string
	Country               string
	Services              map[string][]models.Service
}

func (*RawTPP) GetLatinName

func (r *RawTPP) GetLatinName() string

func (*RawTPP) GetNativeName

func (r *RawTPP) GetNativeName() string

func (*RawTPP) UnmarshalJSON

func (r *RawTPP) UnmarshalJSON(data []byte) error

type SqliteDb

type SqliteDb struct {
	DB *sql.DB
}

func (*SqliteDb) Disconnect

func (db *SqliteDb) Disconnect(ctx context.Context) error

func (*SqliteDb) SaveTPPs

func (db *SqliteDb) SaveTPPs(ctx context.Context, _ string, tpps []models.TPP) error

Jump to

Keyboard shortcuts

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