helpers

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 15 Imported by: 5

Documentation

Index

Constants

View Source
const (
	MailgunEmailDomainENV = "MAILGUN_EMAIL_DOMAIN"
	MailgunApiKeyENV      = "MAILGUN_API_KEY"
)
View Source
const (
	MinWordsInPassPhrase = 11
)

Variables

View Source
var (
	// ErrInvalidPassPhrase indicates that the pass phrase is too short
	ErrInvalidPassPhrase = errors.New("invalid pass phrase")
)

Functions

func CreateMnemonic

func CreateMnemonic(phrase string) (string, error)

func MailgunSimpleEmail

func MailgunSimpleEmail(sender, recipient, subject, body string) error

MailgunSimpleEmail is a minimal email implementation

func RandPasswordString

func RandPasswordString(n int) string

func RandString

func RandString(n int) string

RandString returns a random sting of lenght n based on a..zA..z0..9

func RandStringSimple

func RandStringSimple(n int) string

RandStringSimple returns a random sting of lenght n based on a..z0..9. This is basically the same as RandString but only case-insensitive.

func ReadCredentials

func ReadCredentials(path string) (*settings.Credentials, error)

func ReadDialSettings

func ReadDialSettings(path string) (*settings.DialSettings, error)

func WriteCredentials

func WriteCredentials(cred *settings.Credentials, path string) error

func WriteDialSettings

func WriteDialSettings(ds *settings.DialSettings, path string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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