utils

package
v0.0.0-...-b6e0fdc Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertEnvStr

func AssertEnvStr(v string) string

ensures the required string has a value

func AssertString

func AssertString(v string) string

ensures the passed string has a value and is not empty

func CompareHash

func CompareHash(hashed, plaintext string) bool

compare a hashed password with plaintext

func HashPassword

func HashPassword(plaintext string) (string, error)

hashes a password with bcrypt

func IsDevEnv

func IsDevEnv() bool

are we in a development environment

func IsProdEnv

func IsProdEnv() bool

are we in a production environment

func NewS3Config

func NewS3Config() *aws.Config

create and return a new aws config

func ParseURIFromEnv

func ParseURIFromEnv() string

constructs a connection string from env vars

Types

type TempAsset

type TempAsset struct {
	TimeStamp int64
	AssetType string
	Ext       string
	Dir       string
}

func NewTempAsset

func NewTempAsset(file multipart.File, header *multipart.FileHeader, kind string) (*TempAsset, error)

Jump to

Keyboard shortcuts

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