Documentation ¶
Index ¶
- Constants
- Variables
- func AddrIP(addr net.Addr) string
- func Bool(str string) bool
- func Chunks[T any](slice []T, chunkSize int) [][]T
- func EmailParts(email string) (mailbox, sub, hostname string)
- func EmailsList(mailbox, domain string) string
- func Hostname(email string) string
- func Int(str string) int
- func Int64(str string) int64
- func Mailbox(email string) string
- func MapKeys[V any](data map[string]V) []string
- func ParseSend(commandSlice []string) (to, subject, body string, err error)
- func SanitizeBoolString(str string) string
- func SanitizeDomain(domain string) string
- func SanitizeIntString(str string) string
- func SanitizeStringSlice(str string) string
- func SanitizeURL(str string) string
- func SetDomains(slice []string)
- func SliceString(strs []string) string
- func StringSlice(str string) []string
- func Subaddress(email string) string
- type File
- type Mutex
Constants ¶
const MinSendCommandParts = 3
MinSendCommandParts is minimal count of space-separated parts for !pm send command
Variables ¶
var ErrInvalidArgs = fmt.Errorf("invalid arguments")
ErrInvalidArgs returned when a command's arguments are invalid
Functions ¶
func EmailParts ¶ added in v0.9.16
EmailParts parses email address into mailbox, subaddress, and hostname
func EmailsList ¶ added in v0.9.9
EmailsList returns human-readable list of mailbox's emails for all available domains
func ParseSend ¶ added in v0.9.1
ParseSend parses "!pm send" command, returns to, subject, body, err
func SanitizeBoolString ¶
SanitizeBoolString converts string to boolean and back to string
func SanitizeDomain ¶ added in v0.9.9
SanitizeDomain checks that input domain is available for use
func SanitizeIntString ¶ added in v0.9.9
SanitizeBoolString converts string to integer and back to string
func SanitizeStringSlice ¶ added in v0.9.6
SanitizeBoolString converts string to slice and back to string
func SanitizeURL ¶ added in v0.9.19
SanitizeURL checks that input URL is valid
func SliceString ¶ added in v0.9.15
SliceString converts slice into comma-separated string
func StringSlice ¶ added in v0.9.6
StringSlice converts comma-separated string to slice
func Subaddress ¶ added in v0.9.16
Subaddress returns sub address part form email address