renderer

package
v3.0.33 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EXT = ".txt .tmpl .md .go"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpIndexContent

type HttpIndexContent struct {
	Path    string         `json:"path"`
	Content []IndexContent `json:"content"`
}

type HttpIndexRenderer

type HttpIndexRenderer struct {
	gopi.Unit
	gopi.Logger
	gopi.HttpTemplate
	// contains filtered or unexported fields
}

func (*HttpIndexRenderer) GetContent added in v3.0.30

func (this *HttpIndexRenderer) GetContent(base, relpath string, file os.FileInfo) IndexContent

func (*HttpIndexRenderer) IsModifiedSince

func (this *HttpIndexRenderer) IsModifiedSince(docroot string, req *http.Request, t time.Time) bool

func (*HttpIndexRenderer) New added in v3.0.26

func (this *HttpIndexRenderer) New(gopi.Config) error

func (*HttpIndexRenderer) ServeContent

func (this *HttpIndexRenderer) ServeContent(docroot string, req *http.Request) (gopi.HttpRenderContext, error)

func (*HttpIndexRenderer) String

func (this *HttpIndexRenderer) String() string

type HttpTextRenderer

type HttpTextRenderer struct {
	gopi.Unit
	gopi.Logger
	gopi.HttpTemplate
	// contains filtered or unexported fields
}

func (*HttpTextRenderer) IsModifiedSince

func (this *HttpTextRenderer) IsModifiedSince(docroot string, req *http.Request, t time.Time) bool

func (*HttpTextRenderer) New added in v3.0.26

func (this *HttpTextRenderer) New(gopi.Config) error

func (*HttpTextRenderer) ServeContent

func (this *HttpTextRenderer) ServeContent(docroot string, req *http.Request) (gopi.HttpRenderContext, error)

func (*HttpTextRenderer) String

func (this *HttpTextRenderer) String() string

type IndexContent

type IndexContent struct {
	Path    string      `json:"path"`
	Name    string      `json:"name"`
	IsDir   bool        `json:"isdir"`
	Size    int64       `json:"size"`
	ModTime time.Time   `json:"modtime"`
	Content interface{} `json:"content"`
}

type TextContent

type TextContent struct {
	Path    string `json:"path"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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