docs

package
v0.0.0-...-9206383 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(b []byte) []byte

Types

type Client

type Client struct {
	Storage   *storage.Client
	Firestore *firestore.Client
}

func NewClient

func NewClient(projectID string) *Client

func (*Client) EmptyDocument

func (client *Client) EmptyDocument() *Document

func (*Client) NewDocument

func (client *Client) NewDocument(where Place, class string, data interface{}) *Document

type Document

type Document struct {
	Time     string
	Lat, Lng float64
	Place    Place
	Parent   string
	Class    string
	Data     interface{}
	// contains filtered or unexported fields
}

func (*Document) ID

func (self *Document) ID() string

func (*Document) Save

func (self *Document) Save() error

func (*Document) Serialise

func (self *Document) Serialise() (string, error)

func (*Document) TimePrefix

func (self *Document) TimePrefix() string

type Place

type Place struct {
	ID      string
	Details []string
}

func NewPlace

func NewPlace(input string) Place

func (*Place) ParentHashes

func (place *Place) ParentHashes() []string

func (*Place) ToID

func (place *Place) ToID() string

func (*Place) ToJSON

func (place *Place) ToJSON() []byte

func (Place) URI

func (self Place) URI() string

type PlaceInput

type PlaceInput struct {
	Continent     string
	Ocean         string
	Union         string
	Country       string
	CountyOrState string
	District      string
	TownOrCity    string
	Borough       string
	Road          string
	Building      string
	Apartment     string
}

func ExamplePlace

func ExamplePlace() PlaceInput

Jump to

Keyboard shortcuts

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