api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 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
	// 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, areaStore AreaStore) *API

Setup function sets up the api and returns an api

type AreaStore added in v0.3.0

type AreaStore interface {
	Close(ctx context.Context) error
	Checker(context.Context, *healthcheck.CheckState) error
	GetArea(ctx context.Context, id string) (*models.Area, error)
	GetVersion(id string, versionID int) (*models.Area, error)
	CheckAreaExists(id string) error
	GetAreas(ctx context.Context, offset, limit int) (*models.AreasResults, error)
}

AreaStore represents all the required methods from mongo DB

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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