context

package
v0.0.0-...-e2c1db5 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateUrlFromRelativeUrl

func GenerateUrlFromRelativeUrl(baseAppUrl string, partAfterBaseUrl string) string

Types

type BaseAppContext

type BaseAppContext struct {
	AppName string
	Logger  ILogger

	MaxUploadSizeMegaBytes  int64
	MaxProfilePicWidth      uint
	UploadDirectory         string
	ProfilePicsDirectory    string
	UploadedImagesDirectory string
	CopyRightLink           IBaseAppContextEmailLink
	// contains filtered or unexported fields
}
var DefaultBaseAppContext *BaseAppContext

func CreateBaseAppContext

func CreateBaseAppContext(
	appName string, logger ILogger, baseAppUrl string,
	maxUploadSizeMegaBytes int64, maxProfilePicWidth uint,
	uploadDir, profilePicsDir, uploadedImagesDir string,
	copyRightLink IBaseAppContextEmailLink) *BaseAppContext

func (*BaseAppContext) DeletePermanentImage

func (this *BaseAppContext) DeletePermanentImage(fileNameOnly string)

func (*BaseAppContext) DeleteTempImageFile

func (this *BaseAppContext) DeleteTempImageFile(fileNameOnly string)

func (*BaseAppContext) GenerateUrlFromRelativeUrl

func (this *BaseAppContext) GenerateUrlFromRelativeUrl(partAfterBaseUrl string) string

func (*BaseAppContext) GetUploadedImagePermanentFullPath

func (this *BaseAppContext) GetUploadedImagePermanentFullPath(imageFileName string) string

func (*BaseAppContext) MoveTempImageFileToPermanentFolder

func (this *BaseAppContext) MoveTempImageFileToPermanentFolder(tempFileNameOnly, finalImageName string)

func (*BaseAppContext) MoveTempProfilePicToPermanentFolder

func (this *BaseAppContext) MoveTempProfilePicToPermanentFolder(profilePicFileNameOnly string, userId int64)

func (*BaseAppContext) ReadPermanentImageFileBytes

func (this *BaseAppContext) ReadPermanentImageFileBytes(fileNameOnly string) []byte

func (*BaseAppContext) ReadProfilePicFileBytes

func (this *BaseAppContext) ReadProfilePicFileBytes(userId int64) []byte

func (*BaseAppContext) ReadTempImageFileBytes

func (this *BaseAppContext) ReadTempImageFileBytes(fileNameOnly string) []byte

func (*BaseAppContext) UploadAndResizeImageToTempUploadDir

func (this *BaseAppContext) UploadAndResizeImageToTempUploadDir(file multipart.File, originalFilenamePrefix, resizedFilenamePrefix string, maxImageWidth uint) string

func (*BaseAppContext) UploadResizedProfilePic

func (this *BaseAppContext) UploadResizedProfilePic(file multipart.File) string
type IBaseAppContextEmailLink interface {
	GetBeforeLinkText() string
	GetLinkText() string
	GetAfterLinkText() string
	GetHref() string
	GetTargetAttribute() string
	GetStyleAttributeContent() string
}

Jump to

Keyboard shortcuts

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