auth/web/error.qtpl.go

159 lines
3.6 KiB
Go

// Code generated by qtc from "error.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.
//line web/error.qtpl:1
package web
//line web/error.qtpl:1
import (
"errors"
"source.toby3d.me/toby3d/auth/internal/domain"
)
//line web/error.qtpl:7
import (
qtio422016 "io"
qt422016 "github.com/valyala/quicktemplate"
)
//line web/error.qtpl:7
var (
_ = qtio422016.Copy
_ = qt422016.AcquireByteBuffer
)
//line web/error.qtpl:7
type ErrorPage struct {
BaseOf
Error error
}
//line web/error.qtpl:13
func (p *ErrorPage) StreamTitle(qw422016 *qt422016.Writer) {
//line web/error.qtpl:13
qw422016.N().S(` `)
//line web/error.qtpl:14
qw422016.E().S(p.T("Error"))
//line web/error.qtpl:14
qw422016.N().S(` `)
//line web/error.qtpl:15
}
//line web/error.qtpl:15
func (p *ErrorPage) WriteTitle(qq422016 qtio422016.Writer) {
//line web/error.qtpl:15
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/error.qtpl:15
p.StreamTitle(qw422016)
//line web/error.qtpl:15
qt422016.ReleaseWriter(qw422016)
//line web/error.qtpl:15
}
//line web/error.qtpl:15
func (p *ErrorPage) Title() string {
//line web/error.qtpl:15
qb422016 := qt422016.AcquireByteBuffer()
//line web/error.qtpl:15
p.WriteTitle(qb422016)
//line web/error.qtpl:15
qs422016 := string(qb422016.B)
//line web/error.qtpl:15
qt422016.ReleaseByteBuffer(qb422016)
//line web/error.qtpl:15
return qs422016
//line web/error.qtpl:15
}
//line web/error.qtpl:17
func (p *ErrorPage) StreamBody(qw422016 *qt422016.Writer) {
//line web/error.qtpl:17
qw422016.N().S(` <main> `)
//line web/error.qtpl:19
err := new(domain.Error)
//line web/error.qtpl:19
qw422016.N().S(` `)
//line web/error.qtpl:20
if errors.As(p.Error, err) {
//line web/error.qtpl:20
qw422016.N().S(` <h1>`)
//line web/error.qtpl:21
qw422016.E().S(err.Code.String())
//line web/error.qtpl:21
qw422016.N().S(`</h1> `)
//line web/error.qtpl:23
if err.Description != "" {
//line web/error.qtpl:23
qw422016.N().S(` <p>`)
//line web/error.qtpl:24
qw422016.E().S(err.Description)
//line web/error.qtpl:24
qw422016.N().S(`</p> `)
//line web/error.qtpl:25
}
//line web/error.qtpl:25
qw422016.N().S(` `)
//line web/error.qtpl:27
if err.URI != "" {
//line web/error.qtpl:27
qw422016.N().S(` <a rel="noreferrer noopener" href="`)
//line web/error.qtpl:29
qw422016.E().S(err.URI)
//line web/error.qtpl:29
qw422016.N().S(`" target="_blank"> `)
//line web/error.qtpl:32
qw422016.E().S(p.T("How do I fix it?"))
//line web/error.qtpl:32
qw422016.N().S(` </a> `)
//line web/error.qtpl:34
}
//line web/error.qtpl:34
qw422016.N().S(` `)
//line web/error.qtpl:35
} else {
//line web/error.qtpl:35
qw422016.N().S(` <h1>`)
//line web/error.qtpl:36
qw422016.E().S(p.T("Error"))
//line web/error.qtpl:36
qw422016.N().S(`</h1> <p>`)
//line web/error.qtpl:37
qw422016.E().S(p.Error.Error())
//line web/error.qtpl:37
qw422016.N().S(`</p> `)
//line web/error.qtpl:38
}
//line web/error.qtpl:38
qw422016.N().S(` </main> `)
//line web/error.qtpl:40
}
//line web/error.qtpl:40
func (p *ErrorPage) WriteBody(qq422016 qtio422016.Writer) {
//line web/error.qtpl:40
qw422016 := qt422016.AcquireWriter(qq422016)
//line web/error.qtpl:40
p.StreamBody(qw422016)
//line web/error.qtpl:40
qt422016.ReleaseWriter(qw422016)
//line web/error.qtpl:40
}
//line web/error.qtpl:40
func (p *ErrorPage) Body() string {
//line web/error.qtpl:40
qb422016 := qt422016.AcquireByteBuffer()
//line web/error.qtpl:40
p.WriteBody(qb422016)
//line web/error.qtpl:40
qs422016 := string(qb422016.B)
//line web/error.qtpl:40
qt422016.ReleaseByteBuffer(qb422016)
//line web/error.qtpl:40
return qs422016
//line web/error.qtpl:40
}