spot

package
v0.0.0-...-bd08887 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Details

type Details struct {
	Name     string                 `json:"name,omitempty"`
	Routes   []Route                `json:"routes,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

Details holds the information about a spot

func (Details) Validate

func (d Details) Validate() error

Validate checks that a spot name does not have a space

type Route

type Route struct {
	Name        string `json:"name,omitempty"`
	Level       string `json:"level,omitempty"`
	Points      int    `json:"points,omitempty"`
	Information string `json:"information,omitempty"`
}

Route holds the information about a route

func NewRoute

func NewRoute(name string, level string, points int, information string) Route

NewRoute returns a new structure filled with given parameters

type Spot

type Spot interface {
	GetRoutes() []Route
	Validate() error
}

Spot holds all the method to handle a spot

Jump to

Keyboard shortcuts

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