utils

package
v0.0.0-...-8c65269 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_DIR = ".user_log"
)

Variables

This section is empty.

Functions

func Checkdir

func Checkdir(fPath string, file bool) (string, error)

func GetUser

func GetUser(p string) (string, error)

/Returns the joined path of the target and the user dir

func InitDb

func InitDb(dbname string, table interface{}) (*gorm.DB, error)

func MakeAbsoulute

func MakeAbsoulute(fPath string) (string, error)

func ReadJson

func ReadJson[T any](jsonPath string, records *[]T) error

func ScanDir

func ScanDir(dir_path string) ([]fs.DirEntry, error)

func SendMessage

func SendMessage(body string, email, passw string) error

func WaitingScreen

func WaitingScreen(done chan bool, desc string)

Types

type Email_Creds

type Email_Creds struct {
	Email  string
	Passwd string
}

type FileProps

type FileProps struct {
	*gorm.Model
	DirPath    string
	FilePath   string
	Hash       []byte
	WasChanged bool
}

Jump to

Keyboard shortcuts

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