htpath

package
v1.20240717.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadFileExtension = errors.New("bad file extension")
View Source
var ErrBadIndexBase = errors.New("bad index base")
View Source
var ErrBadRequestType = errors.New("bad request type")

Functions

func GetFileKindByExt

func GetFileKindByExt(ext string) (string, string)

func SetExtMimeType

func SetExtMimeType(ext string, mtype string) error

func SetMarkdownExt

func SetMarkdownExt(ext string) error

Types

type HttpPath

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

func New

func New(fsys fs.FS, root string, req string, index string) (*HttpPath, error)

func (*HttpPath) Dir

func (hp *HttpPath) Dir() string

func (*HttpPath) Doc

func (hp *HttpPath) Doc() string

func (*HttpPath) Ext

func (hp *HttpPath) Ext() string

func (*HttpPath) FullDir

func (hp *HttpPath) FullDir() string

func (*HttpPath) FullDoc

func (hp *HttpPath) FullDoc() string

func (*HttpPath) FullReq

func (hp *HttpPath) FullReq() string

func (*HttpPath) HasDoc

func (hp *HttpPath) HasDoc() bool

func (*HttpPath) IsDir

func (hp *HttpPath) IsDir() bool

func (*HttpPath) Kind

func (hp *HttpPath) Kind() string

func (*HttpPath) LastMod

func (hp *HttpPath) LastMod() string

func (*HttpPath) Mime

func (hp *HttpPath) Mime() string

func (*HttpPath) ModTime

func (hp *HttpPath) ModTime() time.Time

func (*HttpPath) Name

func (hp *HttpPath) Name() string

func (*HttpPath) NewSibling

func (hp *HttpPath) NewSibling(relpath string) (*HttpPath, error)

func (*HttpPath) Req

func (hp *HttpPath) Req() string

func (*HttpPath) Root

func (hp *HttpPath) Root() string

func (*HttpPath) UpdateModTime

func (hp *HttpPath) UpdateModTime(mod time.Time)

Jump to

Keyboard shortcuts

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