store

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func InitFirebase

func InitFirebase() error

InitFirebase initializes the Firebase app and assigns it to App

func InitFirebaseOnce added in v0.2.1

func InitFirebaseOnce() error

InitFirebaseOnce initializes Firebase only once

func LoginUser

func LoginUser(email, password string) (map[string]interface{}, error)

LoginUser authenticates a user with email and password

func RegisterUser

func RegisterUser(email, password string) (*auth.UserRecord, error)

RegisterUser registers a new user with email and password

func ResetPassword added in v0.2.1

func ResetPassword(email string) error

ResetPassword sends a password reset email to the specified user

func Save

func Save(group, environment, host, user, alias, password string, isRDP bool)

func UpdateKeyRotationTime added in v0.2.0

func UpdateKeyRotationTime(group, environment, hostname string) error

Types

type Config

type Config struct {
	Groups []Group `yaml:"groups"`
}

type Env

type Env struct {
	Name    string   `yaml:"name"`
	Servers []Server `yaml:"servers"`
}

type Group

type Group struct {
	Name        string `yaml:"name"`
	Environment []Env  `yaml:"environment"`
}

type Server

type Server struct {
	HostName     string    `yaml:"hostname"`
	IP           string    `yaml:"ip"`
	Alias        string    `yaml:"alias"`
	User         string    `yaml:"user"`
	Password     string    `yaml:"password,omitempty"`
	IsRDP        bool      `yaml:"isRDP,omitempty"`
	KeyRotatedAt time.Time `yaml:"keyRotatedAt,omitempty"`
}

Jump to

Keyboard shortcuts

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