auth/web/template/error.qtpl.go

150 lines
3.9 KiB
Go

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