core

package
v0.0.0-...-fc1953b Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2018 License: GPL-3.0 Imports: 35 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedisManager *rd
View Source
var Render *render

Functions

func AssetsFolder

func AssetsFolder() string

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func GetEnv

func GetEnv(key, fallback string) string

func GetMD5

func GetMD5(data []byte) string

func GetMimeType

func GetMimeType(file multipart.File) string

func GetMimeTypeFromBytes

func GetMimeTypeFromBytes(fileHeader []byte) string

func GetPublicFolder

func GetPublicFolder() string

TODO: Move this into a "public" type system to let me extend the render for easier loading of assets

func GetSaveMode

func GetSaveMode() string

func GetTemplateFilePath

func GetTemplateFilePath(name string) string

TODO: Move template stuff into it's own "render" class

func GetTemplateFolder

func GetTemplateFolder() string

func HashPassword

func HashPassword(password string) (string, error)

func InArray

func InArray(val string, array []string) (exists bool, index int)

TODO: add things we actually need helpers for here

func MimeToExtension

func MimeToExtension(mime string) string

func NewRedis

func NewRedis()

func NewSessions

func NewSessions()

func ResetVersions

func ResetVersions()

func RunningMode

func RunningMode() string

func SendImageToService

func SendImageToService(data []byte, mime string, isGif bool, expressions []string) gs.Packet

Types

type AssetTools

type AssetTools struct {
	// contains filtered or unexported fields
}
var AssetManager *AssetTools

func (*AssetTools) FileContents

func (v *AssetTools) FileContents(fp string) string

func (*AssetTools) GetVersion

func (v *AssetTools) GetVersion(file ...string) string

func (*AssetTools) New

func (v *AssetTools) New()

func (*AssetTools) ReadFileLines

func (v *AssetTools) ReadFileLines(path string) ([]string, error)

is always a comment in all files we read by lines...

type HeaderMetaData

type HeaderMetaData struct {
	Title       string
	Image       string
	Desc        string
	SiteName    string
	URL         string
	ImageWidth  int
	ImageHeight int
}

type Session

type Session struct {
	Session  *sess.Sessions
	Database *redis.Database
}
var SessionManager *Session

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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