infrastructure

package
v0.0.0-...-5cc9522 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2015 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDb

func ConnectDb(config *domain.Config) *sql.DB

func NewEmailMessenger

func NewEmailMessenger(ce *domain.ConfigEmail) usecases.Emailer

func NewUploadHandler

func NewUploadHandler(base string) usecases.FileRepo

Types

type DbType

type DbType int
const (
	DbUnknown DbType = iota
	DbSqlite
	DbMysql
)
var CurrentDb DbType

func (DbType) String

func (t DbType) String() string

type EmailMessenger

type EmailMessenger struct {
	// contains filtered or unexported fields
}

func (*EmailMessenger) SendMessage

func (em *EmailMessenger) SendMessage(to, subject, message string) error

type UploadHandler

type UploadHandler struct {
	// contains filtered or unexported fields
}

func (UploadHandler) DeleteFile

func (uh UploadHandler) DeleteFile(file string) error

func (UploadHandler) ListFiles

func (uh UploadHandler) ListFiles() ([]*domain.UploadNode, error)

func (UploadHandler) SaveFile

func (uh UploadHandler) SaveFile(input *os.File) error

func (UploadHandler) SaveMultipartFile

func (uh UploadHandler) SaveMultipartFile(input *multipart.FileHeader) error

Jump to

Keyboard shortcuts

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