summaryrefslogtreecommitdiffhomepage
path: root/template/index.qtpl.go
blob: ad7b1dfe903934f7f4d3b08d24ac5a14ef25c117 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
// Code generated by qtc from "index.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.

// Index's contents.

//line template/index.qtpl:2
package template

//line template/index.qtpl:2
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line template/index.qtpl:2
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line template/index.qtpl:2
func streamindex_contents(qw422016 *qt422016.Writer) {
//line template/index.qtpl:2
	qw422016.N().S(`
  `)
//line template/index.qtpl:3
	qw422016.N().S(`<h1>Burning Rubber Paste</h1><h2>Usage</h2><table border=1><thead><tr><th>Method - Endpoint</th><th>Effect</th></tr></thead><tbody><tr><td><pre><code>POST / data=foo</code></pre></td><td>Pastebin foo</td></tr><tr><td><pre><code>PUT /id data=foo</code></pre></td><td>Write foo into /id. Collisions disallowed. If a POST id coincides with your PUT content, it will be overwritten.</td></tr><tr><td><pre><code>GET /id</code></pre></td><td>Read paste with ID "id"</td></tr><tr><td><pre><code>GET /id/raw</code></pre></td><td>Get the raw contents of paste with ID "id"</td></tr><tr><td><pre><code>GET /id/lang</code></pre></td><td>Read paste with ID "id", and highlight it as "lang"</td></tr></tbody></table><h2>Examples</h2>`)
//line template/index.qtpl:38
	qw422016.N().S(`
    <pre><code class='language-sh'>http -f https://brpaste.example.com data=@file.txt
http -f https://brpaste.example.com data=abcd
http -f PUT https://brpaste.example.com/myPaste data=contents
http https://brpaste.example.com/some_id/raw
xdg-open https://brpaste.example.com/some_id/cpp</code></pre>
  `)
//line template/index.qtpl:44
	qw422016.N().S(`<h2>Paste from a browser</h2><form action='/' method='post'><textarea name='data' autocomplete='off' required autofocus cols='80' rows='27'></textarea><br><button type='submit'>Paste it!</button></form>`)
//line template/index.qtpl:52
	qw422016.N().S(`
`)
//line template/index.qtpl:53
}

//line template/index.qtpl:53
func writeindex_contents(qq422016 qtio422016.Writer) {
//line template/index.qtpl:53
	qw422016 := qt422016.AcquireWriter(qq422016)
//line template/index.qtpl:53
	streamindex_contents(qw422016)
//line template/index.qtpl:53
	qt422016.ReleaseWriter(qw422016)
//line template/index.qtpl:53
}

//line template/index.qtpl:53
func index_contents() string {
//line template/index.qtpl:53
	qb422016 := qt422016.AcquireByteBuffer()
//line template/index.qtpl:53
	writeindex_contents(qb422016)
//line template/index.qtpl:53
	qs422016 := string(qb422016.B)
//line template/index.qtpl:53
	qt422016.ReleaseByteBuffer(qb422016)
//line template/index.qtpl:53
	return qs422016
//line template/index.qtpl:53
}

// The index layout.

//line template/index.qtpl:56
func StreamIndex(qw422016 *qt422016.Writer) {
//line template/index.qtpl:56
	qw422016.N().S(`
  `)
//line template/index.qtpl:57
	streamlayout(qw422016, "", "", "", index_contents(), "")
//line template/index.qtpl:57
	qw422016.N().S(`
`)
//line template/index.qtpl:58
}

//line template/index.qtpl:58
func WriteIndex(qq422016 qtio422016.Writer) {
//line template/index.qtpl:58
	qw422016 := qt422016.AcquireWriter(qq422016)
//line template/index.qtpl:58
	StreamIndex(qw422016)
//line template/index.qtpl:58
	qt422016.ReleaseWriter(qw422016)
//line template/index.qtpl:58
}

//line template/index.qtpl:58
func Index() string {
//line template/index.qtpl:58
	qb422016 := qt422016.AcquireByteBuffer()
//line template/index.qtpl:58
	WriteIndex(qb422016)
//line template/index.qtpl:58
	qs422016 := string(qb422016.B)
//line template/index.qtpl:58
	qt422016.ReleaseByteBuffer(qb422016)
//line template/index.qtpl:58
	return qs422016
//line template/index.qtpl:58
}