bla

package module
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: MIT Imports: 23 Imported by: 1

README

bla

Blog/Lite-CMS build on Automatic static file serving

feature

  • Markdown format, yes!
  • Tags and page
  • WebDav, no git/svn required
  • Automatically build site
  • Customable theme and everything
  • TLS/SSL ready

TODO

  • HTTP jump to HTTPs
  • RPM/Deb pack
  • default doc generate
  • expvar
  • service file
  • sitemap.txt
  • detail document

Documentation

Index

Constants

View Source
const (
	StatusPublic = "public"
)
View Source
const (
	Version = "dev"
)

Variables

This section is empty.

Functions

func ListenAndServe added in v0.1.6

func ListenAndServe(cfgPath string)

func LoadCertificate added in v0.1.6

func LoadCertificate()

func NewAuthRateByIPHandler added in v0.1.1

func NewAuthRateByIPHandler(realm string, origin http.Handler, username, password string, limit int) *authRateByIPHandler

Types

type Config

type Config struct {
	BaseURL  string
	HostName string

	RootPath string
	LinkPath []string

	HomeDocCount int
	Title        string
	UserName     string
	Password     string
}

func DefaultConfig added in v0.1.1

func DefaultConfig() *Config

type Doc

type Doc struct {
	Title     string
	SlugTitle string
	Time      time.Time
	Tags      []string
	Public    bool

	Content string
}

type Handler added in v0.1.1

type Handler struct {
	Cfg *Config
	// contains filtered or unexported fields
}

Initialize

func NewHandler added in v0.1.1

func NewHandler(cfgPath string) *Handler

func (*Handler) ServeHTTP added in v0.1.1

func (s *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type LogWriter added in v0.1.6

type LogWriter struct {
	http.ResponseWriter
	// contains filtered or unexported fields
}

func (*LogWriter) WriteHeader added in v0.1.6

func (l *LogWriter) WriteHeader(i int)

type ServerConfig added in v0.1.6

type ServerConfig struct {
	Certfile         string
	Keyfile          string
	Listen           string
	MetricListenAddr string
	AccessLogPath    string
}

Directories

Path Synopsis
cmd
bla

Jump to

Keyboard shortcuts

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