api

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Router  *mux.Router
	GeoData map[string]models.AreasDataResults
	// contains filtered or unexported fields
}

API provides a struct to wrap the api around

func Setup

func Setup(ctx context.Context, cfg *config.Config, r *mux.Router, rdsStore RDSAreaStore) (*API, error)

Setup function sets up the api and returns an api

type RDSAreaStore added in v0.10.0

type RDSAreaStore interface {
	Init(ctx context.Context, cfg *config.Config) error
	Close()
	GetRelationships(areaCode, relationshipParameter string) ([]*models.AreaBasicData, error)
	ValidateArea(code string) error
	GetArea(ctx context.Context, areaId string) (*models.AreasDataResults, error)
	BuildTables(ctx context.Context, executionList []string) error
	Ping(ctx context.Context) error
	UpsertArea(ctx context.Context, area models.AreaParams) (bool, error)
	GetAncestors(areaID string) ([]models.AreasAncestors, error)
}

RDSAreaStore represents all the required methods from aurora DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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