model

package
v0.0.0-...-161b44b Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dive

type Dive struct {
	Name          string
	StartTime     time.Time
	EndTime       time.Time
	StartLocation appengine.GeoPoint
	EndLocation   appengine.GeoPoint
	Aggregations  []string
}

type DiveImplementation

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

func (DiveImplementation) Create

func (d DiveImplementation) Create(dive Dive, createdAt time.Time) (*datastore.Key, error)

func (DiveImplementation) Get

func (d DiveImplementation) Get(key *datastore.Key) (Dive, error)

func (DiveImplementation) GetAggregation

func (d DiveImplementation) GetAggregation() ([]byte, error)

dive uploads dive is saved as raw in gcs task is pushed to process dive and create aggregations if task fails it will be logged task can be restarted with the information in the logs to rerun

func (DiveImplementation) List

func (d DiveImplementation) List() ([]Dive, error)

func (DiveImplementation) Private

func (d DiveImplementation) Private(dive DivePublic) Dive

func (DiveImplementation) Public

func (d DiveImplementation) Public(dive Dive) DivePublic

func (DiveImplementation) Update

func (d DiveImplementation) Update(updatedDive Dive, updatedAt time.Time) error

type DiveInterface

type DiveInterface interface {
	Create(dive Dive, createdAt time.Time) (*datastore.Key, error)
	Get(key *datastore.Key) (Dive, error)
	GetAggregation() ([]byte, error)
	List() ([]Dive, error)
	Public(dive Dive) DivePublic
	Private(dive DivePublic) Dive
	Update(updatedDive Dive, updatedAt time.Time) error
}

func NewDiveImplementation

func NewDiveImplementation(appEngineCtx context.Context, firebaseApp *firebase.App) DiveInterface

type DivePublic

type DivePublic struct {
	Name             string   `json:"name"`
	StatTime         int64    `json:"startTime"`
	EndTime          int64    `json:"endTime"`
	StartLocationLat float64  `json:"startLocationLat"`
	StartLocationLng float64  `json:"startLocationLng"`
	EndLocationLat   float64  `json:"endLocationLat"`
	EndLocationLng   float64  `json:"endLocationLng"`
	Aggregations     []string `json:"aggregations"`
}

type User

type User struct {
	auth.UserInfo
}

type UserImplementation

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

func (UserImplementation) CreateUpdateFromFirebase

func (u UserImplementation) CreateUpdateFromFirebase(uid string) (User, error)

func (UserImplementation) Get

func (u UserImplementation) Get(uid string) (User, error)

func (UserImplementation) List

func (u UserImplementation) List() ([]User, error)

func (UserImplementation) Private

func (u UserImplementation) Private(user UserPublic) User

func (UserImplementation) Public

func (u UserImplementation) Public(user User) UserPublic

type UserInterface

type UserInterface interface {
	Get(uid string) (User, error)
	List() ([]User, error)
	Public(user User) UserPublic
	Private(user UserPublic) User
	CreateUpdateFromFirebase(uid string) (User, error)
}

func NewUserImplementation

func NewUserImplementation(appCtx context.Context, firebaseApp *firebase.App) UserInterface

type UserPublic

type UserPublic struct {
	auth.UserInfo
}

Jump to

Keyboard shortcuts

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