app

package
v0.0.0-...-078368f Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: GPL-3.0 Imports: 8 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
	FirebaseAuth *firebaseAuth.Client
	Context      context.Context
	Config       Config
	GitPusher    *gitpusher.GitPusher
	Mutex        sync.Mutex
}

App is main class for functions

func Init

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

Init initializes the app

func (*App) FormatAmendment

func (app *App) FormatAmendment(amendment string) string

FormatAmendment formats amendment with caption

func (*App) IsUserAllowed

func (app *App) IsUserAllowed(email string) bool

IsUserAllowed checks if user is on allowed user list

func (*App) ResetPusher

func (app *App) ResetPusher() error

ResetPusher resets the git pusher

func (*App) SyncLock

func (app *App) SyncLock()

SyncLock locks app synchronisation

func (*App) SyncUnlock

func (app *App) SyncUnlock()

SyncUnlock unlocks app synchronisation

type Config

type Config struct {
	ProjectID               string
	AllowedUserEmails       string
	RepositoryURL           string
	GitBasicAuthUsername    string
	GitBasicAuthPassword    string
	BranchName              string
	CommitName              string
	CommitEmail             string
	CommitMessageFormat     string
	DiaryFilePathFormat     string
	DiaryEntryCaptionFormat string
}

Config is functions main config

Jump to

Keyboard shortcuts

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