db

package
v0.0.0-...-faf50d8 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddNode

func AddNode(newNode model.Node) (model.Node, error)

func AddPost

func AddPost(newPost model.Post) error

func AddUser

func AddUser(newUser model.User) (model.User, error)

func GetNodeExists

func GetNodeExists(nodeName string) (bool, error)

func GetUserByName

func GetUserByName(userName string) (model.User, error)

func GetUserExists

func GetUserExists(userName string) (bool, error)

Types

type ParsedStamp

type ParsedStamp struct {
	Symbol             string           `json:"symbol"`
	PriceChange        ParsedStampPrice `json:"regularMarketPrice"`
	PriceChangePercent ParsedStampPrice `json:"regularMarketChangePercent"`
	Timestamp          int              `json:"timestamp"`
}

type ParsedStampPrice

type ParsedStampPrice struct {
	Raw float32 `json:"raw"`
}

type ParsedStampVolume

type ParsedStampVolume struct {
	Raw float32 `json:"raw"`
}

type Stamp

type Stamp struct {
	ID                    int32   `json:"id"`
	Symbol                string  `json:"symbol"`
	PriceChange           float32 `json:"priceChange"`
	PriceChangePercentage float32 `json:"priceChangePercentage"`
	Timestamp             int32   `json:"timestamp"`
}

type Subscription

type Subscription struct {
	Endpoint string `json:"endpoint"`
	Auth     string `json:"auth"`
	P256dh   string `json:"p256dh"`
}

type User

type User struct {
	ID               int32  `json:"id"`
	PushSubscription string `json:"pushSubscription"`
	PushInterval     int32  `json:"pushInterval"`
}

Jump to

Keyboard shortcuts

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