api

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: May 17, 2019 License: MIT Imports: 25 Imported by: 1

Documentation

Index

Constants

View Source
const CSRF_COOKIE_NAME = "kc4d018d7e07"

Variables

View Source
var ErrNotFound = errors.New("Not found")
View Source
var TEST_MODE = false

Functions

func NewAPIHandler

func NewAPIHandler(c Conf) (http.Handler, error)

func SendTestEmail added in v0.0.2

func SendTestEmail(c Conf, to string) error

Types

type Conf

type Conf struct {
	Url           string
	Port          int
	DB            string
	DBMaxConns    int
	DBType        string
	OnlyInvited   bool
	ProxyMode     bool
	MailSMTP      *ConfMailSMTP
	MailSparkpost *ConfMailSparkpost
	MailFrom      string
	SessionRedis  *ConfSessionRedis
	Csrf          ConfCsrf
}

type ConfCsrf

type ConfCsrf struct {
	HashKey  string
	BlockKey string
}

type ConfMailSMTP

type ConfMailSMTP struct {
	Server   string
	User     string
	Password string
}

type ConfMailSparkpost

type ConfMailSparkpost struct {
	Key string
	EU  bool
}

type ConfSessionRedis

type ConfSessionRedis struct {
	Server string
	DBId   int
}

type StaticHandler

type StaticHandler struct {
	Dir       string
	IndexFile string
	// contains filtered or unexported fields
}

func NewStaticHandler

func NewStaticHandler() *StaticHandler

func (*StaticHandler) ServeHTTP

func (s *StaticHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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