app

package
v0.0.0-...-3fc3764 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Firebase  *firebase.App
	Config    Config
	Firestore *firestore.Client
}

App is main class for functions

func Init

func Init(config Config) (*App, error)

Init initializes the app

func (*App) CheckSecret

func (app *App) CheckSecret(secretKey string) bool

CheckSecret verifies if provided secret matches provided secret keys

func (*App) WriteToFirestore

func (app *App) WriteToFirestore(context context.Context, contents string) error

WriteToFirestore writes a text entry to firestore

type Config

type Config struct {
	FirestoreCollection string
	SecretKeys          string
}

Config is functions main config

Jump to

Keyboard shortcuts

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