backend

package
v0.0.0-...-9ed1330 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Type of backend to use
	Type string
	// Store is the cache implementation to use
	Store cache.Store
}

Config is runtime configuration

type Empty

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

Empty handles Empty queries

func (*Empty) List

func (b *Empty) List(q campwiz.Query) ([]campwiz.Result, error)

List lists available sites

func (*Empty) Name

func (b *Empty) Name() string

Name is a human readable name

type Provider

type Provider interface {
	// Name is a human readable name for a runtime
	Name() string

	// List lists open campsites
	List(q campwiz.Query) ([]campwiz.Result, error)
}

Provider is a common interface for backend providers

func New

func New(c Config) (Provider, error)

New returns an appropriately configured backend

type RAmerica

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

RAmerica handles RAmerica queries

func (*RAmerica) List

func (b *RAmerica) List(q campwiz.Query) ([]campwiz.Result, error)

List lists available sites

func (*RAmerica) Name

func (b *RAmerica) Name() string

Name is a human readable name

type RCalifornia

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

RCalifornia handles RCalifornia queries

func (*RCalifornia) List

func (b *RCalifornia) List(q campwiz.Query) ([]campwiz.Result, error)

List lists available sites

func (*RCalifornia) Name

func (b *RCalifornia) Name() string

Name is a human readable name

type RCaliforniaAdv

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

RCaliforniaAdv handles RCaliforniaAdv queries

func (*RCaliforniaAdv) List

func (b *RCaliforniaAdv) List(q campwiz.Query) ([]campwiz.Result, error)

List lists available sites

func (*RCaliforniaAdv) Name

func (b *RCaliforniaAdv) Name() string

Name is a human readable name

type SanMateoCounty

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

SanMateoCounty handles Santa Mateo County Parks queries

func (*SanMateoCounty) List

func (b *SanMateoCounty) List(q campwiz.Query) ([]campwiz.Result, error)

List lists available sites

func (*SanMateoCounty) Name

func (b *SanMateoCounty) Name() string

Name is a human readable name

type SantaClaraCounty

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

SantaClaraCounty handles SantaClaraCounty queries

func (*SantaClaraCounty) List

List lists available sites

func (*SantaClaraCounty) Name

func (b *SantaClaraCounty) Name() string

Name is a human readable name

Jump to

Keyboard shortcuts

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