Reviewed-on: #1develop
@ -0,0 +1,47 @@ | |||||
package Database | |||||
import ( | |||||
"fmt" | |||||
"gorm.io/driver/postgres" | |||||
"gorm.io/gorm" | |||||
"PersonalWebsite/Variables" | |||||
) | |||||
var ( | |||||
DB *gorm.DB | |||||
) | |||||
func InitDatabaseConn() error { | |||||
var ( | |||||
dbConnString string | |||||
e error | |||||
) | |||||
// Connect to the postgres db | |||||
// you might have to change the connection string to add your database credentials | |||||
dbConnString = fmt.Sprintf( | |||||
"host=%s port=%d dbname=%s user=%s password=%s %s", | |||||
Variables.DbHost, | |||||
Variables.DbPort, | |||||
Variables.DbName, | |||||
Variables.DbUser, | |||||
Variables.DbPass, | |||||
Variables.DbOpts, | |||||
) | |||||
DB, e = gorm.Open( | |||||
postgres.Open(dbConnString), | |||||
&gorm.Config{}, | |||||
) | |||||
if e != nil { | |||||
return e | |||||
} | |||||
e = MigrateDB() | |||||
if e != nil { | |||||
return e | |||||
} | |||||
return nil | |||||
} |
@ -0,0 +1,37 @@ | |||||
package Database | |||||
import ( | |||||
"log" | |||||
"gorm.io/gorm" | |||||
"PersonalWebsite/Variables" | |||||
) | |||||
func updateDefaultSidebarLinks() { | |||||
var e error | |||||
for name, link := range Variables.DefaultSidebarLinks { | |||||
e = AddSidebarLink(name, link) | |||||
if e != nil { | |||||
log.Fatal(e) | |||||
} | |||||
} | |||||
} | |||||
func MigrateDB() error { | |||||
var ( | |||||
migrator gorm.Migrator | |||||
) | |||||
migrator = DB.Migrator() | |||||
if !migrator.HasTable(Post{}) { | |||||
migrator.CreateTable(&Post{}) | |||||
} | |||||
if !migrator.HasTable(SidebarLink{}) { | |||||
migrator.CreateTable(&SidebarLink{}) | |||||
updateDefaultSidebarLinks() | |||||
} | |||||
return nil | |||||
} |
@ -0,0 +1,91 @@ | |||||
package Database | |||||
import "time" | |||||
func GetPostById(id string) (Post, error) { | |||||
var ( | |||||
post Post | |||||
e error | |||||
) | |||||
e = DB.Model(&Post{}). | |||||
Where("id = ?", id). | |||||
First(&post). | |||||
Error | |||||
return post, e | |||||
} | |||||
func GetPostsList(limit int, offset int) ([]Post, error) { | |||||
var ( | |||||
posts []Post | |||||
e error | |||||
) | |||||
e = DB.Model(&Post{}). | |||||
Order("updated_at desc"). | |||||
Limit(limit). | |||||
Offset(offset). | |||||
Find(&posts). | |||||
Error | |||||
return posts, e | |||||
} | |||||
func GetPostsListBySubject(limit int, offset int, subject string) ([]Post, error) { | |||||
var ( | |||||
posts []Post | |||||
e error | |||||
) | |||||
e = DB.Model(&Post{}). | |||||
Where("subject = ?", subject). | |||||
Order("updated_at desc"). | |||||
Limit(limit). | |||||
Offset(offset). | |||||
Find(&posts). | |||||
Error | |||||
return posts, e | |||||
} | |||||
func GetPostCountBySubject(subject string) (int64, error) { | |||||
var ( | |||||
count int64 | |||||
e error | |||||
) | |||||
e = DB.Model(&Post{}). | |||||
Where("subject = ?", subject). | |||||
Count(&count). | |||||
Error | |||||
return count, e | |||||
} | |||||
func CreatePost(post Post) error { | |||||
return DB.Model(&Post{}). | |||||
Create(&post). | |||||
Error | |||||
} | |||||
func UpdatePost(post Post) error { | |||||
return DB.Save(&post).Error | |||||
} | |||||
func GetLastUpdatedAt() (time.Time, error) { | |||||
var ( | |||||
post Post | |||||
e error | |||||
) | |||||
e = DB.Model(&Post{}). | |||||
Select("updated_at"). | |||||
Order("updated_at desc"). | |||||
Limit(1). | |||||
Offset(0). | |||||
First(&post). | |||||
Error | |||||
return post.UpdatedAt, e | |||||
} |
@ -0,0 +1,57 @@ | |||||
package Database | |||||
import ( | |||||
"time" | |||||
"github.com/google/uuid" | |||||
"gorm.io/gorm" | |||||
) | |||||
const ( | |||||
SubjectProgramming = "Programming" | |||||
SubjectPentesting = "Pentesting" | |||||
) | |||||
// Base contains common columns for all tables | |||||
type Base struct { | |||||
ID uuid.UUID `gorm:"primaryKey;autoIncrement:false"` | |||||
CreatedAt time.Time | |||||
UpdatedAt time.Time | |||||
DeletedAt time.Time | |||||
} | |||||
// BeforeCreate will set Base struct before every insert | |||||
func (base *Base) BeforeCreate(tx *gorm.DB) error { | |||||
// uuid.New() creates a new random UUID or panics. | |||||
base.ID = uuid.New() | |||||
// generate timestamps | |||||
var t time.Time = time.Now() | |||||
base.CreatedAt, base.UpdatedAt = t, t | |||||
return nil | |||||
} | |||||
// AfterUpdate will update the Base struct after every update | |||||
func (base *Base) AfterUpdate(tx *gorm.DB) error { | |||||
// update timestamps | |||||
base.UpdatedAt = time.Now() | |||||
return nil | |||||
} | |||||
type Post struct { | |||||
Base | |||||
Title string `gorm:"type:varchar(256);"` | |||||
Intro string | |||||
HtmlPath string `gorm:"type:varchar(256);uniqueindex;"` | |||||
Subject string `gorm:"type:varchar(256);"` | |||||
MainImage string `gorm:"type:varchar(256);"` | |||||
Body string `sql:"-"` | |||||
} | |||||
type SidebarLink struct { | |||||
Base | |||||
Name string | |||||
Link string | |||||
} |
@ -0,0 +1,25 @@ | |||||
package Database | |||||
func GetAllSidebarLinks() ([]SidebarLink, error) { | |||||
var ( | |||||
sidebar_links []SidebarLink | |||||
e error | |||||
) | |||||
e = DB.Model(&SidebarLink{}). | |||||
Find(&sidebar_links). | |||||
Error | |||||
return sidebar_links, e | |||||
} | |||||
func AddSidebarLink(name string, link string) error { | |||||
var sidebar_link SidebarLink | |||||
sidebar_link = SidebarLink{ | |||||
Name: name, | |||||
Link: link, | |||||
} | |||||
return DB.Create(&sidebar_link).Error | |||||
} |
@ -0,0 +1,118 @@ | |||||
package Helper | |||||
import ( | |||||
"io" | |||||
"io/ioutil" | |||||
"mime/multipart" | |||||
"os" | |||||
"path/filepath" | |||||
"strings" | |||||
"PersonalWebsite/Variables" | |||||
) | |||||
func UploadFiles(files []*multipart.FileHeader) error { | |||||
var ( | |||||
file multipart.File | |||||
dst *os.File | |||||
e error | |||||
) | |||||
for i := range files { | |||||
//for each fileheader, get a handle to the actual file | |||||
file, e = files[i].Open() | |||||
defer file.Close() | |||||
if e != nil { | |||||
return e | |||||
} | |||||
//create destination file making sure the path is writeable. | |||||
dst, e = os.Create(Variables.ProjectRoot + "/web/static/" + files[i].Filename) | |||||
defer dst.Close() | |||||
if e != nil { | |||||
return e | |||||
} | |||||
//copy the uploaded file to the destination file | |||||
if _, e := io.Copy(dst, file); e != nil { | |||||
return e | |||||
} | |||||
} | |||||
return nil | |||||
} | |||||
func WriteBody(title string, body string) (string, error) { | |||||
var ( | |||||
filename, path string | |||||
f *os.File | |||||
e error | |||||
) | |||||
filename = strings.ReplaceAll(title, " ", "_") + ".gohtml" | |||||
path = filepath.Join( | |||||
Variables.ProjectRoot, | |||||
"web/posts/", | |||||
filename, | |||||
) | |||||
f, e = os.Create(path) | |||||
if e != nil { | |||||
return "", e | |||||
} | |||||
defer f.Close() | |||||
_, e = f.WriteString(body) | |||||
if e != nil { | |||||
return "", e | |||||
} | |||||
return filename, nil | |||||
} | |||||
func GetFileContents(path string) (string, error) { | |||||
var ( | |||||
content []byte | |||||
e error | |||||
) | |||||
path = filepath.Join( | |||||
Variables.ProjectRoot, | |||||
"web/posts/", | |||||
path, | |||||
) | |||||
content, e = ioutil.ReadFile(path) | |||||
if e != nil { | |||||
return "", e | |||||
} | |||||
// Convert []byte to string and print to screen | |||||
return string(content), nil | |||||
} | |||||
func DeleteOldPostFile(title string) error { | |||||
var ( | |||||
filename, path string | |||||
e error | |||||
) | |||||
filename = strings.ReplaceAll(title, " ", "_") + ".gohtml" | |||||
path = filepath.Join( | |||||
Variables.ProjectRoot, | |||||
"web/posts/", | |||||
filename, | |||||
) | |||||
e = os.Remove(path) | |||||
if e != nil { | |||||
return e | |||||
} | |||||
return nil | |||||
} |
@ -0,0 +1,62 @@ | |||||
package Helper | |||||
import ( | |||||
"strconv" | |||||
"strings" | |||||
"time" | |||||
) | |||||
func MinusInt64(a, b int64) string { | |||||
return strconv.FormatInt(a-b, 10) | |||||
} | |||||
func MinusInt(a, b int) string { | |||||
return strconv.Itoa(a - b) | |||||
} | |||||
func Minus(a, b int) int { | |||||
return a - b | |||||
} | |||||
func PlusInt64(a, b int64) string { | |||||
return strconv.FormatInt(a+b, 10) | |||||
} | |||||
func PlusInt(a, b int) string { | |||||
return strconv.Itoa(a + b) | |||||
} | |||||
func Iterate(count int) []int { | |||||
var i int | |||||
var Items []int | |||||
for i = 0; i < count; i++ { | |||||
Items = append(Items, i) | |||||
} | |||||
return Items | |||||
} | |||||
func StrToLower(s string) string { | |||||
return strings.ToLower(s) | |||||
} | |||||
func FormatTimestamp(t interface{}) string { | |||||
var ( | |||||
s string | |||||
tt time.Time | |||||
exists bool | |||||
) | |||||
// Check if timestamp is string | |||||
s, exists = t.(string) | |||||
if exists { | |||||
return s | |||||
} | |||||
// Check if timestamp is time.Time | |||||
tt, exists = t.(time.Time) | |||||
if !exists || tt.IsZero() { | |||||
return "" | |||||
} | |||||
loc, _ := time.LoadLocation("Australia/Adelaide") | |||||
return tt. | |||||
In(loc). | |||||
Format("02/01/2006 03:04 PM") | |||||
} |
@ -0,0 +1,359 @@ | |||||
package Webserver | |||||
import ( | |||||
"fmt" | |||||
"log" | |||||
"mime/multipart" | |||||
"net/http" | |||||
"strconv" | |||||
"time" | |||||
"PersonalWebsite/Database" | |||||
"PersonalWebsite/Helper" | |||||
"PersonalWebsite/Variables" | |||||
"github.com/gorilla/mux" | |||||
"github.com/gorilla/sessions" | |||||
) | |||||
func CheckAuth(w http.ResponseWriter, r *http.Request) bool { | |||||
var ( | |||||
session *sessions.Session | |||||
lastActiveUnix int64 | |||||
lastActive time.Time | |||||
auth bool | |||||
exists bool | |||||
e error | |||||
) | |||||
session, e = Variables.CookieStore.Get(r, Variables.CookieName) | |||||
if e != nil { | |||||
return false | |||||
} | |||||
auth, exists = session.Values["authenticated"].(bool) | |||||
if !(auth && exists) { | |||||
return false | |||||
} | |||||
lastActiveUnix, exists = session.Values["lastActive"].(int64) | |||||
if !exists { | |||||
return false | |||||
} | |||||
lastActive = time.Unix(lastActiveUnix, 0) | |||||
lastActive.Add(12 * time.Hour) | |||||
if time.Now().Before(lastActive) { | |||||
session.Values = make(map[interface{}]interface{}) | |||||
session.Values["authenticated"] = false | |||||
session.AddFlash("Login Expired") | |||||
e = session.Save(r, w) | |||||
if e != nil { | |||||
log.Println(e.Error()) | |||||
} | |||||
return false | |||||
} | |||||
session.Values["lastLogin"] = time.Now().Unix() | |||||
e = session.Save(r, w) | |||||
if e != nil { | |||||
log.Println(e.Error()) | |||||
return false | |||||
} | |||||
return true | |||||
} | |||||
func AdminView(w http.ResponseWriter, r *http.Request) { | |||||
var ( | |||||
v = make(map[string]interface{}) | |||||
urlParams map[string]string | |||||
page string | |||||
pageInt int | |||||
pageOffset int | |||||
posts []Database.Post | |||||
exists bool | |||||
e error | |||||
) | |||||
if !CheckAuth(w, r) { | |||||
http.Redirect(w, r, "/admin/login", 302) | |||||
return | |||||
} | |||||
switch r.Method { | |||||
case http.MethodGet: | |||||
urlParams = mux.Vars(r) | |||||
page, exists = urlParams["page"] | |||||
if exists { | |||||
pageInt, e = strconv.Atoi(page) | |||||
if e != nil { | |||||
log.Fatal("Url Parameter page cannot be converted to an int") | |||||
} | |||||
} else { | |||||
pageInt = 0 | |||||
} | |||||
pageOffset = pageInt * 10 | |||||
posts, e = Database.GetPostsList(10, pageOffset) | |||||
v["Posts"] = posts | |||||
ServeTemplate(w, r, "html/admin/admin-index.gohtml", v) | |||||
return | |||||
} | |||||
} | |||||
func AdminLogin(w http.ResponseWriter, r *http.Request) { | |||||
var ( | |||||
session *sessions.Session | |||||
v = make(map[string]interface{}) | |||||
flashes []interface{} | |||||
username string | |||||
password string | |||||
e error | |||||
) | |||||
if CheckAuth(w, r) { | |||||
http.Redirect(w, r, "/admin", 302) | |||||
return | |||||
} | |||||
session, e = Variables.CookieStore.Get(r, Variables.CookieName) | |||||
if e != nil { | |||||
log.Println("Could not get session cookie") | |||||
http.Error(w, "Error", http.StatusInternalServerError) | |||||
return | |||||
} | |||||
switch r.Method { | |||||
case http.MethodGet: | |||||
flashes = session.Flashes() | |||||
e = session.Save(r, w) | |||||
if e != nil { | |||||
log.Println(e.Error()) | |||||
return | |||||
} | |||||
if len(flashes) > 0 { | |||||
v["FlashMsg"] = flashes[0].(string) | |||||
} | |||||
ServeTemplate(w, r, "html/admin/admin-login.gohtml", v) | |||||
return | |||||
case http.MethodPost: | |||||
e = r.ParseForm() | |||||
if e != nil { | |||||
log.Println(e.Error()) | |||||
http.Redirect(w, r, "/login", 302) | |||||
} | |||||
username = r.FormValue("username") | |||||
password = r.FormValue("password") | |||||
if username != Variables.AdminPassword && password != Variables.AdminPassword { | |||||
session.AddFlash("Invalid Username or Password") | |||||
e = session.Save(r, w) | |||||
if e != nil { | |||||
log.Println(e.Error()) | |||||
} | |||||
http.Redirect(w, r, "/admin/login", 302) | |||||
return | |||||
} | |||||
session.Values["authenticated"] = true | |||||
session.Values["lastActive"] = time.Now().Unix() | |||||
session.Save(r, w) | |||||
http.Redirect(w, r, "/admin", 302) | |||||
return | |||||
} | |||||
} | |||||
func AdminNewPost(w http.ResponseWriter, r *http.Request) { | |||||
var ( | |||||
session *sessions.Session | |||||
v = make(map[string]interface{}) | |||||
flashes []interface{} | |||||
title, subject, intro, body string | |||||
bodyPath string | |||||
mainFilePath string = "" | |||||
fileUpload []*multipart.FileHeader | |||||
//otherImgs string | |||||
e error | |||||
) | |||||
if !CheckAuth(w, r) { | |||||
http.Redirect(w, r, "/admin/login", 302) | |||||
return | |||||
} | |||||
session, e = Variables.CookieStore.Get(r, Variables.CookieName) | |||||
if e != nil { | |||||
log.Println("Could not get session cookie") | |||||
http.Error(w, "Error", http.StatusInternalServerError) | |||||
return | |||||
} | |||||
switch r.Method { | |||||
case http.MethodGet: | |||||
flashes = session.Flashes() | |||||
e = session.Save(r, w) | |||||
if e != nil { | |||||
log.Println(e.Error()) | |||||
return | |||||
} | |||||
if len(flashes) > 0 { | |||||
v["FlashMsg"] = flashes[0].(string) | |||||
} | |||||
ServeTemplate(w, r, "html/admin/admin-new-post.gohtml", v) | |||||
return | |||||
case http.MethodPost: | |||||
title = r.FormValue("title") | |||||
subject = r.FormValue("subject") | |||||
intro = r.FormValue("intro") | |||||
body = r.FormValue("body") | |||||
bodyPath, e = Helper.WriteBody(title, body) | |||||
if e != nil { | |||||
log.Fatal(e) | |||||
} | |||||
r.ParseMultipartForm(32 << 20) // 32MB is the default used by FormFile | |||||
fileUpload = r.MultipartForm.File["img"] | |||||
Helper.UploadFiles(fileUpload) | |||||
if len(fileUpload) == 1 { | |||||
mainFilePath = fileUpload[0].Filename | |||||
} | |||||
fileUpload = r.MultipartForm.File["files"] | |||||
Helper.UploadFiles(fileUpload) | |||||
Database.CreatePost( | |||||
Database.Post{ | |||||
Title: title, | |||||
Subject: subject, | |||||
Intro: intro, | |||||
HtmlPath: bodyPath, | |||||
MainImage: mainFilePath, | |||||
}, | |||||
) | |||||
http.Redirect(w, r, "/admin", 302) | |||||
return | |||||
} | |||||
} | |||||
func AdminEditPost(w http.ResponseWriter, r *http.Request) { | |||||
var ( | |||||
session *sessions.Session | |||||
v = make(map[string]interface{}) | |||||
urlParams map[string]string | |||||
flashes []interface{} | |||||
title, subject, intro, body string | |||||
bodyPath string | |||||
post Database.Post | |||||
fileUpload []*multipart.FileHeader | |||||
e error | |||||
) | |||||
if !CheckAuth(w, r) { | |||||
http.Redirect(w, r, "/admin/login", 302) | |||||
return | |||||
} | |||||
session, e = Variables.CookieStore.Get(r, Variables.CookieName) | |||||
if e != nil { | |||||
log.Println("Could not get session cookie") | |||||
http.Error(w, "Error", http.StatusInternalServerError) | |||||
return | |||||
} | |||||
switch r.Method { | |||||
case http.MethodGet: | |||||
flashes = session.Flashes() | |||||
e = session.Save(r, w) | |||||
if e != nil { | |||||
log.Println(e.Error()) | |||||
return | |||||
} | |||||
if len(flashes) > 0 { | |||||
v["FlashMsg"] = flashes[0].(string) | |||||
} | |||||
urlParams = mux.Vars(r) | |||||
post, e = Database.GetPostById(urlParams["id"]) | |||||
if e != nil { | |||||
log.Fatal("Cannot get Post by id") | |||||
} | |||||
post.Body, e = Helper.GetFileContents(post.HtmlPath) | |||||
if e != nil { | |||||
log.Fatal("Cannot read body file") | |||||
} | |||||
v["Post"] = post | |||||
ServeTemplate(w, r, "html/admin/admin-update-post.gohtml", v) | |||||
return | |||||
case http.MethodPost: | |||||
urlParams = mux.Vars(r) | |||||
post, e = Database.GetPostById(urlParams["id"]) | |||||
if e != nil { | |||||
log.Fatal("Cannot get Post by id") | |||||
} | |||||
title = r.FormValue("title") | |||||
subject = r.FormValue("subject") | |||||
intro = r.FormValue("intro") | |||||
body = r.FormValue("body") | |||||
if title != post.Title { | |||||
defer Helper.DeleteOldPostFile(post.Title) | |||||
} | |||||
bodyPath, e = Helper.WriteBody(title, body) | |||||
if e != nil { | |||||
log.Fatal(e) | |||||
} | |||||
r.ParseMultipartForm(32 << 20) // 32MB is the default used by FormFile | |||||
fileUpload = r.MultipartForm.File["img"] | |||||
Helper.UploadFiles(fileUpload) | |||||
if len(fileUpload) == 1 { | |||||
post.MainImage = fileUpload[0].Filename | |||||
} | |||||
fileUpload = r.MultipartForm.File["files"] | |||||
Helper.UploadFiles(fileUpload) | |||||
post.Title = title | |||||
post.Subject = subject | |||||
post.Intro = intro | |||||
post.HtmlPath = bodyPath | |||||
Database.UpdatePost( | |||||
post, | |||||
) | |||||
http.Redirect(w, r, fmt.Sprintf("/admin/post/%s/edit", post.ID), 302) | |||||
return | |||||
} | |||||
} |
@ -0,0 +1,23 @@ | |||||
package Webserver | |||||
import ( | |||||
"net/http" | |||||
"PersonalWebsite/Database" | |||||
) | |||||
func ViewIndex(w http.ResponseWriter, r *http.Request) { | |||||
var ( | |||||
v = make(map[string]interface{}) | |||||
e error | |||||
) | |||||
v["PageView"] = "index-intro.gohtml" | |||||
v["Posts"], e = Database.GetPostsList(5, 0) | |||||
if e != nil { | |||||
// TODO: Handle this | |||||
http.Error(w, "Error", http.StatusInternalServerError) | |||||
} | |||||
ServeTemplate(w, r, "html/index.gohtml", v) | |||||
} |
@ -0,0 +1,101 @@ | |||||
package Webserver | |||||
import ( | |||||
"log" | |||||
"net/http" | |||||
"strconv" | |||||
"PersonalWebsite/Database" | |||||
"github.com/gorilla/mux" | |||||
) | |||||
func ViewPost(w http.ResponseWriter, r *http.Request) { | |||||
var ( | |||||
v = make(map[string]interface{}) | |||||
urlParams map[string]string | |||||
post Database.Post | |||||
e error | |||||
) | |||||
urlParams = mux.Vars(r) | |||||
post, e = Database.GetPostById(urlParams["id"]) | |||||
if e != nil { | |||||
// TODO: Forward 404 | |||||
log.Println("Could not get post") | |||||
http.Error(w, "Error", http.StatusInternalServerError) | |||||
return | |||||
} | |||||
v["Subject"] = post.Subject | |||||
v["PageView"] = "post.gohtml" | |||||
v["Post"] = post | |||||
ServeTemplate(w, r, "html/index.gohtml", v) | |||||
} | |||||
func ViewPostList(w http.ResponseWriter, r *http.Request, subject string) { | |||||
var ( | |||||
limit int = 2 | |||||
v = make(map[string]interface{}) | |||||
posts []Database.Post | |||||
postsCount int64 | |||||
pageCount int | |||||
keys []string | |||||
page int | |||||
offset int | |||||
x, y int | |||||
ok bool | |||||
e error | |||||
) | |||||
keys, ok = r.URL.Query()["page"] | |||||
if !ok || len(keys[0]) < 1 { | |||||
page = 0 | |||||
} else { | |||||
page, e = strconv.Atoi(keys[0]) | |||||
if e != nil { | |||||
// TODO: Handle this | |||||
http.Error(w, "Error", http.StatusInternalServerError) | |||||
return | |||||
} | |||||
} | |||||
offset = limit * page | |||||
posts, e = Database.GetPostsListBySubject(limit, offset, subject) | |||||
if e != nil { | |||||
// TODO: Handle this | |||||
http.Error(w, "Error", http.StatusInternalServerError) | |||||
return | |||||
} | |||||
postsCount, e = Database.GetPostCountBySubject(subject) | |||||
if e != nil { | |||||
// TODO: Handle this | |||||
http.Error(w, "Error", http.StatusInternalServerError) | |||||
return | |||||
} | |||||
x, y = int(postsCount), limit | |||||
pageCount = (x + y - 1) / y | |||||
v["PageView"] = "post-list.gohtml" | |||||
v["Subject"] = subject | |||||
v["Posts"] = posts | |||||
v["Page"] = page | |||||
v["PageCount"] = pageCount | |||||
ServeTemplate(w, r, "html/index.gohtml", v) | |||||
} | |||||
func ViewPostListProgramming(w http.ResponseWriter, r *http.Request) { | |||||
ViewPostList(w, r, "Programming") | |||||
} | |||||
func ViewPostListPentesting(w http.ResponseWriter, r *http.Request) { | |||||
ViewPostList(w, r, "Pentesting") | |||||
} |
@ -0,0 +1,77 @@ | |||||
package Webserver | |||||
import ( | |||||
"net/http" | |||||
"path" | |||||
"text/template" | |||||
"PersonalWebsite/Database" | |||||
"PersonalWebsite/Helper" | |||||
) | |||||
type Unauthenticated struct { | |||||
FlashMsg string | |||||
} | |||||
var ( | |||||
partials = []string{ | |||||
"html/header.gohtml", | |||||
"html/sidebar.gohtml", | |||||
"html/index-intro.gohtml", | |||||
"html/index-post-list.gohtml", | |||||
"html/post-list.gohtml", | |||||
"html/post.gohtml", | |||||
} | |||||
) | |||||
func ServeTemplate(w http.ResponseWriter, r *http.Request, mainFile string, v map[string]interface{}) { | |||||
var ( | |||||
tpl *template.Template | |||||
files []string | |||||
e error | |||||
) | |||||
if _, ok := v["Subject"]; !ok { | |||||
v["Subject"] = "" | |||||
} | |||||
v["LastUpdatedAt"], e = Database.GetLastUpdatedAt() | |||||
if e != nil { | |||||
v["LastUpdatedAt"] = " - " | |||||
} | |||||
v["SidebarLinks"], e = Database.GetAllSidebarLinks() | |||||
if e != nil { | |||||
// TODO: Handle | |||||
panic(e) | |||||
} | |||||
files = []string{webRootJoin(mainFile)} | |||||
for _, p := range partials { | |||||
files = append(files, webRootJoin(p)) | |||||
} | |||||
tpl, e = template.New(path.Base(files[0])).Funcs( | |||||
template.FuncMap{ | |||||
"FormatTimestamp": Helper.FormatTimestamp, | |||||
"MinusInt64": Helper.MinusInt64, | |||||
"MinusInt": Helper.MinusInt, | |||||
"Minus": Helper.MinusInt, | |||||
"PlusInt64": Helper.PlusInt64, | |||||
"PlusInt": Helper.PlusInt, | |||||
"Iterate": Helper.Iterate, | |||||
"StrToLower": Helper.StrToLower, | |||||
}, | |||||
).ParseFiles(files...) | |||||
if e != nil { | |||||
// TODO: Handle this | |||||
panic(e) | |||||
} | |||||
w.Header().Set("Content-type", "text/html") | |||||
e = tpl.Execute(w, v) | |||||
if e != nil { | |||||
// TODO: Handle this | |||||
panic(e) | |||||
} | |||||
} |
@ -0,0 +1,77 @@ | |||||
package Webserver | |||||
import ( | |||||
"net/http" | |||||
"path/filepath" | |||||
"PersonalWebsite/Variables" | |||||
"github.com/gorilla/mux" | |||||
) | |||||
var ( | |||||
WebRoot string | |||||
) | |||||
func init() { | |||||
WebRoot = filepath.Join( | |||||
Variables.ProjectRoot, | |||||
"/web", | |||||
) | |||||
} | |||||
func webRootJoin(p string) string { | |||||
return filepath.Join( | |||||
WebRoot, | |||||
p, | |||||
) | |||||
} | |||||
func Start() error { | |||||
var ( | |||||
r *mux.Router | |||||
e error | |||||
) | |||||
r = mux.NewRouter() | |||||
// For images / anything static | |||||
r.PathPrefix("/static/").Handler( | |||||
http.StripPrefix("/static/", | |||||
http.FileServer(http.Dir(webRootJoin("static"))), | |||||
), | |||||
) | |||||
// Handle CSS | |||||
r.PathPrefix("/css/").Handler( | |||||
http.StripPrefix("/css/", | |||||
http.FileServer(http.Dir(webRootJoin("css"))), | |||||
), | |||||
) | |||||
// Handle JS | |||||
r.PathPrefix("/js/").Handler( | |||||
http.StripPrefix("/js/", | |||||
http.FileServer(http.Dir(webRootJoin("js"))), | |||||
), | |||||
) | |||||
// Interface endpoints | |||||
r.HandleFunc("/", ViewIndex) | |||||
r.HandleFunc("/programming", ViewPostListProgramming) | |||||
r.HandleFunc("/pentesting", ViewPostListPentesting) | |||||
r.HandleFunc("/post/{id}", ViewPost) | |||||
// Administration | |||||
r.HandleFunc("/admin", AdminView) | |||||
r.HandleFunc("/admin/login", AdminLogin) | |||||
r.HandleFunc("/admin/post/new", AdminNewPost) | |||||
r.HandleFunc("/admin/post/{id}/edit", AdminEditPost) | |||||
e = http.ListenAndServe(Variables.WebserverHost, r) | |||||
if e != nil { | |||||
return e | |||||
} | |||||
return nil | |||||
} |
@ -0,0 +1,13 @@ | |||||
module main.go | |||||
go 1.16 | |||||
require ( | |||||
github.com/google/uuid v1.2.0 | |||||
github.com/gorilla/mux v1.8.0 | |||||
github.com/jackc/pgproto3/v2 v2.1.0 // indirect | |||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect | |||||
golang.org/x/text v0.3.6 // indirect | |||||
gorm.io/driver/postgres v1.1.0 | |||||
gorm.io/gorm v1.21.10 | |||||
) |
@ -0,0 +1,480 @@ | |||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= | |||||
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= | |||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= | |||||
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= | |||||
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= | |||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= | |||||
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= | |||||
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= | |||||
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= | |||||
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= | |||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | |||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= | |||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | |||||
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= | |||||
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= | |||||
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= | |||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= | |||||
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= | |||||
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= | |||||
github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= | |||||
github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= | |||||
github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= | |||||
github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= | |||||
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= | |||||
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= | |||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= | |||||
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= | |||||
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= | |||||
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= | |||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= | |||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= | |||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= | |||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= | |||||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= | |||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= | |||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= | |||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= | |||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= | |||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= | |||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= | |||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= | |||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= | |||||
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= | |||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= | |||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | |||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= | |||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= | |||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= | |||||
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= | |||||
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= | |||||
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= | |||||
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= | |||||
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= | |||||
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= | |||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= | |||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= | |||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= | |||||
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= | |||||
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= | |||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= | |||||
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= | |||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | |||||
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= | |||||
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= | |||||
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= | |||||
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= | |||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= | |||||
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= | |||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= | |||||
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= | |||||
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= | |||||
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= | |||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= | |||||
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= | |||||
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= | |||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= | |||||
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | |||||
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= | |||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= | |||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | |||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | |||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= | |||||
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= | |||||
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= | |||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= | |||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= | |||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | |||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= | |||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= | |||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= | |||||
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | |||||
github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= | |||||
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= | |||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= | |||||
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= | |||||
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= | |||||
github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= | |||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= | |||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= | |||||
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= | |||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= | |||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= | |||||
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= | |||||
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= | |||||
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= | |||||
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= | |||||
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= | |||||
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= | |||||
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= | |||||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= | |||||
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= | |||||
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= | |||||
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= | |||||
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= | |||||
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= | |||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= | |||||
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= | |||||
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= | |||||
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= | |||||
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= | |||||
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= | |||||
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= | |||||
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= | |||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= | |||||
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= | |||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= | |||||
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= | |||||
github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= | |||||
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= | |||||
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= | |||||
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= | |||||
github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= | |||||
github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= | |||||
github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= | |||||
github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= | |||||
github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= | |||||
github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= | |||||
github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= | |||||
github.com/jackc/pgconn v1.8.1 h1:ySBX7Q87vOMqKU2bbmKbUvtYhauDFclYbNDYIE1/h6s= | |||||
github.com/jackc/pgconn v1.8.1/go.mod h1:JV6m6b6jhjdmzchES0drzCcYcAHS1OPD5xu3OZ/lE2g= | |||||
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= | |||||
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= | |||||
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA= | |||||
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= | |||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= | |||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= | |||||
github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= | |||||
github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= | |||||
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= | |||||
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= | |||||
github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= | |||||
github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= | |||||
github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= | |||||
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= | |||||
github.com/jackc/pgproto3/v2 v2.1.0 h1:h2yg3kjIyAGSZKDijYn1/gXHlYLCwl9ZjEh2PU0yVxE= | |||||
github.com/jackc/pgproto3/v2 v2.1.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= | |||||
github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= | |||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= | |||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= | |||||
github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= | |||||
github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= | |||||
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= | |||||
github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= | |||||
github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= | |||||
github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= | |||||
github.com/jackc/pgtype v1.7.0 h1:6f4kVsW01QftE38ufBYxKciO6gyioXSC0ABIRLcZrGs= | |||||
github.com/jackc/pgtype v1.7.0/go.mod h1:ZnHF+rMePVqDKaOfJVI4Q8IVvAQMryDlDkZnKOI75BE= | |||||
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= | |||||
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= | |||||
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= | |||||
github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= | |||||
github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= | |||||
github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= | |||||
github.com/jackc/pgx/v4 v4.11.0 h1:J86tSWd3Y7nKjwT/43xZBvpi04keQWx8gNC2YkdJhZI= | |||||
github.com/jackc/pgx/v4 v4.11.0/go.mod h1:i62xJgdrtVDsnL3U8ekyrQXEwGNTRoG7/8r+CIdYfcc= | |||||
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= | |||||
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= | |||||
github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= | |||||
github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= | |||||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= | |||||
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= | |||||
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= | |||||
github.com/jinzhu/now v1.1.2 h1:eVKgfIdy9b6zbWBMgFpfDPoAMifwSZagU9HmEU6zgiI= | |||||
github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= | |||||
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= | |||||
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= | |||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= | |||||
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= | |||||
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= | |||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= | |||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= | |||||
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= | |||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= | |||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= | |||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= | |||||
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= | |||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= | |||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= | |||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= | |||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= | |||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= | |||||
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= | |||||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= | |||||
github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= | |||||
github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= | |||||
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= | |||||
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= | |||||
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= | |||||
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= | |||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= | |||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= | |||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= | |||||
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= | |||||
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= | |||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= | |||||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= | |||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= | |||||
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= | |||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= | |||||
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= | |||||
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= | |||||
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= | |||||
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= | |||||
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= | |||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= | |||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= | |||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= | |||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= | |||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= | |||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= | |||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= | |||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= | |||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= | |||||
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= | |||||
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= | |||||
github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= | |||||
github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= | |||||
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= | |||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= | |||||
github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= | |||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= | |||||
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= | |||||
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= | |||||
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= | |||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | |||||
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= | |||||
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= | |||||
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= | |||||
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= | |||||
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= | |||||
github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= | |||||
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= | |||||
github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= | |||||
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= | |||||
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= | |||||
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= | |||||
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= | |||||
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= | |||||
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= | |||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= | |||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= | |||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= | |||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | |||||
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= | |||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | |||||
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= | |||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= | |||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= | |||||
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= | |||||
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= | |||||
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= | |||||
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= | |||||
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= | |||||
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= | |||||
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= | |||||
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | |||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | |||||
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= | |||||
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= | |||||
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= | |||||
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= | |||||
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= | |||||
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= | |||||
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= | |||||
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= | |||||
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= | |||||
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= | |||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= | |||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= | |||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= | |||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= | |||||
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | |||||
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= | |||||
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= | |||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= | |||||
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= | |||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= | |||||
github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY= | |||||
github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= | |||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= | |||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= | |||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= | |||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= | |||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= | |||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= | |||||
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= | |||||
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= | |||||
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= | |||||
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= | |||||
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= | |||||
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= | |||||
github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= | |||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | |||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= | |||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= | |||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= | |||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= | |||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= | |||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= | |||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= | |||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= | |||||
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= | |||||
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= | |||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= | |||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= | |||||
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= | |||||
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= | |||||
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= | |||||
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= | |||||
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= | |||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= | |||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= | |||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= | |||||
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= | |||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= | |||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= | |||||
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= | |||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= | |||||
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= | |||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= | |||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= | |||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | |||||
golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= | |||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= | |||||
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= | |||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | |||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | |||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | |||||
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | |||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= | |||||
golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= | |||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= | |||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc= | |||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= | |||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= | |||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= | |||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= | |||||
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= | |||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= | |||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= | |||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= | |||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= | |||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | |||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | |||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= | |||||
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= | |||||
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= | |||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= | |||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= | |||||
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= | |||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | |||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | |||||
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | |||||
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | |||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | |||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= | |||||
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | |||||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | |||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= | |||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= | |||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= | |||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | |||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= | |||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= | |||||
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= | |||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= | |||||
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | |||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | |||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | |||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= | |||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= | |||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= | |||||
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= | |||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= | |||||
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= | |||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= | |||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= | |||||
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | |||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | |||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= | |||||
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= | |||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | |||||
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= | |||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= | |||||
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= | |||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= | |||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= | |||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= | |||||
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= | |||||
google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= | |||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= | |||||
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= | |||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= | |||||
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= | |||||
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= | |||||
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= | |||||
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= | |||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= | |||||
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= | |||||
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= | |||||
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= | |||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | |||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= | |||||
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= | |||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= | |||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= | |||||
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= | |||||
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= | |||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= | |||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= | |||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= | |||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= | |||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | |||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= | |||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= | |||||
gorm.io/driver/postgres v1.1.0 h1:afBljg7PtJ5lA6YUWluV2+xovIPhS+YiInuL3kUjrbk= | |||||
gorm.io/driver/postgres v1.1.0/go.mod h1:hXQIwafeRjJvUm+OMxcFWyswJ/vevcpPLlGocwAwuqw= | |||||
gorm.io/gorm v1.21.9/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= | |||||
gorm.io/gorm v1.21.10 h1:kBGiBsaqOQ+8f6S2U6mvGFz6aWWyCeIiuaFcaBozp4M= | |||||
gorm.io/gorm v1.21.10/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0= | |||||
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | |||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | |||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= | |||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= | |||||
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= | |||||
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= |
@ -0,0 +1,29 @@ | |||||
package main | |||||
import ( | |||||
"log" | |||||
"PersonalWebsite/Database" | |||||
"PersonalWebsite/Variables" | |||||
"PersonalWebsite/Webserver" | |||||
) | |||||
func main() { | |||||
var e error | |||||
log.Println("Initialising database connection...") | |||||
Database.InitDatabaseConn() | |||||
if e != nil { | |||||
log.Fatal(e) | |||||
} | |||||
log.Printf( | |||||
"Starting webserver on %s\n", | |||||
Variables.WebserverHost, | |||||
) | |||||
e = Webserver.Start() | |||||
if e != nil { | |||||
log.Fatal(e) | |||||
} | |||||
} |
@ -0,0 +1,112 @@ | |||||
body { | |||||
background-color: #ECECEC; | |||||
padding: 0; | |||||
margin: 0; | |||||
font-family: "Montserrat", sans-serif; | |||||
} | |||||
body * { | |||||
font-weight: bold; | |||||
} | |||||
.futura-font { | |||||
font-family: Futura; | |||||
} | |||||
h2 { | |||||
font-size: 2em; | |||||
color: #212121; | |||||
} | |||||
fieldset { | |||||
border: 0; | |||||
} | |||||
#login-container { | |||||
background-color: #FFFFFF; | |||||
border: 1px solid #ccc; | |||||
border-radius: 10px; | |||||
text-align: center; | |||||
width: 25em; | |||||
margin: auto; | |||||
margin-top: 3em; | |||||
margin-bottom: 3em; | |||||
} | |||||
#login-container input { | |||||
width: calc(100% - 2em); | |||||
} | |||||
#login-container input[type=submit] { | |||||
width: calc(100% - 0.7em); | |||||
height: 34px; | |||||
background-color: #303F9F; | |||||
color: #FFFFFF; | |||||
border: 1px solid #303F9F; | |||||
border-radius: 5px; | |||||
transition: 0.3s; | |||||
cursor: pointer; | |||||
} | |||||
#login-container input[type=submit]:hover { | |||||
background-color: #212c6f; | |||||
border-color: #212c6f; | |||||
} | |||||
#login-container button { | |||||
width: calc(100% - 0.7em); | |||||
height: 34px; | |||||
background-color: #C5CAE9; | |||||
color: #212121; | |||||
border: 1px solid #C5CAE9; | |||||
border-radius: 5px; | |||||
transition: 0.3s; | |||||
cursor: pointer; | |||||
} | |||||
#login-container button:hover { | |||||
background-color: #898da3; | |||||
border-color: #898da3; | |||||
} | |||||
#login-or-signup { | |||||
width: 100%; | |||||
text-align: center; | |||||
margin-top: 0; | |||||
color: #757575; | |||||
} | |||||
#login-or-signup * { | |||||
display: inline-block; | |||||
} | |||||
#login-or-signup p { | |||||
margin: 0.5em; | |||||
margin-left: 1em; | |||||
margin-right: 1em; | |||||
} | |||||
#login-or-signup hr { | |||||
margin-bottom: 0.2em; | |||||
padding: 0; | |||||
width: 5em; | |||||
color: #757575; | |||||
} | |||||
.or-a button { | |||||
width: calc(100% - 2em) !important; | |||||
margin: 5.6px 12px; | |||||
margin-bottom: 1em; | |||||
} | |||||
@media screen and (max-width: 500px) { | |||||
#login-container { | |||||
width: calc(100% - 4em); | |||||
margin-left: 1em; | |||||
margin-right: 1em; | |||||
} | |||||
#login-or-signup hr { | |||||
display: none; | |||||
} | |||||
} |
@ -0,0 +1,17 @@ | |||||
input, label { | |||||
display:block; | |||||
} | |||||
label { | |||||
padding-top: 0.5em; | |||||
} | |||||
input, textarea { | |||||
margin-top: 0.4em; | |||||
margin-bottom: 1em; | |||||
width: 100%; | |||||
} | |||||
input[type=submit] { | |||||
height: 2.5em; | |||||
} |
@ -0,0 +1,158 @@ | |||||
html { | |||||
padding: 0; | |||||
margin: 0; | |||||
} | |||||
body { | |||||
background-color: #ECECEC; | |||||
padding: 0; | |||||
margin: 0; | |||||
font-family: "Montserrat", sans-serif; | |||||
min-height: calc(100vh + 8em); | |||||
} | |||||
body * { | |||||
font-weight: bold; | |||||
} | |||||
.futura-font { | |||||
font-family: Futura; | |||||
} | |||||
h2 { | |||||
font-size: 2em; | |||||
color: #212121; | |||||
} | |||||
header { | |||||
position: fixed; | |||||
width: 100%; | |||||
background: #323232; | |||||
height: 4em; | |||||
z-index: 9999; | |||||
} | |||||
header h3 { | |||||
padding: 0; | |||||
margin: 0; | |||||
padding-top: 0.10em; | |||||
font-size: 1.5em; | |||||
} | |||||
header * { | |||||
display: inline-block; | |||||
padding-left: 1em; | |||||
padding-right: 1em; | |||||
padding-top: 0.7em; | |||||
margin-left: 2em; | |||||
margin-right: 2em; | |||||
} | |||||
header .right-header { | |||||
float: right; | |||||
} | |||||
header a { | |||||
text-decoration: none; | |||||
color: white; | |||||
} | |||||
a:hover { | |||||
text-decoration: underline; | |||||
} | |||||
main { | |||||
margin: 3em; | |||||
margin-top: 0; | |||||
padding: 2em; | |||||
background-color: #cccccc; | |||||
position: relative; | |||||
top: 5em; | |||||
} | |||||
main h2 { | |||||
margin-top: 0.2em; | |||||
margin-bottom: 0.2em; | |||||
} | |||||
.list-header { | |||||
display: inline-block; | |||||
width: 100%; | |||||
height: 60px; | |||||
} | |||||
.list-header * { | |||||
display: inline-block; | |||||
} | |||||
.list-header h3 { | |||||
width: 50%; | |||||
margin-right: 0; | |||||
} | |||||
#new-post { | |||||
float: right; | |||||
height: auto; | |||||
} | |||||
#new-post button { | |||||
margin: 0; | |||||
margin-top: 16px; | |||||
margin-bottom: 10px; | |||||
width: 5em; | |||||
padding: 5px; | |||||
background-color: #323232; | |||||
color: white; | |||||
border: 0; | |||||
border-radius: 5px; | |||||
} | |||||
table, | |||||
table::before, | |||||
table::after { | |||||
box-sizing: border-box; | |||||
margin: 0; | |||||
padding: 0; | |||||
} | |||||
table { | |||||
border-collapse: collapse; | |||||
box-shadow: 0 5px 10px rgb(0, 0, 0, 0.25); | |||||
background-color: white; | |||||
text-align: left; | |||||
overflow: hidden; | |||||
width: 100%; | |||||
} | |||||
thead { | |||||
box-shadow: 0 5px 10px #e1e5ee; | |||||
font-weight: 1000; | |||||
} | |||||
th { | |||||
padding: 1rem 2rem; | |||||
text-transform: uppercase; | |||||
letter-spacing: 0.1rem; | |||||
font-size: 0.7rem; | |||||
font-weight: 900; | |||||
} | |||||
td { | |||||
padding: 1rem 2rem; | |||||
} | |||||
a { | |||||
text-decoration: none; | |||||
} | |||||
.amount { | |||||
text-align: right; | |||||
} | |||||
tr:nth-child(even) { | |||||
background-color: #e1e5ee; | |||||
} | |||||
@ -0,0 +1,424 @@ | |||||
html { | |||||
margin: 0; | |||||
padding: 0; | |||||
overflow-x: hidden; | |||||
background: url(/static/background.png) no-repeat center center fixed; | |||||
-webkit-background-size: cover; | |||||
-moz-background-size: cover; | |||||
-o-background-size: cover; | |||||
background-size: cover; | |||||
height: 100%; | |||||
min-height: 100%; | |||||
} | |||||
body { | |||||
min-height: 100%; | |||||
overflow-x: hidden; | |||||
margin: 0; | |||||
padding: 0; | |||||
position: absolute; | |||||
width: 100%; | |||||
top: 0; | |||||
border: none; | |||||
color: white; | |||||
height: 100%; | |||||
font-family: "Montserrat", sans-serif; | |||||
} | |||||
a { | |||||
color: white; | |||||
text-decoration: none; | |||||
} | |||||
header { | |||||
background: rgba(0, 0, 0, 0.7); | |||||
height: 80px; | |||||
position: relative; | |||||
bottom: 17px; | |||||
} | |||||
header h2 { | |||||
position: relative; | |||||
float: left; | |||||
display: inline-block; | |||||
top: 5px; | |||||
margin-left: 30px; | |||||
-webkit-transition: padding 1s linear, border 0.5s linear; | |||||
-webkit-transition-timing-function: linear; | |||||
transition: padding 0.3s linear, border 0.3s linear; | |||||
transition-timing-function: linear; | |||||
} | |||||
header h2:hover { | |||||
border-bottom: 5px solid #ff7607; | |||||
padding-left: 5px; | |||||
padding-right: 5px; | |||||
} | |||||
.pc-links { | |||||
padding-right: 40px; | |||||
padding-top: 20px; | |||||
} | |||||
.pc-links li { | |||||
display: inline-block; | |||||
float: right; | |||||
padding-left: 15px; | |||||
padding-right: 15px; | |||||
padding-top: 10px; | |||||
margin-right: 20px; | |||||
-webkit-transition: padding 1s linear, border 0.5s linear; | |||||
-webkit-transition-timing-function: linear; | |||||
transition: padding 0.3s linear, border 0.3s linear; | |||||
transition-timing-function: linear; | |||||
} | |||||
.pc-links li:hover { | |||||
border-bottom: 5px solid #ff7607; | |||||
padding-left: 17px; | |||||
padding-right: 17px; | |||||
} | |||||
.container { | |||||
min-height: calc( 100% - 300px ); | |||||
height: calc( 100% - 200px ); | |||||
width: 100%; | |||||
overflow: hidden; | |||||
position: relative; | |||||
bottom: 20px; | |||||
display: table; | |||||
border-collapse: separate; | |||||
border-spacing: 40px; | |||||
} | |||||
.left-bar { | |||||
position: relative; | |||||
padding: 15px; | |||||
background: rgba(0, 0, 0, 0.7); | |||||
width: 150px; | |||||
display: table-cell; | |||||
vertical-align: top; | |||||
} | |||||
.left-bar ul { | |||||
list-style: none; | |||||
padding-left: 10px; | |||||
} | |||||
.left-bar ul li { | |||||
padding: 3px; | |||||
-webkit-transition: background 0.3s linear; | |||||
-webkit-transition-timing-function: linear; | |||||
transition: background 0.3s linear; | |||||
transition-timing-function: linear; | |||||
} | |||||
.left-bar ul li:hover { | |||||
background: rgba(0, 0, 0, 0.8); | |||||
} | |||||
.expand-links li { | |||||
-webkit-transition: padding 0.3s linear, background 0.3s linear; | |||||
-webkit-transition-timing-function: linear; | |||||
transition: padding 0.3s linear, background 0.3s linear; | |||||
transition-timing-function: linear; | |||||
} | |||||
.expand-links li:hover { | |||||
padding: 5px; | |||||
background: rgba(0, 0, 0, 0.8); | |||||
} | |||||
.recent-post li { | |||||
padding-bottom: 10px !important; | |||||
} | |||||
.main { | |||||
position: relative; | |||||
padding: 15px; | |||||
padding-left: 25px; | |||||
padding-right: 25px; | |||||
background: rgba(0, 0, 0, 0.7); | |||||
word-wrap: break-word; | |||||
height: 100%; | |||||
display: table-cell; | |||||
vertical-align: top; | |||||
word-wrap: break-word; | |||||
} | |||||
.main a { | |||||
color: #99ffff; | |||||
text-decoration: none; | |||||
} | |||||
.main a:hover { | |||||
color: #0091c9; | |||||
} | |||||
.main img { | |||||
max-width: 100%; | |||||
} | |||||
.paginate { | |||||
width: calc(100% - 22px); | |||||
text-align: center; | |||||
position: absolute; | |||||
bottom: 0; | |||||
} | |||||
.paginate ul { | |||||
padding: 0; | |||||
} | |||||
.paginate ul a li { | |||||
display: inline-block; | |||||
padding-left: 4px; | |||||
padding-right: 4px; | |||||
} | |||||
footer { | |||||
width: calc( 100% - 110px ); | |||||
margin-right: 40px; | |||||
margin-left: 40px; | |||||
padding: 15px; | |||||
padding-top: 20px; | |||||
background: rgba(0, 0, 0, 0.7); | |||||
height: 80px; | |||||
text-align: center; | |||||
} | |||||
footer p { | |||||
color: grey; | |||||
font-size: 0.9em; | |||||
} | |||||
footer a { | |||||
color: #99ffff; | |||||
text-decoration: none; | |||||
} | |||||
footer a:hover { | |||||
color: #0091c9; | |||||
text-decoration: underline; | |||||
} | |||||
.active { | |||||
border-bottom: 3px solid #ff760799; | |||||
} | |||||
.nav-toggle { | |||||
display: none; | |||||
} | |||||
.links { | |||||
display: none; | |||||
} | |||||
.main-links ul { | |||||
list-style: none; | |||||
} | |||||
pre::-webkit-scrollbar-color { | |||||
background-color: red; | |||||
outline: 1px solid red; | |||||
} | |||||
.list-post-title { | |||||
margin-top: 5px; | |||||
margin-bottom: 2px; | |||||
} | |||||
.datetime { | |||||
margin-top: 0; | |||||
margin-bottom: 5px; | |||||
} | |||||
.post-title { | |||||
padding: 10px; | |||||
text-align: center; | |||||
font-size: 2em; | |||||
} | |||||
.post-icon { | |||||
max-width: 200px !important; | |||||
} | |||||
.icon-div { | |||||
text-align: center; | |||||
} | |||||
.index-recent-posts { | |||||
padding: 0; | |||||
} | |||||
.index-recent-post-title-container { | |||||
padding-bottom: 1em; | |||||
} | |||||
.index-recent-posts li | |||||
{ | |||||
list-style: none; | |||||
-webkit-transition: background 0.3s linear; | |||||
-webkit-transition-timing-function: linear; | |||||
transition: background 0.3s linear; | |||||
transition-timing-function: linear; | |||||
padding: 1em; | |||||
background: rgba(0, 0, 0, 0.65); | |||||
margin-bottom: 1.5em; | |||||
} | |||||
.index-recent-posts li:hover { | |||||
background: rgba(0, 0, 0, 0.9); | |||||
} | |||||
.index-recent-posts a:hover { | |||||
text-decoration: none; | |||||
} | |||||
.index-post-intro * { | |||||
color: #ffffff; | |||||
margin: 0; | |||||
} | |||||
.index-recent-posts-title { | |||||
font-size: 1.3em; | |||||
width: 80%; | |||||
display: inline; | |||||
margin: 0; | |||||
} | |||||
.datetimebox { | |||||
display: inline; | |||||
float: right; | |||||
font-size: 0.9em; | |||||
margin: 0; | |||||
} | |||||
@media all and (max-width : 950px) { | |||||
.container { | |||||
border-spacing: 20px; | |||||
max-width: 100%; | |||||
} | |||||
pre { | |||||
overflow: scroll !important; | |||||
} | |||||
footer { | |||||
width: calc( 100% - 70px ); | |||||
margin-right: 20px; | |||||
margin-left: 20px; | |||||
} | |||||
.left-bar { | |||||
display: none; | |||||
} | |||||
header h2 { | |||||
top: 15px; | |||||
} | |||||
.pc-links { | |||||
display: none; | |||||
} | |||||
.nav-toggle { | |||||
display: inline-block; | |||||
} | |||||
.links { | |||||
display: block; | |||||
position: absolute; | |||||
top: 80px; | |||||
right: -230px; | |||||
z-index: 1; | |||||
background: rgba(0, 0, 0, 0.8); | |||||
padding-top: 20px; | |||||
padding-bottom: 20px; | |||||
padding-left: 35px; | |||||
padding-right: 35px; | |||||
transition: 1s; | |||||
} | |||||
.links.expanded { | |||||
right: 0px; | |||||
transition: 1s; | |||||
padding-top: 20px; | |||||
padding-bottom: 20px; | |||||
padding-left: 35px; | |||||
padding-right: 35px; | |||||
} | |||||
.links ul { | |||||
list-style: none; | |||||
padding: 0; | |||||
} | |||||
.links ul li { | |||||
padding-top: 6px; | |||||
padding-bottom: 6px; | |||||
} | |||||
.nav-toggle { | |||||
-webkit-user-select: none; | |||||
-moz-user-select: none; | |||||
user-select: none; | |||||
cursor: pointer; | |||||
height: 2rem; | |||||
position: relative; | |||||
float: right; | |||||
right: 2rem; | |||||
top: 2.0rem; | |||||
width: 3.0rem; | |||||
z-index: 2; | |||||
} | |||||
.nav-toggle:hover { opacity: 0.8; } | |||||
.nav-toggle .nav-toggle-bar, .nav-toggle .nav-toggle-bar::after, .nav-toggle .nav-toggle-bar::before { | |||||
position: absolute; | |||||
top: 50%; | |||||
-webkit-transform: translateY(-50%); | |||||
-ms-transform: translateY(-50%); | |||||
transform: translateY(-50%); | |||||
-webkit-transition: all 0.5s ease; | |||||
-moz-transition: all 0.5s ease; | |||||
-ms-transition: all 0.5s ease; | |||||
-o-transition: all 0.5s ease; | |||||
transition: all 0.5s ease; | |||||
background: white; | |||||
content: ''; | |||||
height: 0.4rem; | |||||
width: 100%; | |||||
} | |||||
.nav-toggle .nav-toggle-bar { margin-top: 0; } | |||||
.nav-toggle .nav-toggle-bar::after { margin-top: 0.8rem; } | |||||
.nav-toggle .nav-toggle-bar::before { margin-top: -0.8rem; } | |||||
.nav-toggle.expanded .nav-toggle-bar { background: transparent; } | |||||
.nav-toggle.expanded .nav-toggle-bar::after, .nav-toggle.expanded .nav-toggle-bar::before { | |||||
background: white; | |||||
margin-top: 0; | |||||
} | |||||
.nav-toggle.expanded .nav-toggle-bar::after { | |||||
-ms-transform: rotate(45deg); | |||||
-webkit-transform: rotate(45deg); | |||||
transform: rotate(45deg); | |||||
} | |||||
.nav-toggle.expanded .nav-toggle-bar::before { | |||||
-ms-transform: rotate(-45deg); | |||||
-webkit-transform: rotate(-45deg); | |||||
transform: rotate(-45deg); | |||||
} | |||||
} |
@ -0,0 +1,81 @@ | |||||
img { | |||||
display: block; | |||||
margin-left: auto; | |||||
margin-right: auto; | |||||
padding-top: 10px; | |||||
padding-bottom: 10px; | |||||
} | |||||
h5 { | |||||
font-size: 1.2em; | |||||
} | |||||
h3 { | |||||
font-size: 1.4em; | |||||
} | |||||
.left-bar { | |||||
display: block !important; | |||||
} | |||||
.comment-title { | |||||
text-align: center; | |||||
} | |||||
.comment-box { | |||||
padding: 8px; | |||||
margin-bottom: 16px; | |||||
background: rgba(0, 0, 0, 0.65); | |||||
border-left: 4px solid rgba(255, 118, 7); | |||||
} | |||||
.comment-email { | |||||
color: #848484; | |||||
font-size: 0.8em; | |||||
margin-top: 4px !important; | |||||
} | |||||
.comment-form { | |||||
width: 100%; | |||||
margin-bottom: 20px; | |||||
text-align: center; | |||||
} | |||||
.comment-form input,textarea { | |||||
width: 100%; | |||||
margin-top: 5px; | |||||
margin-bottom: 5px; | |||||
padding: 6px; | |||||
color: #ffffff; | |||||
background-color: rgba(0, 0, 0, 0.80); | |||||
border: 1px; | |||||
border-color: #ffffff; | |||||
border-style: solid; | |||||
border-radius: 4px 4px 4px 4px; | |||||
} | |||||
.comment-form textarea { | |||||
max-width: 100%; | |||||
height: 125px; | |||||
resize: none; | |||||
overflow-y: scroll; | |||||
} | |||||
.comment-form button { | |||||
margin-top: 5px; | |||||
margin-bottom: 5px; | |||||
padding: 6px; | |||||
color: #ffffff; | |||||
background-color: rgba(0, 0, 0, 0.80); | |||||
border: 1px; | |||||
border-color: #ffffff; | |||||
border-style: solid; | |||||
border-radius: 4px 4px 4px 4px; | |||||
} | |||||
@media all and (max-width : 950px) { | |||||
.left-bar { | |||||
display: none !important; | |||||
} | |||||
} |
@ -0,0 +1,653 @@ | |||||
/* PrismJS 1.15.0 | |||||
https://prismjs.com/download.html#themes=prism-twilight&languages=markup+css+clike+javascript+abap+actionscript+ada+apacheconf+apl+applescript+c+arff+asciidoc+asm6502+csharp+autohotkey+autoit+bash+basic+batch+bison+brainfuck+bro+cpp+aspnet+arduino+coffeescript+clojure+ruby+csp+css-extras+d+dart+diff+django+docker+eiffel+elixir+elm+markup-templating+erlang+fsharp+flow+fortran+gedcom+gherkin+git+glsl+gml+go+graphql+groovy+less+handlebars+haskell+haxe+http+hpkp+hsts+ichigojam+icon+inform7+ini+io+j+java+jolie+json+julia+keyman+kotlin+latex+markdown+liquid+lisp+livescript+lolcode+lua+makefile+crystal+erb+matlab+mel+mizar+monkey+n4js+nasm+nginx+nim+nix+nsis+objectivec+ocaml+opencl+oz+parigp+parser+pascal+perl+php+php-extras+sql+powershell+processing+prolog+properties+protobuf+scss+puppet+pure+python+q+qore+r+jsx+typescript+renpy+reason+rest+rip+roboconf+textile+rust+sas+sass+stylus+scala+scheme+smalltalk+smarty+plsql+soy+pug+swift+yaml+tcl+haml+tt2+twig+tsx+vbnet+velocity+verilog+vhdl+vim+visual-basic+wasm+wiki+xeora+xojo+xquery+tap&plugins=line-highlight+line-numbers+autolinker+wpd+custom-class+file-highlight+toolbar+jsonp-highlight+highlight-keywords+remove-initial-line-feed+previewers+autoloader+unescaped-markup+command-line+normalize-whitespace+keep-markup+data-uri-highlight+show-language+copy-to-clipboard */ | |||||
/** | |||||
* prism.js Twilight theme | |||||
* Based (more or less) on the Twilight theme originally of Textmate fame. | |||||
* @author Remy Bach | |||||
*/ | |||||
code[class*="language-"], | |||||
pre[class*="language-"] { | |||||
color: white; | |||||
background: none; | |||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; | |||||
text-align: left; | |||||
text-shadow: 0 -.1em .2em black; | |||||
white-space: pre; | |||||
word-spacing: normal; | |||||
word-break: normal; | |||||
word-wrap: normal; | |||||
line-height: 1.5; | |||||
-moz-tab-size: 4; | |||||
-o-tab-size: 4; | |||||
tab-size: 4; | |||||
-webkit-hyphens: none; | |||||
-moz-hyphens: none; | |||||
-ms-hyphens: none; | |||||
hyphens: none; | |||||
} | |||||
pre[class*="language-"], | |||||
:not(pre) > code[class*="language-"] { | |||||
background: hsl(0, 0%, 8%); /* #141414 */ | |||||
} | |||||
/* Code blocks */ | |||||
pre[class*="language-"] { | |||||
border-radius: .5em; | |||||
border: .3em solid hsl(0, 0%, 33%); /* #282A2B */ | |||||
box-shadow: 1px 1px .5em black inset; | |||||
margin: .5em 0; | |||||
overflow: auto; | |||||
padding: 1em; | |||||
} | |||||
pre[class*="language-"]::-moz-selection { | |||||
/* Firefox */ | |||||
background: hsl(200, 4%, 16%); /* #282A2B */ | |||||
} | |||||
pre[class*="language-"]::selection { | |||||
/* Safari */ | |||||
background: hsl(200, 4%, 16%); /* #282A2B */ | |||||
} | |||||
/* Text Selection colour */ | |||||
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, | |||||
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { | |||||
text-shadow: none; | |||||
background: hsla(0, 0%, 93%, 0.15); /* #EDEDED */ | |||||
} | |||||
pre[class*="language-"]::selection, pre[class*="language-"] ::selection, | |||||
code[class*="language-"]::selection, code[class*="language-"] ::selection { | |||||
text-shadow: none; | |||||
background: hsla(0, 0%, 93%, 0.15); /* #EDEDED */ | |||||
} | |||||
/* Inline code */ | |||||
:not(pre) > code[class*="language-"] { | |||||
border-radius: .3em; | |||||
border: .13em solid hsl(0, 0%, 33%); /* #545454 */ | |||||
box-shadow: 1px 1px .3em -.1em black inset; | |||||
padding: .15em .2em .05em; | |||||
white-space: normal; | |||||
} | |||||
.token.comment, | |||||
.token.prolog, | |||||
.token.doctype, | |||||
.token.cdata { | |||||
color: hsl(0, 0%, 47%); /* #777777 */ | |||||
} | |||||
.token.punctuation { | |||||
opacity: .7; | |||||
} | |||||
.namespace { | |||||
opacity: .7; | |||||
} | |||||
.token.tag, | |||||
.token.boolean, | |||||
.token.number, | |||||
.token.deleted { | |||||
color: hsl(14, 58%, 55%); /* #CF6A4C */ | |||||
} | |||||
.token.keyword, | |||||
.token.property, | |||||
.token.selector, | |||||
.token.constant, | |||||
.token.symbol, | |||||
.token.builtin { | |||||
color: hsl(53, 89%, 79%); /* #F9EE98 */ | |||||
} | |||||
.token.attr-name, | |||||
.token.attr-value, | |||||
.token.string, | |||||
.token.char, | |||||
.token.operator, | |||||
.token.entity, | |||||
.token.url, | |||||
.language-css .token.string, | |||||
.style .token.string, | |||||
.token.variable, | |||||
.token.inserted { | |||||
color: hsl(76, 21%, 52%); /* #8F9D6A */ | |||||
} | |||||
.token.atrule { | |||||
color: hsl(218, 22%, 55%); /* #7587A6 */ | |||||
} | |||||
.token.regex, | |||||
.token.important { | |||||
color: hsl(42, 75%, 65%); /* #E9C062 */ | |||||
} | |||||
.token.important, | |||||
.token.bold { | |||||
font-weight: bold; | |||||
} | |||||
.token.italic { | |||||
font-style: italic; | |||||
} | |||||
.token.entity { | |||||
cursor: help; | |||||
} | |||||
pre[data-line] { | |||||
padding: 1em 0 1em 3em; | |||||
position: relative; | |||||
} | |||||
/* Markup */ | |||||
.language-markup .token.tag, | |||||
.language-markup .token.attr-name, | |||||
.language-markup .token.punctuation { | |||||
color: hsl(33, 33%, 52%); /* #AC885B */ | |||||
} | |||||
/* Make the tokens sit above the line highlight so the colours don't look faded. */ | |||||
.token { | |||||
position: relative; | |||||
z-index: 1; | |||||
} | |||||
.line-highlight { | |||||
background: hsla(0, 0%, 33%, 0.25); /* #545454 */ | |||||
background: linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0)); /* #545454 */ | |||||
border-bottom: 1px dashed hsl(0, 0%, 33%); /* #545454 */ | |||||
border-top: 1px dashed hsl(0, 0%, 33%); /* #545454 */ | |||||
left: 0; | |||||
line-height: inherit; | |||||
margin-top: 0.75em; /* Same as .prism’s padding-top */ | |||||
padding: inherit 0; | |||||
pointer-events: none; | |||||
position: absolute; | |||||
right: 0; | |||||
white-space: pre; | |||||
z-index: 0; | |||||
} | |||||
.line-highlight:before, | |||||
.line-highlight[data-end]:after { | |||||
background-color: hsl(215, 15%, 59%); /* #8794A6 */ | |||||
border-radius: 999px; | |||||
box-shadow: 0 1px white; | |||||
color: hsl(24, 20%, 95%); /* #F5F2F0 */ | |||||
content: attr(data-start); | |||||
font: bold 65%/1.5 sans-serif; | |||||
left: .6em; | |||||
min-width: 1em; | |||||
padding: 0 .5em; | |||||
position: absolute; | |||||
text-align: center; | |||||
text-shadow: none; | |||||
top: .4em; | |||||
vertical-align: .3em; | |||||
} | |||||
.line-highlight[data-end]:after { | |||||
bottom: .4em; | |||||
content: attr(data-end); | |||||
top: auto; | |||||
} | |||||
pre[data-line] { | |||||
position: relative; | |||||
padding: 1em 0 1em 3em; | |||||
} | |||||
.line-highlight { | |||||
position: absolute; | |||||
left: 0; | |||||
right: 0; | |||||
padding: inherit 0; | |||||
margin-top: 1em; /* Same as .prism’s padding-top */ | |||||
background: hsla(24, 20%, 50%,.08); | |||||
background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0)); | |||||
pointer-events: none; | |||||
line-height: inherit; | |||||
white-space: pre; | |||||
} | |||||
.line-highlight:before, | |||||
.line-highlight[data-end]:after { | |||||
content: attr(data-start); | |||||
position: absolute; | |||||
top: .4em; | |||||
left: .6em; | |||||
min-width: 1em; | |||||
padding: 0 .5em; | |||||
background-color: hsla(24, 20%, 50%,.4); | |||||
color: hsl(24, 20%, 95%); | |||||
font: bold 65%/1.5 sans-serif; | |||||
text-align: center; | |||||
vertical-align: .3em; | |||||
border-radius: 999px; | |||||
text-shadow: none; | |||||
box-shadow: 0 1px white; | |||||
} | |||||
.line-highlight[data-end]:after { | |||||
content: attr(data-end); | |||||
top: auto; | |||||
bottom: .4em; | |||||
} | |||||
.line-numbers .line-highlight:before, | |||||
.line-numbers .line-highlight:after { | |||||
content: none; | |||||
} | |||||
pre[class*="language-"].line-numbers { | |||||
position: relative; | |||||
padding-left: 3.8em; | |||||
counter-reset: linenumber; | |||||
} | |||||
pre[class*="language-"].line-numbers > code { | |||||
position: relative; | |||||
white-space: inherit; | |||||
} | |||||
.line-numbers .line-numbers-rows { | |||||
position: absolute; | |||||
pointer-events: none; | |||||
top: 0; | |||||
font-size: 100%; | |||||
left: -3.8em; | |||||
width: 3em; /* works for line-numbers below 1000 lines */ | |||||
letter-spacing: -1px; | |||||
border-right: 1px solid #999; | |||||
-webkit-user-select: none; | |||||
-moz-user-select: none; | |||||
-ms-user-select: none; | |||||
user-select: none; | |||||
} | |||||
.line-numbers-rows > span { | |||||
pointer-events: none; | |||||
display: block; | |||||
counter-increment: linenumber; | |||||
} | |||||
.line-numbers-rows > span:before { | |||||
content: counter(linenumber); | |||||
color: #999; | |||||
display: block; | |||||
padding-right: 0.8em; | |||||
text-align: right; | |||||
} | |||||
.token a { | |||||
color: inherit; | |||||
} | |||||
code[class*="language-"] a[href], | |||||
pre[class*="language-"] a[href] { | |||||
cursor: help; | |||||
text-decoration: none; | |||||
} | |||||
code[class*="language-"] a[href]:hover, | |||||
pre[class*="language-"] a[href]:hover { | |||||
cursor: help; | |||||
text-decoration: underline; | |||||
} | |||||
div.code-toolbar { | |||||
position: relative; | |||||
} | |||||
div.code-toolbar > .toolbar { | |||||
position: absolute; | |||||
top: .3em; | |||||
right: .2em; | |||||
transition: opacity 0.3s ease-in-out; | |||||
opacity: 0; | |||||
} | |||||
div.code-toolbar:hover > .toolbar { | |||||
opacity: 1; | |||||
} | |||||
div.code-toolbar > .toolbar .toolbar-item { | |||||
display: inline-block; | |||||
} | |||||
div.code-toolbar > .toolbar a { | |||||
cursor: pointer; | |||||
} | |||||
div.code-toolbar > .toolbar button { | |||||
background: none; | |||||
border: 0; | |||||
color: inherit; | |||||
font: inherit; | |||||
line-height: normal; | |||||
overflow: visible; | |||||
padding: 0; | |||||
-webkit-user-select: none; /* for button */ | |||||
-moz-user-select: none; | |||||
-ms-user-select: none; | |||||
} | |||||
div.code-toolbar > .toolbar a, | |||||
div.code-toolbar > .toolbar button, | |||||
div.code-toolbar > .toolbar span { | |||||
color: #bbb; | |||||
font-size: .8em; | |||||
padding: 0 .5em; | |||||
background: #f5f2f0; | |||||
background: rgba(224, 224, 224, 0.2); | |||||
box-shadow: 0 2px 0 0 rgba(0,0,0,0.2); | |||||
border-radius: .5em; | |||||
} | |||||
div.code-toolbar > .toolbar a:hover, | |||||
div.code-toolbar > .toolbar a:focus, | |||||
div.code-toolbar > .toolbar button:hover, | |||||
div.code-toolbar > .toolbar button:focus, | |||||
div.code-toolbar > .toolbar span:hover, | |||||
div.code-toolbar > .toolbar span:focus { | |||||
color: inherit; | |||||
text-decoration: none; | |||||
} | |||||
.prism-previewer, | |||||
.prism-previewer:before, | |||||
.prism-previewer:after { | |||||
position: absolute; | |||||
pointer-events: none; | |||||
} | |||||
.prism-previewer, | |||||
.prism-previewer:after { | |||||
left: 50%; | |||||
} | |||||
.prism-previewer { | |||||
margin-top: -48px; | |||||
width: 32px; | |||||
height: 32px; | |||||
margin-left: -16px; | |||||
opacity: 0; | |||||
-webkit-transition: opacity .25s; | |||||
-o-transition: opacity .25s; | |||||
transition: opacity .25s; | |||||
} | |||||
.prism-previewer.flipped { | |||||
margin-top: 0; | |||||
margin-bottom: -48px; | |||||
} | |||||
.prism-previewer:before, | |||||
.prism-previewer:after { | |||||
content: ''; | |||||
position: absolute; | |||||
pointer-events: none; | |||||
} | |||||
.prism-previewer:before { | |||||
top: -5px; | |||||
right: -5px; | |||||
left: -5px; | |||||
bottom: -5px; | |||||
border-radius: 10px; | |||||
border: 5px solid #fff; | |||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.75); | |||||
} | |||||
.prism-previewer:after { | |||||
top: 100%; | |||||
width: 0; | |||||
height: 0; | |||||
margin: 5px 0 0 -7px; | |||||
border: 7px solid transparent; | |||||
border-color: rgba(255, 0, 0, 0); | |||||
border-top-color: #fff; | |||||
} | |||||
.prism-previewer.flipped:after { | |||||
top: auto; | |||||
bottom: 100%; | |||||
margin-top: 0; | |||||
margin-bottom: 5px; | |||||
border-top-color: rgba(255, 0, 0, 0); | |||||
border-bottom-color: #fff; | |||||
} | |||||
.prism-previewer.active { | |||||
opacity: 1; | |||||
} | |||||
.prism-previewer-angle:before { | |||||
border-radius: 50%; | |||||
background: #fff; | |||||
} | |||||
.prism-previewer-angle:after { | |||||
margin-top: 4px; | |||||
} | |||||
.prism-previewer-angle svg { | |||||
width: 32px; | |||||
height: 32px; | |||||
-webkit-transform: rotate(-90deg); | |||||
-moz-transform: rotate(-90deg); | |||||
-ms-transform: rotate(-90deg); | |||||
-o-transform: rotate(-90deg); | |||||
transform: rotate(-90deg); | |||||
} | |||||
.prism-previewer-angle[data-negative] svg { | |||||
-webkit-transform: scaleX(-1) rotate(-90deg); | |||||
-moz-transform: scaleX(-1) rotate(-90deg); | |||||
-ms-transform: scaleX(-1) rotate(-90deg); | |||||
-o-transform: scaleX(-1) rotate(-90deg); | |||||
transform: scaleX(-1) rotate(-90deg); | |||||
} | |||||
.prism-previewer-angle circle { | |||||
fill: transparent; | |||||
stroke: hsl(200, 10%, 20%); | |||||
stroke-opacity: 0.9; | |||||
stroke-width: 32; | |||||
stroke-dasharray: 0, 500; | |||||
} | |||||
.prism-previewer-gradient { | |||||
background-image: linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb), linear-gradient(45deg, #bbb 25%, #eee 25%, #eee 75%, #bbb 75%, #bbb); | |||||
background-size: 10px 10px; | |||||
background-position: 0 0, 5px 5px; | |||||
width: 64px; | |||||
margin-left: -32px; | |||||
} | |||||
.prism-previewer-gradient:before { | |||||
content: none; | |||||
} | |||||
.prism-previewer-gradient div { | |||||
position: absolute; | |||||
top: -5px; | |||||
left: -5px; | |||||
right: -5px; | |||||
bottom: -5px; | |||||
border-radius: 10px; | |||||
border: 5px solid #fff; | |||||
box-shadow: 0 0 3px rgba(0, 0, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.75); | |||||
} | |||||
.prism-previewer-color { | |||||
background-image: linear-gradient(45deg, #bbb 25%, transparent 25%, transparent 75%, #bbb 75%, #bbb), linear-gradient(45deg, #bbb 25%, #eee 25%, #eee 75%, #bbb 75%, #bbb); | |||||
background-size: 10px 10px; | |||||
background-position: 0 0, 5px 5px; | |||||
} | |||||
.prism-previewer-color:before { | |||||
background-color: inherit; | |||||
background-clip: padding-box; | |||||
} | |||||
.prism-previewer-easing { | |||||
margin-top: -76px; | |||||
margin-left: -30px; | |||||
width: 60px; | |||||
height: 60px; | |||||
background: #333; | |||||
} | |||||
.prism-previewer-easing.flipped { | |||||
margin-bottom: -116px; | |||||
} | |||||
.prism-previewer-easing svg { | |||||
width: 60px; | |||||
height: 60px; | |||||
} | |||||
.prism-previewer-easing circle { | |||||
fill: hsl(200, 10%, 20%); | |||||
stroke: white; | |||||
} | |||||
.prism-previewer-easing path { | |||||
fill: none; | |||||
stroke: white; | |||||
stroke-linecap: round; | |||||
stroke-width: 4; | |||||
} | |||||
.prism-previewer-easing line { | |||||
stroke: white; | |||||
stroke-opacity: 0.5; | |||||
stroke-width: 2; | |||||
} | |||||
@-webkit-keyframes prism-previewer-time { | |||||
0% { | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: 0; | |||||
} | |||||
50% { | |||||
stroke-dasharray: 100, 500; | |||||
stroke-dashoffset: 0; | |||||
} | |||||
100% { | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: -100; | |||||
} | |||||
} | |||||
@-o-keyframes prism-previewer-time { | |||||
0% { | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: 0; | |||||
} | |||||
50% { | |||||
stroke-dasharray: 100, 500; | |||||
stroke-dashoffset: 0; | |||||
} | |||||
100% { | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: -100; | |||||
} | |||||
} | |||||
@-moz-keyframes prism-previewer-time { | |||||
0% { | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: 0; | |||||
} | |||||
50% { | |||||
stroke-dasharray: 100, 500; | |||||
stroke-dashoffset: 0; | |||||
} | |||||
100% { | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: -100; | |||||
} | |||||
} | |||||
@keyframes prism-previewer-time { | |||||
0% { | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: 0; | |||||
} | |||||
50% { | |||||
stroke-dasharray: 100, 500; | |||||
stroke-dashoffset: 0; | |||||
} | |||||
100% { | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: -100; | |||||
} | |||||
} | |||||
.prism-previewer-time:before { | |||||
border-radius: 50%; | |||||
background: #fff; | |||||
} | |||||
.prism-previewer-time:after { | |||||
margin-top: 4px; | |||||
} | |||||
.prism-previewer-time svg { | |||||
width: 32px; | |||||
height: 32px; | |||||
-webkit-transform: rotate(-90deg); | |||||
-moz-transform: rotate(-90deg); | |||||
-ms-transform: rotate(-90deg); | |||||
-o-transform: rotate(-90deg); | |||||
transform: rotate(-90deg); | |||||
} | |||||
.prism-previewer-time circle { | |||||
fill: transparent; | |||||
stroke: hsl(200, 10%, 20%); | |||||
stroke-opacity: 0.9; | |||||
stroke-width: 32; | |||||
stroke-dasharray: 0, 500; | |||||
stroke-dashoffset: 0; | |||||
-webkit-animation: prism-previewer-time linear infinite 3s; | |||||
-moz-animation: prism-previewer-time linear infinite 3s; | |||||
-o-animation: prism-previewer-time linear infinite 3s; | |||||
animation: prism-previewer-time linear infinite 3s; | |||||
} | |||||
/* Fallback, in case JS does not run, to ensure the code is at least visible */ | |||||
[class*='lang-'] script[type='text/plain'], | |||||
[class*='language-'] script[type='text/plain'], | |||||
script[type='text/plain'][class*='lang-'], | |||||
script[type='text/plain'][class*='language-'] { | |||||
display: block; | |||||
font: 100% Consolas, Monaco, monospace; | |||||
white-space: pre; | |||||
overflow: auto; | |||||
} | |||||
.command-line-prompt { | |||||
border-right: 1px solid #999; | |||||
display: block; | |||||
float: left; | |||||
font-size: 100%; | |||||
letter-spacing: -1px; | |||||
margin-right: 1em; | |||||
pointer-events: none; | |||||
-webkit-user-select: none; | |||||
-moz-user-select: none; | |||||
-ms-user-select: none; | |||||
user-select: none; | |||||
} | |||||
.command-line-prompt > span:before { | |||||
color: #999; | |||||
content: ' '; | |||||
display: block; | |||||
padding-right: 0.8em; | |||||
} | |||||
.command-line-prompt > span[data-user]:before { | |||||
content: "[" attr(data-user) "@" attr(data-host) "] $"; | |||||
} | |||||
.command-line-prompt > span[data-user="root"]:before { | |||||
content: "[" attr(data-user) "@" attr(data-host) "] #"; | |||||
} | |||||
.command-line-prompt > span[data-prompt]:before { | |||||
content: attr(data-prompt); | |||||
} | |||||
@ -0,0 +1,48 @@ | |||||
<!DOCTYPE html> | |||||
<html> | |||||
<head> | |||||
<title>Administration</title> | |||||
<link rel="stylesheet" href="/css/admin.css"> | |||||
<link rel="preconnect" href="https://fonts.gstatic.com"> | |||||
<link href='https://fonts.googleapis.com/css?family=Average|Montserrat' rel='stylesheet' type='text/css'> | |||||
</head> | |||||
<body> | |||||
<header> | |||||
<h3><a href="/admin">Admin</a></h3> | |||||
<div class="right-header"> | |||||
<a href="/admin/logout">Logout</a> | |||||
</div> | |||||
</header> | |||||
<main> | |||||
<h2>Admin</h2> | |||||
<div class="list-header"> | |||||
<h3>Posts</h3> | |||||
<a id="new-post" href="/admin/post/new"><button>New</button></a> | |||||
</div> | |||||
<div id="post-list"> | |||||
<!-- Table starts here --> | |||||
<table class="post-table"> | |||||
<thead> | |||||
<tr> | |||||
<th>Title</th> | |||||
<th>Created At</th> | |||||
<th>Updated At</th> | |||||
<th></th> | |||||
</tr> | |||||
</thead> | |||||
<tbody> | |||||
{{ range $post := .Posts }} | |||||
<tr> | |||||
<td data-title="Username">{{ $post.Title }}</td> | |||||
<td data-title="Created At">{{ FormatTimestamp $post.CreatedAt }}</td> | |||||
<td data-title="Updated At">{{ FormatTimestamp $post.UpdatedAt }}</td> | |||||
<td data-title=""><a href="/admin/post/{{ $post.ID }}/edit"><button>Edit</button></a></td> | |||||
</tr> | |||||
{{ end }} | |||||
</tbody> | |||||
</table> | |||||
</div> | |||||
</main> | |||||
</body> | |||||
</html> | |||||
@ -0,0 +1,23 @@ | |||||
<!DOCTYPE html> | |||||
<html> | |||||
<head> | |||||
<title>Administration</title> | |||||
<link rel="stylesheet" href="/css/admin-login.css"> | |||||
<link rel="preconnect" href="https://fonts.gstatic.com"> | |||||
<link href='https://fonts.googleapis.com/css?family=Average|Montserrat' rel='stylesheet' type='text/css'> | |||||
</head> | |||||
<body> | |||||
<div id="login-container"> | |||||
<form action="/admin/login" method="POST"> | |||||
<fieldset> | |||||
<h2 class="">Admin Login</h2> | |||||
<p class="flash-msg">Fuck off, Pleb. I'm logging whatever IP hits this page.</p> | |||||
<p class="flash-msg">{{ .FlashMsg }}</p> | |||||
<input type="text" id="username" name="username" placeholder="Username"><br><br> | |||||
<input type="password" id="password" name="password" placeholder="Password"><br><br> | |||||
<input type="submit" value="Login"> | |||||
</fieldset> | |||||
</form> | |||||
</div> | |||||
</body> | |||||
</html> |
@ -0,0 +1,49 @@ | |||||
<!DOCTYPE html> | |||||
<html> | |||||
<head> | |||||
<title>Administration</title> | |||||
<link rel="stylesheet" href="/css/admin.css"> | |||||
<link rel="stylesheet" href="/css/admin-new-post.css"> | |||||
<link rel="preconnect" href="https://fonts.gstatic.com"> | |||||
<link href='https://fonts.googleapis.com/css?family=Average|Montserrat' rel='stylesheet' type='text/css'> | |||||
</head> | |||||
<body> | |||||
<header> | |||||
<h3><a href="/admin">Admin</a></h3> | |||||
<div class="right-header"> | |||||
<a href="/admin/logout">Logout</a> | |||||
</div> | |||||
</header> | |||||
<main> | |||||
<h2>Admin</h2> | |||||
<div class="list-header"> | |||||
<h3>New Post</h3> | |||||
</div> | |||||
<div id="create-new-post"> | |||||
<form enctype="multipart/form-data" action="/admin/post/new" method="POST"> | |||||
<fieldset> | |||||
<legend>New Post</legend> | |||||
<label for="title">Title</label> | |||||
<input type="text" name="title"> | |||||
<label for="subject">Subject</label> | |||||
<select name="subject"> | |||||
<option value="Programming">Programming</option> | |||||
<option value="Pentesting">Pentesting</option> | |||||
</select> | |||||
<label for="intro">Intro</label> | |||||
<textarea name="intro" rows="6"></textarea><br/><br/> | |||||
<label for="body">Body: </label> | |||||
<textarea name="body" rows="20"></textarea><br/><br/> | |||||
<label for="img">Main Image: </label> | |||||
<input type="file" id="img" name="img" accept="image/*"> | |||||
<label for="files">More files:</label> | |||||
<input type="file" id="files" name="files" multiple><br><br> | |||||
<input type="submit" value="Submit"> | |||||
</fieldset> | |||||
</form> | |||||
</div> | |||||
</main> | |||||
</body> | |||||
</html> | |||||
@ -0,0 +1,56 @@ | |||||
<!DOCTYPE html> | |||||
<html> | |||||
<head> | |||||
<title>Administration</title> | |||||
<link rel="stylesheet" href="/css/admin.css"> | |||||
<link rel="stylesheet" href="/css/admin-new-post.css"> | |||||
<link rel="preconnect" href="https://fonts.gstatic.com"> | |||||
<link href='https://fonts.googleapis.com/css?family=Average|Montserrat' rel='stylesheet' type='text/css'> | |||||
</head> | |||||
<body> | |||||
<header> | |||||
<h3><a href="/admin">Admin</a></h3> | |||||
<div class="right-header"> | |||||
<a href="/admin/logout">Logout</a> | |||||
</div> | |||||
</header> | |||||
<main> | |||||
<h2>Admin</h2> | |||||
<div class="list-header"> | |||||
<h3>New Post</h3> | |||||
</div> | |||||
<div id="create-new-post"> | |||||
<form enctype="multipart/form-data" action="/admin/post/{{ .Post.ID }}/edit" method="POST"> | |||||
<fieldset> | |||||
<legend>New Post</legend> | |||||
<label for="title">Title</label> | |||||
<input type="text" name="title" value="{{ .Post.Title }}"> | |||||
<label for="subject">Subject</label> | |||||
<select name="subject"> | |||||
<option value="Programming" | |||||
{{ if eq .Post.Subject "Programming" }} | |||||
selected | |||||
{{ end }} | |||||
>Programming</option> | |||||
<option value="Pentesting" | |||||
{{ if eq .Post.Subject "Pentesting" }} | |||||
selected | |||||
{{ end }} | |||||
>Pentesting</option> | |||||
</select> | |||||
<label for="intro">Intro</label> | |||||
<textarea name="intro" rows="6">{{ .Post.Intro }}</textarea><br/><br/> | |||||
<label for="body">Body: </label> | |||||
<textarea name="body" rows="20">{{ .Post.Body }}</textarea><br/><br/> | |||||
<label for="img">Main Image: </label> | |||||
<input type="file" id="img" name="img" accept="image/*"> | |||||
<label for="files">More files:</label> | |||||
<input type="file" id="files" name="files" multiple><br><br> | |||||
<input type="submit" value="Submit"> | |||||
</fieldset> | |||||
</form> | |||||
</div> | |||||
</main> | |||||
</body> | |||||
</html> | |||||
@ -0,0 +1,17 @@ | |||||
<header> | |||||
<a href="/"><h2 href="/">Tovi Jaeschke</h2></a> | |||||
<div class="nav-toggle"> | |||||
<div class="nav-toggle-bar"></div> | |||||
</div> | |||||
<div class="links"> | |||||
<ul> | |||||
<a href="/pentesting?page=0"><li class="{{ if eq .Subject "Pentesting" }}active{{ end }}">Pentesting</li></a> | |||||
<a href="/programming?page=0"><li class="{{ if eq .Subject "Programming" }}active{{ end }}">Programming</li></a> | |||||
<a href="/links.html"><li>Links</li></a> | |||||
</ul> | |||||
</div> | |||||
<ul class="pc-links"> | |||||
<a href="/pentesting?page=0"><li class="{{ if eq .Subject "Pentesting" }}active{{ end }}">Pentesting</li></a> | |||||
<a href="/programming?page=0"><li class="{{ if eq .Subject "Programming" }}active{{ end }}">Programming</li></a> | |||||
</ul> | |||||
</header> |
@ -0,0 +1,6 @@ | |||||
<h2>Tovi Jaeschke</h2> | |||||
<p>Hello! My name is Tovi. I'm a 21 year old programmer and computer security enthusiast.</p> | |||||
<p>My main hobbies include reading, programming, pentesting, philosophy, and designing websites. I actively develop in Go, Python, php, and HTML/CSS/JS. I enjoy using versatile, minimalist, open source programs, such as vim, st, dmenu, and dwm.</p> | |||||
<p>You can find some of my portfolio and some front-end demos <a href="https://demos.tovijaeschke.xyz">here</a></p> | |||||
<p>On this site, you will find programs I have written, CTF walkthroughs, minimalist programs I have found and begun using, and updates about my current workflow.</p> | |||||
{{ template "index-post-list.gohtml" . }} |
@ -0,0 +1,16 @@ | |||||
<h3>Recent posts:</h3> | |||||
<ul class="index-recent-posts"> | |||||
{{ range $post := .Posts }} | |||||
<a href='/post/{{ $post.ID }}'> | |||||
<li> | |||||
<div class='index-recent-post-title-container'> | |||||
<h4 class='index-recent-posts-title'>{{ $post.Title}}</h4> | |||||
<p class='datetimebox recent-post-updated-at'>{{ FormatTimestamp $post.UpdatedAt }}</p> | |||||
</div> | |||||
<div class='index-post-intro'> | |||||
{{ $post.Intro }} | |||||
</div> | |||||
</li> | |||||
</a> | |||||
{{ end }} | |||||
</ul> |
@ -0,0 +1,32 @@ | |||||
<!DOCTYPE html> | |||||
<html> | |||||
<head> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>Tovi Jaeschke's Homepage</title> | |||||
<link rel="stylesheet" type="text/css" href="/css/main.css"> | |||||
<link href='https://fonts.googleapis.com/css?family=Average|Montserrat' rel='stylesheet' type='text/css'> | |||||
<link rel="stylesheet" href="/css/prism.css"> | |||||
<script src="/js/prism.js"></script> | |||||
<script type="text/javascript" src="/js/script.js"></script> | |||||
<script type="text/javascript" src="/js/code_resize.js"></script> | |||||
</head> | |||||
<body> | |||||
{{ template "header.gohtml" . }} | |||||
<div class="container"> | |||||
{{ template "sidebar.gohtml" . }} | |||||
<div class="main"> | |||||
{{ if eq .PageView "index-intro.gohtml" }} | |||||
{{ template "index-intro.gohtml" . }} | |||||
{{ else if eq .PageView "post-list.gohtml" }} | |||||
{{ template "post-list.gohtml" . }} | |||||
{{ else if eq .PageView "post.gohtml" }} | |||||
{{ template "post.gohtml" . }} | |||||
{{ end }} | |||||
</div> | |||||
</div> | |||||
<footer> | |||||
<a href="mailto:tovi@tovijaeschke.xyz">tovi@tovijaeschke.xyz</a> | |||||
<p>Last updated: {{ FormatTimestamp .LastUpdatedAt }}</p> | |||||
</footer> | |||||
</body> | |||||
</html> |
@ -0,0 +1,57 @@ | |||||
<!DOCTYPE html> | |||||
<html> | |||||
<head> | |||||
<meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
<title>Tovi Jaeschke's Homepage</title> | |||||
<link rel="stylesheet" type="text/css" href="css/main.css"> | |||||
<link href='https://fonts.googleapis.com/css?family=Average|Montserrat' rel='stylesheet' type='text/css'> | |||||
<link rel="stylesheet" href="css/prism.css"> | |||||
<script src="js/prism.js"></script> | |||||
<script type="text/javascript" src="js/script.js"></script> | |||||
</head> | |||||
<body> | |||||
<header> | |||||
<a href="/"><h2 href="/">Tovi Jaeschke</h2></a> | |||||
<div class="nav-toggle"> | |||||
<div class="nav-toggle-bar"></div> | |||||
</div> | |||||
<div class="links"> | |||||
<ul> | |||||
<a href="/pentesting.html?page=0"><li>Pentesting</li></a> | |||||
<a href="/programming.html?page=0"><li>Programming</li></a> | |||||
<a href="/personal.html"><li>Personal</li></a> | |||||
<a href="/hireme.html"><li>Hire Me</li></a> | |||||
<a href="/links.html"><li>Links</li></a> | |||||
</ul> | |||||
</div> | |||||
<ul class="pc-links"> | |||||
<a href="/pentesting.html?page=0"><li>Pentesting</li></a> | |||||
<a href="/programming.html?page=0"><li>Programming</li></a> | |||||
<a href="/personal.html"><li>Personal</li></a> | |||||
<a href="/hireme.html"><li>Hire Me</li></a> | |||||
</ul> | |||||
</header> | |||||
<div class="container"> | |||||
<div class="main"> | |||||
<h2>Links</h2> | |||||
<div class="main-links"> | |||||
<ul> | |||||
<a href="mailto:tovi@tovijaeschke.xyz"><li>Email</li></a> | |||||
<a href="https://git.tovijaeschke.xyz"><li>Git</li></a> | |||||
<a href="https://gitlab.com/tovijaeschke"><li>Gitlab</li></a> | |||||
<a href="/static/Resume.pdf"><li>Resume</li></a> | |||||
<a href="https://demos.tovijaeschke.xyz/"><li>Portfolio</li></a> | |||||
</ul> | |||||
<h2>Recent Posts</h2> | |||||
<ul> | |||||
<?php include 'php/recent-posts.php';?> | |||||
</ul> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<footer> | |||||
<a href="mailto:tovi@tovijaeschke.xyz">tovi@tovijaeschke.xyz</a> | |||||
<p>Last updated: <?php lastUpdate();?></p> | |||||
</footer> | |||||
</body> | |||||
</html> |
@ -0,0 +1,23 @@ | |||||
<h2>{{ .Subject }}</h2> | |||||
<ul class="index-recent-posts"> | |||||
{{ range $post := .Posts }} | |||||
<a href="/post/{{ $post.ID }}"> | |||||
<li> | |||||
<div> | |||||
<h4 class="index-recent-posts-title">{{ $post.Title }}</h4> | |||||
<p class="datetimebox">{{ FormatTimestamp $post.UpdatedAt }}</p> | |||||
</div> | |||||
</li> | |||||
</a> | |||||
{{ end }} | |||||
</ul> | |||||
<div class="paginate"> | |||||
<ul> | |||||
<a href="/{{ StrToLower .Subject }}?page=0"><li><</li></a> | |||||
{{ $subj := StrToLower .Subject }} | |||||
{{ range $i := Iterate .PageCount }} | |||||
<a href="/{{ $subj }}?page={{ $i }}"><li>{{ PlusInt $i 1 }}</li></a> | |||||
{{end}} | |||||
<a href="/{{ StrToLower .Subject }}?page={{ MinusInt .PageCount 1 }}"><li>></li></a> | |||||
</ul> | |||||
</div> |
@ -0,0 +1,8 @@ | |||||
<h3 class='post-title'>{{ .Post.Title }}</h2> | |||||
{{ if .Post.MainImage }} | |||||
<div class='icon-div'> | |||||
<img class='post-icon' src='{{ .Post.MainImage }}' /> | |||||
</div> | |||||
{{ end }} | |||||
{{ .Post.Intro }} | |||||
{{ .Post.Body }} |
@ -0,0 +1,8 @@ | |||||
<div class="left-bar"> | |||||
<p>Links:</p> | |||||
<ul class="expand-links"> | |||||
{{ range $link := .SidebarLinks }} | |||||
<a href="{{ $link.Link }}"><li>{{ $link.Name }}</li></a> | |||||
{{ end }} | |||||
</ul> | |||||
</div> |
@ -0,0 +1,37 @@ | |||||
var code_resize = function() { | |||||
var sheet = window.document.styleSheets[0]; | |||||
var leftbar = document.querySelector('.left-bar'); | |||||
var style = getComputedStyle(leftbar).getPropertyValue('display'); | |||||
if (style == "none") { | |||||
var width = screen.width - 180; | |||||
} else { | |||||
var width = screen.width - 460; | |||||
} | |||||
sheet.insertRule('pre { max-width: ' + width + 'px; }', sheet.cssRules.length); | |||||
sheet.insertRule('.command-line { max-width: ' + (width + 50) + 'px; }', sheet.cssRules.length); | |||||
} | |||||
window.onload = function() { | |||||
code_resize(); | |||||
window.onresize = code_resize; | |||||
(function() { | |||||
var hamburger = { | |||||
navToggle: document.querySelector('.nav-toggle'), | |||||
nav: document.querySelector('.links'), | |||||
doToggle: function(e) { | |||||
e.preventDefault(); | |||||
this.navToggle.classList.toggle('expanded'); | |||||
this.nav.classList.toggle('expanded'); | |||||
} | |||||
}; | |||||
document.addEventListener('click', function(e) { | |||||
if (e.target.className.includes("nav-toggle")) { | |||||
hamburger.doToggle(e); | |||||
} else { | |||||
hamburger.navToggle.classList.remove('expanded'); | |||||
hamburger.nav.classList.remove('expanded'); | |||||
} | |||||
}); | |||||
}()); | |||||
} |
@ -0,0 +1,22 @@ | |||||
window.onload = function() { | |||||
(function() { | |||||
var hamburger = { | |||||
navToggle: document.querySelector('.nav-toggle'), | |||||
nav: document.querySelector('.links'), | |||||
doToggle: function(e) { | |||||
e.preventDefault(); | |||||
this.navToggle.classList.toggle('expanded'); | |||||
this.nav.classList.toggle('expanded'); | |||||
} | |||||
}; | |||||
document.addEventListener('click', function(e) { | |||||
if (e.target.className.includes("nav-toggle")) { | |||||
hamburger.doToggle(e); | |||||
} else { | |||||
hamburger.navToggle.classList.remove('expanded'); | |||||
hamburger.nav.classList.remove('expanded'); | |||||
} | |||||
}); | |||||
}()); | |||||
} |